zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
U
W±d[Ðã@s˜dZddlZddlZddlZddlZddlmZddlmZm    Z    ddlm
Z ddl m Z mZddlmZmZmZmZddlmZmZmZmZmZmZmZdd    lmZdd
lmZm Z m!Z!m"Z"m#Z#dd l$m%Z%dd l&m'Z'dd l(m)Z)ddl*m+m,Z-e  .e/¡Z0e"r"ddl1m2Z2m3Z3m4Z4m5Z5m6Z6e r:ddl7m+m8Z9Gdd„deƒZ:Gdd„deƒZ;Gdd„deƒZ<Gdd„deƒZ=Gdd„dƒZ>dZ?dZ@dZAdS)zß
This module contains classes that are available for the .spec files.
 
Spec file is generated by PyInstaller. The generated code from .spec file
is a way how PyInstaller does the dependency analysis and creates executable.
éN)Ú
itemgetter)ÚHOMEPATHÚPLATFORM)Úlog)ÚCArchiveWriterÚZlibArchiveWriter)ÚTargetÚ_check_guts_eqÚnormalize_pyz_tocÚ normalize_toc)Ú_check_guts_tocÚ_make_clean_directoryÚ_rmtreeÚ
checkCacheÚget_code_objectÚstrip_paths_in_codeÚcompile_pymodule)ÚSplash)Ú    is_cygwinÚ    is_darwinÚis_linuxÚis_winÚstrict_collect_mode)Ú    bindepend)Úget_bootstrap_modules)Úis_path_to_egg)ÚiconÚ versioninfoÚ winmanifestÚ winresourceÚwinutilscs8eZdZdZ‡fdd„ZdefdeffZdd„Z‡Z    S)ÚPYZzF
    Creates a ZlibArchive that contains all pure Python modules.
    cs¸ddlm}tƒ ¡| dd¡}| dd¡}||_|dkrTtj |j    ¡dd|_t
ƒ}||_ |rˆdtj  |dd    ¡d
f}|  d|¡g|_tj  |dd ¡}|D]H\}}    }
|
d
krÚt||    |dd } |j || |
f¡q¤|j ||    |
f¡q¤td d„|jDƒƒ} g|_i|_|D]‚} |d t| ƒ¡}|dk    r>|j |¡| D]N}|\}}}
|
dksjtd|›dƒ‚|
d
kr‚|| kr‚qB|j |¡qBqt|jƒ|_|j ¡| ¡dS)a+
        tocs
            One or more TOC (Table of Contents) lists, usually an `Analysis.pure` and an `Analysis.zipped_data`.
 
            If the passed TOC has an attribute `_code_cache`, it is expected to be a dictionary of module code objects
            from ModuleGraph.
 
        kwargs
            Possible keyword arguments:
 
            name
                A filename for the .pyz. Normally not needed, as the generated name will do fine.
            cipher
                The block cipher that will be used to encrypt Python bytecode.
        r©ÚCONFÚnameNÚcipherz.pyzZpyimod00_crypto_keyÚworkpathzpyimod00_crypto_key.pyÚPYMODULEZ    localpycs)Ú
code_cachecss |]\}}}|dkr|VqdS)r'N©)Ú.0r$Ú_Útypecoder)r)úOd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\PyInstaller/building/api.pyÚ    <genexpr>iszPYZ.__init__.<locals>.<genexpr>r()r'ÚDATAzInvalid entry passed to PYZ: ú!)ÚPyInstaller.configr#ÚsuperÚ__init__Úgetr$ÚosÚpathÚsplitextÚ tocfilenamerr%ÚjoinÚinsertÚ dependenciesrÚappendÚsetÚtocÚ    code_dictÚidÚupdateÚAssertionErrorr
ÚsortÚ __postinit__)ÚselfZtocsÚkwargsr#r$r%Zbootstrap_dependenciesÚkey_filer&Úsrc_pathr,Úpyc_pathZbootstrap_module_namesr>r(Úentryr+©Ú    __class__r)r-r33sF 
 
 
 
z PYZ.__init__r$r>c    Cs°t d|j¡g}|jD]X}|\}}}|dkrf||jkrfzt||ƒ|j|<Wntk
rdYqYnX| |¡qdd„|j ¡Dƒ|_t    |j||j|j
dt d|j¡dS)NzBuilding PYZ (ZlibArchive) %sr'cSsi|]\}}|t|ƒ“qSr))r)r*r$Úcoder)r)r-Ú
<dictcomp>œsz PYZ.assemble.<locals>.<dictcomp>)r?r%z5Building PYZ (ZlibArchive) %s completed successfully.) ÚloggerÚinfor$r>r?rÚ SyntaxErrorr<Úitemsrr%)rEÚ archive_tocrJr$rHr,r)r)r-ÚassembleŠs
 
 
 z PYZ.assemble)
Ú__name__Ú
__module__Ú __qualname__Ú__doc__r3r    r Ú_GUTSrTÚ __classcell__r)r)rKr-r!/s  Rýr!c s†eZdZdZdddddddddd    d
d œ Zd‡fdd„    Zdefdefdefdefdefdefdefdefdefdeff
Zdd„Z    ‡Z
S)ÚPKGzÀ
    Creates a CArchive. CArchive is the data structure that is embedded into the executable. This data structure allows
    to include various read-only data in a single-file deployment.
    ÚmÚsÚbÚzÚaÚxÚZÚdÚl) r'ÚPYSOURCEÚ    EXTENSIONr!r[r/ÚBINARYZZIPFILEÚ
EXECUTABLEÚ
DEPENDENCYÚSPLASHNFc     sœtƒ ¡t|ƒ|_||_||_|dkr@tj |j    ¡dd|_||_
||_ ||_ |pXg|_ ||_|    |_|
|_|jdkrttttttttdœ|_| ¡dS)a¡
        toc
            A TOC (Table of Contents) list.
        name
            An optional filename for the PKG.
        cdict
            Dictionary that specifies compression by typecode. For Example, PYZ is left uncompressed so that it
            can be accessed inside the PKG. The default uses sensible values. If zlib is not available, no
            compression is used.
        exclude_binaries
            If True, EXTENSIONs and BINARYs will be left out of the PKG, and forwarded to its container (usually
            a COLLECT).
        strip_binaries
            If True, use 'strip' command to reduce the size of binary files.
        upx_binaries
        Nrú.pkg)rfr/rgrhrer'rjr!)r2r3r r>Úcdictr$r5r6r7r8Úexclude_binariesÚstrip_binariesÚ upx_binariesÚ upx_excludeÚ target_archÚcodesign_identityÚentitlements_fileÚ
COMPRESSEDÚ UNCOMPRESSEDrD) rEr>r$rlrmrnrorprqrrrsrKr)r-r3¶s0
 
 
 
÷ z PKG.__init__r$rlr>rmrnrorprqrrrsc Cs¨t dtj |j¡¡g}g}|jD]0\}}}|dkrxtj |¡sxt|ƒs$t    rht
d|›d|›dƒ‚q$t  d||¡q$|dkrè|j rš|j  |||f¡nLt||j|j|j||j|j|j|dkd        }| |||j |d
¡|j|f¡q$|d kr| |d d
d f¡q$|dkr4| |||j |d
¡|j|f¡q$| |||j |d
¡|j|f¡q$tj t ¡¡}|jtddƒdt|j|||dt dtj |j¡¡dS)NzBuilding PKG (CArchive) %s)ÚOPTIONriúNon-existent resource ú, meant to be collected as r0ú>Ignoring non-existent resource %s, meant to be collected as %s)rgrfrf©ÚstripÚupxrpZdist_nmrqrrrsZstrict_arch_validationFrvÚÚo)rer'ér)Úkey)Ú
pylib_namez2Building PKG (CArchive) %s completed successfully.)rOrPr5r6Úbasenamer$r>ÚexistsrrÚ
ValueErrorÚwarningrmr;r<rrnrorprqrrrsrlr4Ú    xformdictrÚget_python_library_pathrCrr)rEZ bootstrap_tocrSÚ    dest_nameÚsrc_namer,rr)r)r-rTsLÿ ÷ $
 
$$z PKG.assemble)    NNFFFNNNN) rUrVrWrXr†r3r    r rYrTrZr)r)rKr-r[£sFõõ=ör[csÆeZdZdZ‡fdd„Zdefdefdefdefdefd    efd
efd efd efd efdefdefdefdefdefdefdefdefdefdefddeffZdd„Zd#dd„Z    dd „Z
d!d"„Z ‡Z S)$ÚEXEzd
    Creates the final executable of the frozen app. This bundles all necessary files together.
    c
s4ddlm‰tƒ ¡| dd¡|_| dd¡|_| dd¡|_| dd¡|_| d    d¡|_    | d
d ¡|_
| d d ¡|_ | d d ¡|_ | dd ¡|_ | dd¡|_| dg¡|_| dd¡|_| dg¡|_| dd ¡|_| dd¡|_| dd¡|_| dd¡|_| dd¡|_| dd ¡|_trr|jd krFdd l}| ¡|_n|jdksbtd|j›ƒ‚t d|j¡nd |_| dd ¡|_trœt d|j¡nd |_| dd ¡|_ˆdrÊ| d d¡|_ nd|_ |j rît!sît "d!¡d |_ |j r t!s t "d"¡d |_ |jr*t!s*t "d#¡g|_|j rNt!sNtsNt "d$¡d |_ |jrvt#j$ %ˆd%t#j$ &|j
¡¡|_
nt#j$ %ˆd&t#j$ &|j
¡¡|_
t!s t'rØ|j
 (d'¡s¼|j
d'7_
t#j$ )t#j$ &|j
¡¡d}nt#j$ &|j
¡}t#j$ %ˆd%|d(¡|_*g|_+|D]œ}t,|t-t.fƒrvt,|t-ƒrH|j+ /t#j$ &|j
¡|j
d)f¡n|j+ /t#j$ &|j
¡|j
d*f¡|j+ 0|j1¡n,t2 3|¡r|j+ 0|¡nt4d+t5|ƒ›ƒ‚q|jd k    rÊ|j+ /d,|jd-d.f¡|jrÞ|j+ /d/¡|jrò|j+ /d0¡|jr|j+ /d1¡‡fd2d3„‰|j rZ|j d4krZt,|j t6ƒrL‡fd5d6„|j Dƒ|_ nˆ|j ƒg|_ t!r¨|js€|jszt "d7¡d|_|j s¾|jr–d8}nd9}t#j$ %t#j$ 7t#j$ 7t8¡¡d:d;|¡|_ t#j$ %ˆd%ˆd<d=¡}t9 :||j |j|j|j¡|_ t#j$ &|j
¡d>}|js |j+ /||d?f¡|j r¨t,|j t;j<ƒr:nnt,|j t=t>t#j?fƒr”t#j$ @|j ¡svt#j$ %ˆd@|j ¡|_ t     dA|j ¡t; A|j ¡|_ nt4dBt5|j ƒ›ƒ‚tB|j+ƒ|_+tC|j+|j*| dCd ¡|j|j|j |j|j|j|jdD
|_D|jDj1|_1| EdEt!st'r d'nd-¡}    t#j$ &|    ¡|    dFfg|_F| G¡d S)Gañ
        args
            One or more arguments that are either an instance of `Target` or an iterable representing TOC list.
        kwargs
            Possible keyword arguments:
 
            bootloader_ignore_signals
                Non-Windows only. If True, the bootloader process will ignore all ignorable signals. If False (default),
                it will forward all signals to the child process. Useful in situations where for example a supervisor
                process signals both the bootloader and the child (e.g., via a process group) to avoid signalling the
                child twice.
            console
                On Windows or Mac OS governs whether to use the console executable or the windowed executable. Always
                True on Linux/Unix (always console executable - it does not matter there).
            disable_windowed_traceback
                Disable traceback dump of unhandled exception in windowed (noconsole) mode (Windows and macOS only),
                and instead display a message that this feature is disabled.
            debug
                Setting to True gives you progress messages from the executable (for console=False there will be
                annoying MessageBoxes on Windows).
            name
                The filename for the executable. On Windows suffix '.exe' is appended.
            exclude_binaries
                Forwarded to the PKG the EXE builds.
            icon
                Windows and Mac OS only. icon='myicon.ico' to use an icon file or icon='notepad.exe,0' to grab an icon
                resource. Defaults to use PyInstaller's console or windowed icon. Use icon=`NONE` to not add any icon.
            version
                Windows only. version='myversion.txt'. Use grab_version.py to get a version resource from an executable
                and then edit the output to create your own. (The syntax of version resources is so arcane that I would
                not attempt to write one from scratch).
            uac_admin
                Windows only. Setting to True creates a Manifest with will request elevation upon application start.
            uac_uiaccess
                Windows only. Setting to True allows an elevated application to work with Remote Desktop.
            embed_manifest
                Windows only. Setting to True (the default) embeds the manifest into the executable. Setting to False
                generates an external .exe.manifest file. Applicable only in onedir mode (exclude_binaries=True); in
                onefile mode (exclude_binaries=False), the manifest is always embedded in the executable, regardless
                of this option.
            argv_emulation
                macOS only. Enables argv emulation in macOS .app bundles (i.e., windowed bootloader). If enabled, the
                initial open document/URL Apple Events are intercepted by bootloader and converted into sys.argv.
            target_arch
                macOS only. Used to explicitly specify the target architecture; either single-arch ('x86_64' or 'arm64')
                or 'universal2'. Used in checks that the collected binaries contain the requires arch slice(s) and/or
                to convert fat binaries into thin ones as necessary. If not specified (default), a single-arch build
                corresponding to running architecture is assumed.
            codesign_identity
                macOS only. Use the provided identity to sign collected binaries and the generated executable. If
                signing identity is not provided, ad-hoc signing is performed.
            entitlements_file
                macOS only. Optional path to entitlements file to use with code signing of collected binaries
                (--entitlements option to codesign utility).
        rr"rmFÚbootloader_ignore_signalsÚconsoleTÚdisable_windowed_tracebackÚdebugr$NrÚversionÚmanifestÚembed_manifestÚ    resourcesr{rpÚruntime_tmpdirÚ
append_pkgÚ    uac_adminÚ uac_uiaccessÚargv_emulationrq>Úarm64Ú
universal2Úx86_64zUnsupported target arch: zEXE target arch: %srrzCode signing identity: %srsÚhasUPXr|z8Ignoring version information; supported only on Windows!z-Ignoring manifest; supported only on Windows!z.Ignoring resources; supported only on Windows!z3Ignoring icon; supported only on Windows and macOS!r&Údistpathz.exerkr!rjzInvalid argument type for EXE: zpyi-runtime-tmpdir r}rv)zpyi-bootloader-ignore-signalsr}rv)zpyi-disable-windowed-tracebackr}rv)zpyi-macos-argv-emulationr}rvcs&tj |¡r|Stj ˆd|¡SdS)NÚspecpath)r5r6Úisabsr9)r6r"r)r-Úmakeabss zEXE.__init__.<locals>.makeabsÚNONEcsg|] }ˆ|ƒ‘qSr)r))r*Zic)rŸr)r-Ú
<listcomp>sz EXE.__init__.<locals>.<listcomp>z6Ignoring embed_manifest=False setting in onefile mode!zicon-console.icozicon-windowed.icoÚ
bootloaderZimagesZspecnmz .exe.manifestú    .manifestrgrz"Loading version info from file: %rz,Unsupported type for version info argument: rl)    r$rlrmrnrorprqrrrsÚrunrh)Hr1r#r2r3r4rmr‹rŒrrŽr$rÚversrsrcrr‘r’r{rpr“r”r•r–r—rqrÚplatformÚmachinerBrOrPrrrsr|rr…r5r6r9r‚rÚendswithr7Úpkgnamer>Ú
isinstancer!rr<Úextendr;Ú    miscutilsÚ is_iterableÚ    TypeErrorÚtypeÚlistÚdirnameÚ__file__rZcreate_manifestrZ VSVersionInfoÚstrÚbytesÚPathLikeržZ load_version_info_from_text_filer r[ÚpkgÚ_bootloader_fileÚexefilesrD)
rEÚargsrFr¦Ú    base_nameÚargZicoÚfilenameZmanifest_filenameÚexerK)r#rŸr-r3Is8 
 
ÿ
 
 
 
 
          
$ÿ 
ö
z EXE.__init__r$rŒrŽrmrr¥r•r–rr‘r”r—rqrrrsr©r>r’r{r|)ÚmtmNr¸cCs¾tj |j¡s,t d|jtj |j¡¡dS|jsZtj |j    ¡sZt dtj |j    ¡¡dSt
  |||¡rldS|d}|t   |j¡kr–t d|j¡dS|t   |jj¡krºt d|j¡dSdS)Nz Rebuilding %s because %s missingTzRebuilding because %s missingr¾z(Rebuilding %s because mtimes don't matchz(Rebuilding %s because pkg is more recentF)r5r6rƒr$rOrPÚ tocbasenamer‚r”r©rÚ _check_gutsr¬Úmtimer¶r8)rEÚdataÚ
last_buildr¾r)r)r-rÀes zEXE._check_gutsNcCsVtstr|js|d}|jr$|d}|r0||}tj tddt|¡}t     
d|¡|S)zO
        Pick up the right bootloader file - debug, console, windowed.
        ÚwZ_dÚ PyInstallerr¢z Bootloader %s) rrrŒrŽr5r6r9rrrOrP)rEr½Ú    extensionZbootloader_filer)r)r-r·zszEXE._bootloader_filecCsddlm}tstr|jdn|j}t d|j¡tj     
|j¡rftj      |j¡rZt |jƒn t  |j¡tj     
tj     |j¡¡st tj     |j¡¡|jdd}tj     
|¡s²ttƒ‚t d|¡| ||¡t |d¡trLt |¡|jdkr
t d    ¡t ||j¡|jr*t d
¡t ||j¡t d t|jƒ¡|jD]â}| d ¡}tdt|ƒƒD]2}zt ||ƒ||<Wnt!k
rŽYnXq`|d}tj     "|¡s¼tj     #|d |¡}d}}}    t|ƒdkrÞ|d}t|ƒdkrô|d}t|ƒdkr
|d}    z.t $|||pdg|p&dg|    p0dg¡Wnêtj%j&k
r"}
zÆ|
j'dtj(kr~tj&d||ddWY¢œqB|rŠ|sžt &d¡WY¢|qBd||fkrÀt &d¡WY¢ZqBz t )||||g|    pØdg¡Wn0tj%j&k
rtj&d||||ddYnXW5d}
~
XYnXqB|j*rrt d¡|j+ ,|dg¡n&t-rrt d|j.¡t/j0||j.dd|j1rˆ|j2j} d} nŠ|j3sÔtj     #tj     |¡tj     4|j5¡¡} t d|j2j| ¡| |j2j| ¡n
t d¡|j2jd}t6|dƒ}| 7d¡W5QRX|} d } t8rnt d!| ¡d"d#d$| ›|g}t9j:|t9j;t9j<d%d&}|j=r.t>d'|j=›d(|j?›ƒ‚nÀt-ræt d)¡t/ @|¡t d*| ¡t6|d+ƒ,}t6| d,ƒ}tAjB||d-d.W5QRXW5QRXt d/¡t/ C|¡nHt d*| ¡t6|d+ƒ,}t6| d,ƒ}tAjB||d-d.W5QRXW5QRXtrlt d0¡t tjD Ed1tF F¡¡ƒ}tG H||¡tG I|¡ndt-rÐt/ JtK L¡¡}t/ J|¡}||kr´tjd5||žŽt/jM|f|žŽt d3¡t/ N||jO|jP¡t |d¡tQ R|¡|_S||jkrt T||j¡t d4|j¡dS)6Nrr"z.notanexecutablezBuilding EXE from %sézCopying bootloader EXE to %séír zCopying icon to EXEz"Copying version information to EXEzCopying %d resources to EXEú,rérÚ*z;Error while updating resources in %s from resource file %s!)Úexc_infoz(Resource type and/or name not specified!zdNo wildcards allowed for resource type and name when the source file does not contain any resources!z<Error while updating resource %s %s in %s from data file %s!zEmbedding manifest in EXEz"Converting EXE to target arch (%s)zBootloader EXE)Z display_namez PKG archivez-Copying stand-alone PKG archive from %s to %sz2Stand-alone PKG archive will be handled by COLLECTz.sigÚwbsMEI
zPKG sideload signaturez)Appending %s to custom ELF section in EXEZobjcopyz --add-sectionzpydata=T)ÚstderrÚstdoutÚuniversal_newlineszobjcopy Failure: ú zRemoving signature(s) from EXEzAppending %s to EXEÚabÚrbé©Úlengthz#Fixing EXE headers for code signingzFixing EXE headersÚSOURCE_DATE_EPOCHúÌRewriting the executable's macOS SDK version (%d.%d.%d) to match the SDK version of the Python library (%d.%d.%d) in order to avoid inconsistent behavior and potential UI issues in the frozen application.zRe-signing the EXEz,Building EXE from %s completed successfully.)rØ)Ur1r#rrr$rOrPr¿r5r6rƒÚisdirrÚremover±Úmakedirsr¸Ú
SystemExitÚ_MISSING_BOOTLOADER_ERRORMSGÚ    _copyfileÚchmodrZRemoveAllResourcesrZ    CopyIconsr¥rZ write_version_info_to_executableÚlenr’ÚsplitÚrangeÚintr„ržr9ZUpdateResourcesFromResFileZ
pywintypesÚerrorr¹ZERROR_BAD_EXE_FORMATZUpdateResourcesFromDataFiler‘rZupdate_resourcesrrqÚosxutilsZbinary_to_target_archr”r¶rmr‚r©ÚopenÚwriterÚ
subprocessr¤ÚSTDOUTÚPIPEÚ
returncodeÚ SystemErrorrÏZremove_signature_from_binaryÚshutilÚ copyfileobjZfix_exe_for_code_signingÚenvironr4Útimer Zset_exe_build_timestampZupdate_exe_pe_checksumZget_macos_sdk_versionrr‡Zset_macos_sdk_versionZ sign_binaryrrrsr¬rÁr¾Úrename)rEr#Z
build_namer½ÚresÚiZresfileÚrestypeÚresnameZreslangÚexcZ append_fileZ append_typeZpkg_dstZ pkgsig_fileÚfÚcmdÚpÚoutfÚinfZbuild_timestampZ pylib_versionZ exe_versionr)r)r-rTs       
 
 
 
 
 
 
 
ÿü
 
 
ÿ
 ú"    
 
 
 
 
   $
    $
 
 
ÿý
   z EXE.assemblec
Cs@t|dƒ,}t|dƒ}tj||ddW5QRXW5QRXdS)NrÓrÍrÔrÕ)rærírî)rEÚinfileÚoutfileZinfhZoutfhr)r)r-rÞ[s  z EXE._copyfile)N) rUrVrWrXr3r    r rYrÀr·rTrÞrZr)r)rKr-rŠEs@ è
OrŠcs4eZdZdZ‡fdd„ZdZdd„Zdd„Z‡ZS)    ÚCOLLECTzM
    In one-dir mode creates the output folder with all necessary files.
    cs˜ddlm}tƒ ¡| dd¡|_| dg¡|_d|_d|_d|_    d|_
|drb| d    d¡|_ nd|_ t j  |d
t j  | d ¡¡¡|_g|_|D]ê}t|tƒrR|j t j  |j¡|jd f¡|j |j¡|j|_|j|_|j    |_    |j
|_
|jD]2\}}}|t j  |j¡d krö|j |||f¡qö|js~|j t j  |j¡|jdf¡q”t |¡rl|j |¡q”tdt|ƒ›ƒ‚q”t|jƒ|_| ¡dS)a
        args
            One or more arguments that are either an instance of `Target` or an iterable representing TOC list.
        kwargs
            Possible keyword arguments:
 
            name
                The name of the directory to be built.
        rr"r{FrpTNr›r|rœr$rhr£r[z#Invalid argument type for COLLECT: )r1r#r2r3r4rnrprŒrqrrrsror5r6r9r‚r$r>rªrŠr<r«r;r”r©r¬r­r®r¯r rD)rEr¹rFr#r»rˆr‰r,rKr)r-r3es>
 
"    zCOLLECT.__init__))r>NcCsdS)NTr))rErÂrÃr)r)r-rÀ¦szCOLLECT._check_gutsc Cs®t|jƒt d|j¡|jD]z\}}}|dkrrtj |¡srt    |ƒst
rbt d|›d|›dƒ‚qt  d||¡qtj tj |¡ tj¡ks˜tj |¡r¤td|ƒ‚tj |j|¡}tj |¡}tj |¡sØt |¡ntj |¡sôtd|›d    ƒ‚|d
kr(t||j|j|j||j|j|j|d kd     }|dkr†tj |¡sPt d |›dƒ‚t
rztj |¡rzt d|›d|›dƒ‚t  ||¡|d
krt !|d¡qt d|j¡dS)NzBuilding COLLECT %srirwrxr0ryzUSecurity-Alert: attempting to store file outside of the dist directory: %r. Aborting.z+Pyinstaller needs to create a directory at z/, but there already exists a file at that path!)rfrgrfrzz    Resource z is not a valid file!z6Attempting to collect a duplicated file into COLLECT: z (type: ú)rÈz+Building COLLECT %s completed successfully.)"r r$rOrPr¿r>r5r6rƒrrr„r…ÚpardirÚnormpathráÚsepržrÜr9r±rÛrÙrrnrorprqrrrsÚisfileríÚcopy2rß)rErˆr‰r,Ú    dest_pathÚdest_dirr)r)r-rTªs`
ÿ&ÿ    
ÿ
÷
ÿ zCOLLECT.assemble)    rUrVrWrXr3rYrÀrTrZr)r)rKr-rþas
 <rþc@s eZdZdZdd„Zdd„ZdS)ÚMERGEa
    Given Analysis objects for multiple executables, replace occurrences of data and binary files with references to the
    first executable in which they occur. The actual data and binary files are then collected only once, thereby
    reducing the disk space used by multiple executables. Every executable (even onedir ones!) obtained from a
    MERGE-processed Analysis gains onefile semantics, because it needs to extract its referenced dependencies from other
    executables into temporary directory before they can run.
    c    Gsdi|_|D]T\}}}| |j|¡\}}| |j|¡\}}t|ƒ|_t|ƒ|_|j||7_q
dS)a
        args
            Dependencies as a list of (analysis, identifier, path_to_exe) tuples. `analysis` is an instance of
            `Analysis`, `identifier` is the basename of the entry-point script (without .py suffix), and `path_to_exe`
            is path to the corresponding executable, relative to the `dist` directory (without .exe suffix in the
            filename component). For onefile executables, `path_to_exe` is usually just executable's base name
            (e.g., `myexecutable`). For onedir executables, `path_to_exe` usually comprises both the application's
            directory name and executable name (e.g., `myapp/myexecutable`).
        N)Ú _dependenciesÚ _process_tocÚbinariesÚdatasr r;)    rEr¹ZanalysisÚ
identifierÚ path_to_exer
Z binaries_refsr Z
datas_refsr)r)r-r3ìs
    
 
zMERGE.__init__c
Csªg}g}|D]”}|\}}}||jkrHt d||¡||j|<| |¡q tj |j|tj |¡¡}    |     |¡r€t d|||    ¡q t d|||    ¡| ||    df¡q ||fS)Nz"Adding dependency %s located in %szKIgnoring self-reference of %s for %s, located in %s - duplicated TOC entry?z7Referencing %s to be a dependency for %s, located in %sri)    rrOrŽr<r5r6Úrelpathr±r¨)
rEr>r Ztoc_keepZtoc_refsrJrˆr‰r,Zdep_pathr)r)r-r     s(
 
 
 
þzMERGE._process_tocN)rUrVrWrXr3r    r)r)r)r-räsrFTzàFatal error: PyInstaller does not include a pre-compiled bootloader for your
platform. For more details and instructions how to build the bootloader see
<https://pyinstaller.readthedocs.io/en/stable/bootloader-building.html>)BrXr5rèrðríÚoperatorrrÅrrrÚloggingZPyInstaller.archive.writersrrZPyInstaller.building.datastructrr    r
r ZPyInstaller.building.utilsr r rrrrrZPyInstaller.building.splashrZPyInstaller.compatrrrrrZPyInstaller.dependrZPyInstaller.depend.analysisrZPyInstaller.depend.utilsrZPyInstaller.utils.miscÚutilsÚmiscr¬Ú    getLoggerrUrOZPyInstaller.utils.win32rrrrr ZPyInstaller.utils.osxZosxrår!r[rŠrþrrurtrÝr)r)r)r-Ú<module> sF  $    
t# H