zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
U
G=®dûŠã@sÈdZddlZddlZddlZddlmZddlmZddlm    Z    ddl
m Z ddl m Z ddlmZdd    lmZddlZdd
lmZmZmZdd lmZmZmZmZGd d „d eƒZGdd„deƒZdS)z#
Implements the bdist_msi command.
éN)ÚCommand)Ú remove_tree)Úget_python_version)Ú StrictVersion)ÚDistutilsOptionError)Ú get_platform)Úlog)ÚschemaÚsequenceÚtext)Ú    DirectoryÚFeatureÚDialogÚadd_datac@sFeZdZdZdd„Zdd„Zddd    „Zdd d „Zddd„Zdd„Z    dS)ÚPyDialogz™Dialog class with a fixed layout: controls at the top, then a ruler,
    then a list of buttons: back, next, cancel. Optionally a bitmap at the
    left.cOs>tj|f|žŽ|jd}d|d}| dd||jd¡dS)zbDialog(database, name, x, y, w, h, attributes, title, first,
        default, cancel, bitmap=true)é$é˜iHZ
BottomLinerN)rÚ__init__ÚhÚlineÚw)ÚselfÚargsÚkwZrulerZbmwidth©rú^D:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\setuptools/_distutils/command/bdist_msi.pyrs
 zPyDialog.__init__c
Cs| ddddddd|¡dS)    z,Set the title text of the dialog at the top.ÚTitleéé
é@é<éz{\VerdanaBold10}%sN)r )rÚtitlerrrr"%sÿzPyDialog.titleÚBackéc
Cs,|r
d}nd}| |d|jddd|||¡S)z»Add a back button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.
 
        Return the button, so that events can be associatedér$é´éé8é©Ú
pushbuttonr©rr"ÚnextÚnameÚactiveÚflagsrrrÚback,sz PyDialog.backÚCancelc
Cs,|r
d}nd}| |d|jddd|||¡S)z½Add a cancel button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.
 
        Return the button, so that events can be associatedr%r$i0r'r(r)r*r,rrrÚcancel7szPyDialog.cancelÚNextc
Cs,|r
d}nd}| |d|jddd|||¡S)z»Add a Next button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.
 
        Return the button, so that events can be associatedr%r$éìr'r(r)r*r,rrrr-Bsz PyDialog.nextc
Cs,| |t|j|dƒ|jdddd||¡S)zêAdd a button with a given title, the tab-next button,
        its name in the Control table, giving its x position; the
        y-position is aligned with the other buttons.
 
        Return the button, so that events can be associatedér'r(r)r%)r+Úintrr)rr.r"r-ZxposrrrÚxbuttonMszPyDialog.xbuttonN)r#r$)r2r$)r4r$)
Ú__name__Ú
__module__Ú __qualname__Ú__doc__rr"r1r3r-r8rrrrrs
 
 
 
rcsÀeZdZdZddddeƒfdddd    d
d d d g
ZddddgZddddddddddddddd d!d"d#d$d%gZd&Z‡fd'd(„Z    d)d*„Z
d+d,„Z d-d.„Z d/d0„Z d1d2„Zd3d4„Zd5d6„Zd7d8„Z‡ZS)9Ú    bdist_msiz7create a Microsoft Installer (.msi) binary distribution)z
bdist-dir=Nz1temporary directory for creating the distributionz
plat-name=Úpz;platform name to embed in generated filenames (default: %s))ú    keep-tempÚkzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)úno-target-compileÚcz/do not compile .py to .pyc on the target system)úno-target-optimizeÚoz;do not compile .py to .pyo (optimized) on the target system)z    dist-dir=Údz-directory to put final built distributions in)ú
skip-buildNz2skip rebuilding everything (for testing/debugging))zinstall-script=NzUbasename of installation script to be run after installation or before deinstallation)zpre-install-script=Nz{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributionr?rArCrFz2.0z2.1z2.2z2.3z2.4z2.5z2.6z2.7z2.8z2.9z3.0z3.1z3.2z3.3z3.4z3.5z3.6z3.7z3.8z3.9ÚXcs tƒj||Žt dtd¡dS)NzZbdist_msi command is deprecated since Python 3.9, use bdist_wheel (wheel packages) insteadé)ÚsuperrÚwarningsÚwarnÚDeprecationWarning)rrr©Ú    __class__rrrs
þzbdist_msi.__init__cCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_    d|_
dS)Nr) Ú    bdist_dirÚ    plat_nameÚ    keep_tempZno_target_compileZno_target_optimizeÚtarget_versionÚdist_dirÚ
skip_buildÚinstall_scriptÚpre_install_scriptÚversions)rrrrÚinitialize_options…szbdist_msi.initialize_optionscCsò| dd¡|jdkr2| d¡j}tj |d¡|_tƒ}|jsN|j     
¡rN||_|jrˆ|jg|_ |j s”|j     
¡r”|j|kr”t d|fƒ‚n t|jƒ|_ | ddd¡|jr°t dƒ‚|jrè|j    jD]}|jtj |¡kr¾qèq¾t d|jƒ‚d|_dS)    NÚbdist)rTrTZmsizMtarget version can only be %s, or the '--skip-build' option must be specified)rSrS)rPrPz5the pre-install-script feature is not yet implementedz(install_script '%s' not found in scripts)Úset_undefined_optionsrOÚget_finalized_commandÚ
bdist_baseÚosÚpathÚjoinrrRÚ distributionÚhas_ext_modulesrWrTrÚlistÚ all_versionsrVrUÚscriptsÚbasenameÚinstall_script_key)rr\Z short_versionÚscriptrrrÚfinalize_options’sH 
 
ÿÿÿ þÿ ÿÿzbdist_msi.finalize_optionscCsˆ|js| d¡|jddd}|j|_|j|_d|_| d¡}d|_d|_|j     ¡r¬|j
}|s~|jslt dƒ‚dt j dd    …}d
|j|f}| d¡}tj |jd |¡|_t d |j¡| ¡t j dtj |jd ¡¡| ¡t jd=| |j¡|j ¡}| |¡}tj |¡}tj |¡r0t  |¡|jj!}|j"}    |    sJ|j#}    |    sTd}    | $¡}
dt%|
ƒj&} |j ¡}|j
rŒd|j
|f} nd|} t' (|t)| t' *¡| |    ¡|_+t' ,|j+t-¡d|
fg} |j.pÒ|j/}|rè|  0d|f¡|j1r|  0d|j1f¡| rt2|j+d| ƒ| 3¡| 4¡| 5¡| 6¡|j+ 7¡t8|jdƒrld|j
pXd|f}|jj9 0|¡|j:s„t;|j|j<ddS)NÚbuildÚinstallr$)Úreinit_subcommandsrÚ install_libz Should have already checked thisz%d.%drHz.%s-%sÚlibzinstalling to %sZPURELIBÚUNKNOWNz%d.%d.%dz Python %s %sz    Python %sZ DistVersionZ
ARPCONTACTZARPURLINFOABOUTÚPropertyÚ
dist_filesr=Úany)Údry_run)=rTÚ run_commandÚreinitialize_commandrOÚprefixÚwarn_dirÚcompileÚoptimizer`rarRÚAssertionErrorÚsysÚ version_inforPr[r]r^r_Ú
build_baseÚ    build_librÚinfoÚensure_finalizedÚinsertÚrunÚmkpathrSÚ get_fullnameÚget_installer_filenameÚabspathÚexistsÚunlinkÚmetadataÚauthorÚ
maintainerÚ get_versionrÚversionÚmsilibZ init_databaser    Zgen_uuidÚdbZ
add_tablesr
Ú author_emailÚmaintainer_emailÚappendÚurlrÚadd_find_pythonÚ    add_filesÚ add_scriptsÚadd_uiÚCommitÚhasattrrprQrrr)rrjrlrRÚplat_specifierriÚfullnameÚinstaller_namerˆr‰rŒZsversionZ product_nameÚpropsÚemailÚtuprrrrºs†
 
 
 
 
ÿ 
 
 
 
þ
 
z bdist_msi.runc
Cs|j}t d¡}tj |j¡}t||d|ddƒ}t|ddddddd}||d    fg}|j    |j
gD]t}d|}d|}    }
d} ||j
krd
} d } n d |} d} t||    | | d| |d}t||||||
ƒ}|  |||f¡q`|  ¡i}|D]\}}}|g}|rü|  ¡}t |j¡D]æ}tj |j|¡}tj |¡rld | |¡|f}||}
t|||||
|ƒ}|  |¡nŠ|js„| |j|d¡||krÌ| |¡}||<||jkrö|jrÀtd|ƒ‚d||_n*||}t|jd|||j|d|jfgƒqqø|  ¡qæ| |¡dS)NZ    distfilesÚ    TARGETDIRZ    SourceDirÚPythonZ
Everythingrr$)Ú    directoryÚzPython from another locationrHzPython %s from registryz%s|%szMultiple files with name %sz[#%s]Z DuplicateFile)rŽrZCABr]r^r…rOr r rWÚ other_versionr‘r—ÚpopÚlistdirÚabsoluter_ÚisdirZ
make_shortÚ    componentZstart_componentÚlogicalZadd_filerUrfrrÚcommit)rrŽZcabÚrootdirÚrootÚfÚitemsrŒÚtargetr.ÚdefaultÚdescr"ÚlevelÚdirÚseenÚfeatureÚtodoÚfileZafileÚshortZnewdirÚkeyrrrr”sf
 
ÿ  
 
 ÿ ÿ
 
zbdist_msi.add_filesc Csˆd}|jD]v}d|}d|}d|}d|}d|}d|}d|}    d    |}
d
|} d |} tjrld } nd } t|jd|d |d| f|d|d| fgƒt|jd||f||fgƒt|jd|d| d|df|    d| d|df|
d| d| dfgƒt|jd|||f|    ||df|
d|d fgƒt|jd|||f|    ||df|
d|d fgƒt|jdd|dd|fgƒ|d7}|dks
t‚q
dS)asAdds code to the installer to compute the location of Python.
 
        Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the
        registry for each version of Python.
 
        Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined,
        else from PYTHON.MACHINE.X.Y.
 
        Properties PYTHONX.Y will be set to TARGETDIRX.Y\python.exei’z)SOFTWARE\Python\PythonCore\%s\InstallPathzpython.machine.z python.user.zPYTHON.MACHINE.z PYTHON.USER.ZPythonFromMachineZPythonFromUserZ    PythonExerŸÚPYTHONérHZ
RegLocatorNr$Z    AppSearchÚ CustomActioni3ú[ú]z ]\python.exeÚInstallExecuteSequenceÚInstallUISequenceÚ    Conditionr rz NOT TARGETDIRéiô)rWrZWin64rrŽry)rÚstartÚverZ install_pathZ machine_regZuser_regZ machine_propZ    user_propZmachine_actionZ user_actionZ
exe_actionZtarget_dir_propÚexe_propÚTyperrrr“Ks`    ÿÿÿÿþÿ  þÿ  þÿÿzbdist_msi.add_find_pythonc
Cs|jrjd}|j|jgD]P}d|}d|}t|jd|d||jfgƒt|jd|d||fgƒ|d7}q|jrþtj     |j
d    ¡}t |d
ƒ4}|  d ¡t |jƒ}|  |  ¡¡W5QRXW5QRXt|jd d t |¡fgƒt|jddgƒt|jddgƒdS)Nizinstall_script.rºr¼é2r¿z &Python%s=3r$zpreinstall.batrzrem ="""
%1 %0
exit
"""
ÚBinaryÚ
PreInstall)rÉrHrÉN)rÉz NOT InstallediÂ)rUrWr£rrŽrfrVr]r^r_rOÚopenÚwriteÚreadrrÈ)rrÃrÄZinstall_actionrÅZscriptfnr­Zfinrrrr•s6ÿÿ
     
 "ÿÿÿzbdist_msi.add_scriptscCsÈ
|j}d}}d}d}d}d}d}d}    t|dd    d
d d d dgƒt|dddddgƒt|ddddddgƒt|dtjƒt|dtjƒt|d||||||dddƒ }
|
 d¡|
jddd d!|
jd"d#d d!|
 d$d%d&d'd(d)d*¡|
 d+d%d,d'd-d)d.¡|
j    dd"dd/} |  
d0d1¡t|d2||||||dddƒ } |  d3¡| jddd d!| jd"d#d d!|  d$d%d&d'd(d)d4¡|  d+d%d,d'd-d)d.¡| j    dd"dd/} |  
d0d1¡t|d5||||||dddƒ } |  d6¡| jddd d!| jd"d#d d!|  d7d%d8d'd-d)d.¡| j    dd"dd/} |  
d0d9¡t|d:||||d;|d<d<d<d=d> }| d?d%d@dAd%d)dB¡| d7d-dCdDd-d)dE¡| dFd-dGdHdddI¡|  dJdKd-dLdHdMdNdOddd¡ |jd1dPd1d/} |  
d0d1¡|j    dPd<dPd/} |  
d0dP¡|jd<d1d<d/} |  
d0d<¡t |dQddRdHdSdT|dUddƒ }| dUddVdDdWddX¡|  dYdZd[d\d]dd^d¡ 
d0d_¡|  d`dad[d\d]ddbd¡ 
d0dc¡|  ddd d[d\d]dded¡ 
d0df¡|  dgdhd[d\d]dd"d¡ 
d0di¡|  djd\d[d\d]ddPd¡ 
d0dk¡|  dldmd[d\d]ddnd¡ 
d0do¡|  dpdqd[d\d]dd<d¡ 
d0dr¡t |dsddRdtdud|d^d^d^ƒ }| dFdWd%dvdwddx¡|  dbd[dydzd{ddbd^¡} |  
d0d1¡|  d^d|dydzd{dd^db¡} |  
d0d9¡t |d}ddRdtdu||d9d9d9ƒ }| dFdWd%dvdwdd~¡|  d9ddydzd{dd9d¡} |  
d0d1¡t|d€||||||d"d"d"ƒ }| d7d%d&d'dd)d‚¡| dƒ¡| dd%d„d'd-d)d…¡} |  ddF¡| d†d%d‡d'dwd)d¡} |  d†dF¡|jd#dd d!|j    dˆdd d!| d"d¡} |  
d‰ds¡t|dŠ||||||dˆdˆd"ƒ }| d‹¡| dŒd%dwdd-dd|j ¡¡|jddd d!|     dŽd"¡} d}| j
dd|d‘|j|jgD](}|d7}| j
dd’|d“||d‘q
| j
d”d}|dd‘| j
d0d9|d•d‘| d"d–¡} |  
d‰ds¡|  d–d—d%d˜ddZdd™ddšd¡ } |  
d›dœ¡|j}d“|}d|}| džd%dAdd%ddŸ¡} |  d |¡|  d¡|¡|  d¢|¡|  d£|¡|  dšdšd%d¤dd¥dd¦|ddˆd¡ } |  d |¡|  d¡|¡|  d¢|¡|  d£|¡t|d§||||||d¨d¨d¨d=d> }| d?d%d@dAd%d)d©¡| d7d-d-dDd-d)dª¡| dFd-d«dHd˜dd¬¡|  d­d®d-d¯dHd°d±dd²dd¡ | d¨dndd³¡ 
d0d9¡t|d´||||||dµdˆd"ƒ }| d¶¡| dµd%d˜dtddd·dXdˆ¡    }| d¸d d¹d°d-dº¡| d»d d¼d°d-d½¡|jd#dd d!|     dŽd"¡} |  
d¾dœd¿d¡| j
d0d9d•d‘| d"dµ¡} |  
d‰ds¡t|dÀ||||||d"d"d"d=d> }| d?d-d%dAd%d)dÁ¡| dFdÂdÃddwddÄ¡| dÅdÂd¯dÂd-ddÆ¡| dd&d¯|d&d-dd…¡} |  ddF¡|  dÇdÇdÂdZddRdÈddÉdd¡ } |  dÊdË¡|jddˆd=d!|j    dŽd"d=d!| d"d#¡ 
d‰ds¡t|dÌ||||||dˆdˆd"ƒ }| dÍ¡| dÎd%dÏdHdhddС| dÑd%dÒdHd˜ddÓdXdˆ¡    }| dÔd dÕdAd{dÖ¡| d×d dØdAd{dÙ¡|jddd=d!|     dd"¡} |  
dÚd¸dÛd¹¡|  
dÜdÝdÛd@¡|  
dÞdßdÛdN¡|  
dàd¸dÛdá¡|  
dâd¸dãdä¡|  
dÜdådãdæ¡|  
dÞdçdãdè¡|  
d×d¸dãdé¡|  
d0d9dêd-¡| d"dÑ¡ 
d‰ds¡dS)ëNrÇiri,z[ProductName] Setupr%r$é ro)Z DefaultUIFontÚDlgFont8)Z ErrorDialogÚErrorDlg)Z    Progress1ZInstall)Z    Progress2Zinstalls)ÚMaintenanceForm_ActionÚRepair)Ú
WhichUsersÚALLZ    TextStyle)rÎÚTahomaé    Nr)Z DlgFontBold8rÔéNr$)Z VerdanaBold10ÚVerdanarNr$)Z VerdanaRed9r×rÕéÿrrÀ)Ú
PrepareDlgz(Not Privileged or Windows9x or InstalledéŒ)Ú WhichUsersDlgz.Privileged and not Windows9x and not Installedé)ÚSelectFeaturesDlgz Not InstallediÎ)ÚMaintenanceTypeDlgz,Installed AND NOT RESUME AND NOT Preselectediâ)Ú ProgressDlgNiÚ
ActionTextÚUITextZ
FatalErrorZFinishz)[ProductName] Installer ended prematurelyz< Backr)r/r2r#Z Description1réFréPr!z«[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.Z Description2é›éz.Click the Finish button to exit the Installer.)r.Z    EndDialogZExitZUserExitz'[ProductName] Installer was interruptedz•[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.Z
ExitDialogz&Completing the [ProductName] InstallerÚ DescriptionéëZReturnZ
FilesInUseéÚRetryF)ZbitmaprééÈz{\DlgFontBold8}Files in Useéiz8Some files that need to be updated are currently in use.ÚTexté7iJz²The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.ÚListZListBoxéké‚éZFileInUseProcessÚIgnorerÏréeiZ    ErrorTextrÕé0r¢ÚNéxéHéQéZNoZErrorNoÚYéðZYesZErrorYesÚAZAbortZ
ErrorAbortÚCé*Z ErrorCancelÚIZ ErrorIgnoreÚOéŸZOkZErrorOkÚRéÆZ
ErrorRetryZ    CancelDlgiéUéÂéz;Are you sure you want to cancel [ProductName] installation?é9r(r)é„ZWaitForCostingDlgzRPlease wait while the installer finishes determining your disk space requirements.éfrÙé(zOPlease wait while the Installer prepares to guide you through the installation.z&Welcome to the [ProductName] Installerénz Pondering...Z
ActionDataé‡r4Z SpawnDialogrÝzSelect Python InstallationsZHintz9Select the Python locations where %s should be installed.zNext >z [TARGETDIR]z [SourceDir])Zorderingz [TARGETDIR%s]z FEATURE_SELECTED AND &Python%s=3ZSpawnWaitDialogrHZFeaturesZ SelectionTreer ZFEATUREZPathEditz[FEATURE_SELECTED]Ú1z!FEATURE_SELECTED AND &Python%s<>3ZOtherz$Provide an alternate Python locationZEnableZShowZDisableZHideé×érŸZ DiskCostDlgÚOKz&{\DlgFontBold8}Disk Space RequirementszFThe disk space required for the installation of the selected features.é5aThe highlighted volumes (if any) do not have enough disk space available for the currently selected features.  You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).Z
VolumeListZVolumeCostListédé–iz{120}{70}{70}{70}{70}gà?rÛZ AdminInstallzGSelect whether to install [ProductName] for all users of this computer.rÒrÓézInstall for all usersZJUSTMEézInstall just for mez
[ALLUSERS]zWhichUsers="ALL"rßz({\DlgFontBold8}[Progress1] [ProductName]é#éAzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.Z StatusLabelzStatus:Z ProgressBariz Progress doneZ SetProgressÚProgressrÞz)Welcome to the [ProductName] Setup WizardZBodyTexté?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGroupélrÐrÑr»z&Repair [ProductName]ZRemoverzRe&move [ProductName]z [REINSTALL]zMaintenanceForm_Action="Repair"z [Progress1]Z    Repairingz [Progress2]ZrepairsZ    ReinstallrÖz[REMOVE]zMaintenanceForm_Action="Remove"é ZRemovingé Zremovesé éz MaintenanceForm_Action<>"Change")rŽrr ràrárr"r1r3r-ÚeventÚcontrolrr+Úmappingr`rƒrWr£Ú    conditionr8Z
radiogroupÚadd)rrŽÚxÚyrrr"ÚmodalZmodelessZtrack_disk_spaceÚfatalrBZ    user_exitZ exit_dialogZinuseÚerrorr3ZcostingÚprepZseldlgÚorderrŒrÄZinstall_other_condZdont_install_other_condZcostZ
whichusersÚgÚprogressZmaintrrrr–§svùþ ýÿ    ùÿ
ÿ
ÿÿ ÿ
ÿÿ ÿ
ÿ üÿÿÿÿ   ü       ÿÿ  ÿÿ ÿÿ
    ÿ
ÿÿ  þ
  ÿ ÿ    ÿ    ÿÿÿÿÿ ÿ
ÿ   ÿÿÿ ÿ ÿ
ÿÿ zbdist_msi.add_uicCs<|jrd||j|jf}nd||jf}tj |j|¡}|S)Nz%s.%s-py%s.msiz    %s.%s.msi)rRrPr]r^r_rS)rršÚ    base_namer›rrrr„åsÿz bdist_msi.get_installer_filename)r9r:r;Ú descriptionrÚ user_optionsÚboolean_optionsrcr£rrXrhrr”r“r•r–r„Ú __classcell__rrrMrr=Us`ÿÿéÿ
ý  ([66&@r=)r<r]rzrJÚdistutils.corerÚdistutils.dir_utilrÚdistutils.sysconfigrZdistutils.versionrÚdistutils.errorsrÚdistutils.utilrÚ    distutilsrrr    r
r r r rrrr=rrrrÚ<module>s       >