hyb
2026-01-30 44480e71b27aa9d4cb8441f50c873f1b110e9691
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
Ë
hñúh|$ãót—dZddlZddlZddlZddlmZddlmZddl    m
Z
m Z ddl m Z eje«ZdZdZdZGd    „d
«ZGd „d e«ZGd „de«ZGd„de«ZGd„de«ZGd„d«Zdd„Zd„Zedk(r,ddlZej:dZej:ddZeee«yy)ao
The code in this module supports the --icon parameter on Windows.
(For --icon support under macOS, see building/osx.py.)
 
The only entry point, called from api.py, is CopyIcons(), below. All the elaborate structure of classes that follows
is used to support the operation of CopyIcons_FromIco(). None of these classes and globals are referenced outside
this module.
éN)Úconfig)Ú
pywintypesÚwin32api)Únormalize_icon_typeééécó0—eZdZd„Zd„Zd„Zd„Zd„Zd„Zy)Ú    Structurecó—tj|j«x}|_t    tj
|jd|z««|_ix}|_t|j«D]
\}}|||<Œ y)Nó)
ÚstructÚcalcsizeÚ_format_Ú _sizeInBytesÚlistÚunpackÚ_fields_Ú    _indexes_Ú    enumerateÚ_names_)ÚselfÚsizeÚindexesÚiÚnms     úOH:\Change_password\venv_build\Lib\site-packages\PyInstaller/utils/win32/icon.pyÚ__init__zStructure.__init__%sl€Ü#)§?¡?°4·=±=Ó#AÐAˆˆtÔ ÜœVŸ]™]¨4¯=©=¸'ÀD¹.ÓIÓJˆŒ Ø#%Ð%ˆ$”.ܘtŸ|™|Ó,ò    ‰EˆAˆr؈GBŠKñ    óc    óâ—tjd|«|jD]5}|jd«rŒtjd|t    ||««Œ7tjd«y)Nz
DUMP of %sÚ_z    %20s = %sÚ)ÚloggerÚinforÚ
startswithÚgetattr)rÚnames  rÚdumpzStructure.dump,sU€Ü ‰ L $Ô'Ø—L‘Lò    DˆDØ—?‘? 3Õ'Ü— ‘ ˜K¨¬w°t¸TÓ/BÕCð    Dô     ‰ Brcó´—||jvr|j|}|j|S    |j|S#t$r}t |«|‚d}~wwxYw©N)rrrÚ__dict__ÚKeyErrorÚAttributeError)rr'ÚindexÚes    rÚ __getattr__zStructure.__getattr__3s\€Ø 4—<‘<Ñ Ø—N‘N 4Ñ(ˆEØ—=‘= Ñ'Ð 'ð    .Ø—=‘= Ñ&Ð &øÜò    .Ü  Ó&¨AÐ -ûð    .ús®=½    AÁ AÁAcó|—||jvr|j|}||j|<y||j|<yr*)rrrr+)rr'Úvaluer.s    rÚ __setattr__zStructure.__setattr__<s8€Ø 4—<‘<Ñ Ø—N‘N 4Ñ(ˆEØ#(ˆDM‰M˜%Ò  à"'ˆDM‰M˜$Ò rcóV—tj|jg|j¢­ŽSr*)rÚpackrr©rs rÚtostringzStructure.tostringCs€Ü{‰{˜4Ÿ=™=Ð9¨4¯=©=Ò9Ð9rcó–—|j|j«}ttj|j
|««|_yr*)Úreadrrrrrr)rÚfileÚdatas   rÚfromfilezStructure.fromfileFs1€Øy‰y˜×*Ñ*Ó+ˆÜœVŸ]™]¨4¯=©=¸$Ó?Ó@ˆ rN)    Ú__name__Ú
__module__Ú __qualname__rr(r0r3r7r<©rrr r $s!„òòò.ò(ò:óArr có—eZdZdZdZy)Ú ICONDIRHEADER©Ú
idReservedÚidTypeÚidCountÚhhhN©r=r>r?rrr@rrrBrBKó „Ø/€G؁HrrBcó—eZdZdZdZy)Ú ICONDIRENTRY)ÚbWidthÚbHeightÚ bColorCountÚ    bReservedÚwPlanesÚ    wBitCountÚ dwBytesInResÚ dwImageOffsetÚbbbbhhiiNrHr@rrrKrKPs „Øx€G؁HrrKcó—eZdZdZdZy)Ú
GRPICONDIRrCrGNrHr@rrrVrVUrIrrVcó—eZdZdZdZy)ÚGRPICONDIRENTRY)rLrMrNrOrPrQrRÚnIDÚbbbbhhihNrHr@rrrXrXZs „Øn€G؁HrrXcó —eZdZd„Zd„Zdd„Zy)ÚIconFilecó~—||_    t|jd«}|5g|_g|_t «x}|_|j|«t|j«D]8}t«}|j|«|jj|«Œ:|jD]R}|j|jd«|j
j|j|j ««ŒT    ddd«y#t$rtd|j›d«‚wxYw#1swYyxYw)NÚrbz ERROR: Unable to open icon file ú!r)ÚpathÚopenÚOSErrorÚ
SystemExitÚentriesÚimagesrBÚheaderr<ÚrangerFrKÚappendÚseekrSr9rR)rr`r:rfrÚentryr/s       rrzIconFile.__init__as€ØˆŒ    ð    N䘟    ™     4Ó(ˆDð
ñ     >؈DŒL؈DŒKÜ#0£?Ð 2ˆFT”[Ø O‰O˜DÔ !ܘ6Ÿ>™>Ó*ò +Ü$›Ø—‘˜tÔ$Ø— ‘ ×#Ñ# EÕ*ð +ð—\‘\ò >Ø—    ‘    ˜!Ÿ/™/¨1Ô-Ø— ‘ ×"Ñ" 4§9¡9¨Q¯^©^Ó#<Õ=ñ >÷     >ð     >øô    ò    NôÐ?ÀÇ    Á    ¸{È!ÐLÓMÐ Mð    Nú÷     >ð     >ús‰D ¡C"D3Ä #D0Ä3D<có6—|jj«Sr*)rfr7r6s rÚ grp_icon_dirzIconFile.grp_icon_dirws€Ø{‰{×#Ñ#Ó%Ð%rc
óԗd}|jD]V}t«}|jddD]}t||t    ||««Œ||_|dz}||j «z}ŒX|S)Nréÿÿÿÿé)rdrXrÚsetattrr&rYr7)rÚidr;rjr/Úns      rÚgrp_icondir_entrieszIconFile.grp_icondir_entrieszsu€ØˆØ—\‘\ò    'ˆEÜÓ!ˆAØ—Y‘Y˜s ^ò 1Ü˜˜1œg e¨QÓ/Õ0ð 1àˆAŒEؐa‘ˆBؘ!Ÿ*™*›,Ñ&‰Dð     'ðˆ rN©ro)r=r>r?rrlrsr@rrr\r\`s„ò>ò,&ô    rr\roc    óB—tt|«}tjd|«t    j
|d«}d}t |«D]½\}}|j«}||j|«z}t    j|t|dz|«tjd|dzt|««|jD]C}t    j|t||«tjd|t|««|dz}ŒEŒ¿t    j|d«y)zà
    Use the Win API UpdateResource facility to apply the icon resource(s) to the .exe file.
 
    :param str dstpath: absolute path of the .exe file being built.
    :param str srcpath: list of 1 or more .ico file paths
    úCopying icons from %srroz/Writing RT_GROUP_ICON %d resource with %d bytesz)Writing RT_ICON %d resource with %d bytesN)Úmapr\r#ÚdebugrÚBeginUpdateResourcerrlrsÚUpdateResourceÚ RT_GROUP_ICONÚlenreÚRT_ICONÚEndUpdateResource)    ÚdstpathÚsrcpathrqÚiconsÚhdstÚiconidrÚfr;s             rÚCopyIcons_FromIcor…†sû€ô ”˜'Ó "€EÜ
‡LLÐ(¨'Ô2ä × 'Ñ '¨°Ó 3€Dà €Fô˜%Ó ò ‰ˆˆ1؏~‰~ӈؐa×+Ñ+¨FÓ3Ñ3ˆÜ×Ñ ¤m°Q¸±U¸DÔA܏ ‰ ÐFÈÈAÉÌsÐSWËyÔYØ—H‘Hò     ˆDÜ × #Ñ # D¬'°6¸4Ô @Ü L‰LÐDÀfÌcÐRVËiÔ Xؘa‘Z‰Fñ     ð  ô ×јt QÕ'rc
ó„—t|ttjf«r|g}|Dcgc] }t|«‘Œ}}d„}t    t ||««}t |«dkDrFg}|D]3}|jt|dddtjd««Œ5t||«S|d\}}t|ddtjd«}tjj|«d}|j«dk(r t||g«S|tj!d
||«ntj!d |«    t#j$|dt&«}t#j4|d«}
|€t#j6|t8«d} n&|dk\rt#j6|t8«|} n| } t#j:|t8| «} t#j<|
t8| | «t#j6|t>«D]9} t#j:|t>| «} t#j<|
t>| | «Œ;t#j@|«t#jB|
d«y    cc}w#t(j*$r5}    t-d j/||    j0|    j2««‚d    }    ~    wwxYw) aÇ
    Called from building/api.py to handle icons. If the input was by --icon on the command line, srcpath is a single
    string. However, it is possible to modify the spec file adding icon=['foo.ico','bar.ico'] to the EXE() statement.
    In that case, srcpath is a list of strings.
 
    The string format is either path-to-.ico or path-to-.exe,n for n an integer resource index in the .exe. In either
    case, the path can be relative or absolute.
    c󈗠   |jd«\}}|j«t|«fS#t$r|dfcYSwxYw)zv
        Convert "pathname" to tuple ("pathname", None)
        Convert "pathname,n" to tuple ("pathname", n)
        ú,N)ÚsplitÚstripÚintÚ
ValueError)Úsr€r.s   rÚsplitterzCopyIcons.<locals>.splitter²sE€ð
    ØŸW™W S›\‰NˆGUØ—=‘=“?¤C¨£JÐ.Ð .øÜò    Ød7ŠNð    ús‚.1± AÁAror)ÚicorÚworkpath)Úexerz.icoNzCopying icon from %s, %drvz9ERROR: Unable to load icon file {}
    {} (Error code {}))"Ú
isinstanceÚstrÚosÚPathLikerrwr|rhrrÚCONFr…r`ÚsplitextÚlowerr#rxrÚ LoadLibraryExÚLOAD_LIBRARY_AS_DATAFILErÚerrorrcÚformatÚstrerrorÚwinerrorryÚEnumResourceNamesr{Ú LoadResourcerzr}Ú FreeLibraryr~)rr€r`rŽÚsrcsrr.ÚsrcextÚhsrcÚW32Er‚Úgrpnamer;Úiconnames              rÚ    CopyIconsr¨¢sw€ô'œC¤§¡Ð-Ô.à)ˆà%,Ö-˜TŒs4yÐ-€GÐ-ò    ô”3x Ó)Ó*€Gä
ˆ7ƒ|aÒð
ˆØò    ]ˆAØ K‰KÔ+¨A¨a©D°(¸EÄ6Ç;Á;ÈzÑCZÓ[Õ \ð    ]ä  ¨$Ó/Ð/ð˜Q‘ZN€GˆUô" '¨>¸5Ä&Ç+Á+ÈjÑBYÓZ€Gä W‰W× Ñ ˜gÓ & qÑ )€Fð‡||ƒ~˜ÒÜ  ¨7¨)Ó4Ð4ð Ð܏ ‰ Ð/°¸%Õ@ä ‰ Ð,¨gÔ6ð    
ô×%Ñ% g¨qÔ2JÓKˆô × 'Ñ '¨°Ó 3€DØ €}Ü×,Ñ,¨T´=ÓAÀ!ÑD‰Ø    !ŠÜ×,Ñ,¨T´=ÓAÀ%ÑH‰à&ˆÜ ×  Ñ   ¤}°gÓ >€DÜ ×јD¤-°¸$Ô?Ü×.Ñ.¨t´WÓ=ò?ˆÜ×$Ñ$ T¬7°HÓ=ˆÜ×Ñ ¤g¨x¸Õ>ð?ô ×јÔÜ ×јt QÕ'ùòG.øôb × Ñ ò
äØ H× OÑ OÐPWÐY]×YfÑYfÐhl×huÑhuÓ vó
ð    
ûð
ús¨I2ÅI7É7J?Ê
0J:Ê:J?Ú__main__rt) Ú__doc__r”Úos.pathrÚPyInstaller.logÚlogÚloggingÚ PyInstallerrÚPyInstaller.compatrrÚPyInstaller.building.iconrÚ    getLoggerr=r#r}r{ršr rBrKrVrXr\r…r¨ÚsysÚargvrr€r@rrú<module>rµsÏðñó
ÛÛ å!Ýß3Ý9à    ˆ×    Ñ    ˜8Ó    $€à
€Ø€ ØÐ÷$Añ$AôNIôô
9ôô
ôô
iô÷ #ñ#óL(ò8Q(ðh ˆzÒÛàh‰hq‰k€G؏h‰hqrˆl€GÙ ˆgwÕð r