
    iA                         S SK r S SKrS SKrS SKrS SKrS SKJr  S SKJ	r	J
r
  S SKJrJrJr  S SKJrJrJr  S SKJrJr  S SKJr  S SKJs  Jr  \(       a	  S SKJs  Jr  SrS	r  " S
 S\5      r!g)    N)log)COLLECTEXE)Targetloggernormalize_toc)_check_path_overlap_rmtreeprocess_collected_binary)	is_darwinstrict_collect_mode)normalize_icon_type__dot__zOnefile mode in combination with macOS .app bundles (windowed mode) don't make sense (a .app bundle can not be a single file) and clashes with macOS's security. Please migrate to onedir mode. This will become an error in v7.0.c                   n   ^  \ rS rSrU 4S jrSrS r\S 5       r\S 5       r	S r
S r\S	 5       rS
rU =r$ )BUNDLE(   c                 
  > SSK Jn  U HV  n[        U[        5      (       d  M  UR                  (       a  M-  [
        R                  " [        R                  [        5        MX     [        (       d  g UR                  S5      U l        U R                  (       df  [        R                  R                  [        R                  R!                  [        R                  R!                  ["        5      5      SSS5      U l        O`[        R                  R%                  U R                  5      (       d2  [        R                  R                  US   U R                  5      U l        [&        T
U ]Q  5         UR                  SS 5      U l        [        R                  R-                  U R*                  5      n[        R                  R                  US	   U5      U l        [        R                  R/                  U5      S   U l        [3        UR                  S
S5      5      U l        / U l        SU l        SU l        SU l        S U l        S U l         S U l!        UR                  S5      U l"        U RD                  (       d  U R0                  U l"        UR                  SS 5      U l#        U GH	  n[        U[        5      (       a  U R6                  RI                  [        R                  R-                  UR*                  5      UR*                  S45        U R6                  RK                  URL                  5        UR8                  U l        UR:                  U l        URN                  U l'        UR<                  U l        UR>                  U l        UR@                  U l         URB                  U l!        GM  [        U[P        5      (       a  U R6                  RK                  UR6                  5        URR                  U l        URT                  U l        URN                  U l'        UR<                  U l        UR>                  U l        UR@                  U l         URB                  U l!        GM  [V        RX                  " U5      (       a  U R6                  RK                  U5        GM  [[        S[]        U5      < 35      e   U R6                   H  u  pxn	U	S:X  d  M  Xl/          O   [a        S5      e[c        U R6                  5      U l        U Re                  5         g )Nr   CONFicon
bootloaderimageszicon-windowed.icnsspecpathnamedistpathversionz0.0.0FTbundle_identifier
info_plist
EXECUTABLEz"Invalid argument type for BUNDLE: z%No EXECUTABLE entry found in the TOC!)3PyInstaller.configr   
isinstancer   exclude_binariesr   r   loggingDEPRECATIONWINDOWED_ONEFILE_DEPRCATIONr   getr   ospathjoindirname__file__isabssuper__init__r   basenamesplitextappnamestrr   tocstripupxconsoletarget_archcodesign_identityentitlements_filer   r   appendextenddependenciesupx_excluder   strip_binariesupx_binaries	miscutilsis_iterable	TypeErrortypeexename
ValueErrorr   __postinit__)selfargskwargsr   item	base_namearg	dest_namesrc_nametypecode	__class__s             EC:\des-py\RoboSAPF\venv\Lib\site-packages\PyInstaller\building\osx.pyr.   BUNDLE.__init__)   sy   +D$$$T-B-B-B

7..0KL 
 y JJv&	yy 9:L(ThDI
 77==++GGLLj)9499E	 JJvt,	GG$$TYY/	GGLLj!19=	ww''	215 6::i9:
!%!% "(,?!@%%%)\\D" **\48C#s##!1!1#((!;SXX| TU 0 01 YY
77#&?? "{{#&?? ),)>)>&),)>)>&C))( //
++#&?? "{{#&?? ),)>)>&),)>)>&&&s++$"DT#YM RSS; B .2XX)I<'' .6
 DEE !*    ))r3   Nc                     g)NT )rG   data
last_builds      rQ   _check_gutsBUNDLE._check_guts   s    rS   c                     [        U R                  5       H'  nUR                  R                  S5      (       d  M%  Us  $    g )Nz
.framework)reversedparentsr   endswith)	dest_pathparents     rQ   _is_framework_fileBUNDLE._is_framework_file   s8     y001F{{##L11 2 rS   c                 &   [         R                  R                  " / [        R                  " U 5      R                  S5      R                  R                   Vs/ s H  nSPM     snQ[        R                  " U5      R                  S5      P76 $ s  snf )NContentsz..)r'   r(   r)   pathlibPurePathrelative_tor_   parts)crosslink_locationcrosslink_targetlevels      rQ   _compute_relative_crosslink"BUNDLE._compute_relative_crosslink   sx    
 ww|| 
 ' 0 01C D P PQ[ \ c c i ij iud ij
-.:::F
 	
js   B
c                    / n[        5       nSnSnSnSn[        R                  " S5      nU H  u  pn[        R                  " U	5      nU R                  U5      nU(       a  XsU'   SnUR                  nOUR                  nUS:X  a  SnU HF  nX:X  a  M
  US:X  a  UOUnUR                  UU5      nUU:X  a  US:X  a  UnUU:X  a  US:X  a  UnUX?'   MH     M     [        R                  " S	U5        UR                  5        GH  u  nnUU:X  a  M  UR                  nX:H  =(       d    UR                  U5      U:H  nU(       d  MC  [        R                  " S
UU5        UU:X  aA  [        R                  R                  SU5      n[        R                  R                  SU5      nO@[        R                  R                  SU5      n[        R                  R                  SU5      nU R                  UU5      nUR                  UUS45        GM     UR                  5        H  u  nnUU:X  a  M  UU:X  a  M  SUR                  ;  a  M(  [        R                  " S[!        U5      U5        UR                  [        R                  R                  SU5      UR                  R#                  S[$        5      S45        M     U GH(  u  np[        R                  " U5      nUS:X  a5  [        R                  R                  SU5      nUR                  UX45        MX  US:X  a{  [        R                  R                  SU5      nUR                  UX45        [        R                  R                  SU5      nU R                  UU5      nUR                  UUS45        M  U R                  U5      (       a  SnS nOUS:X  a  SnSnOSnSnSnUb+  UR                  nX:H  =(       d    UR                  U5      U:H  nUS:X  al  U(       ae  UR                  [        R                  R                  UU5      X45        UR                  [        R                  R                  UU5      X45        GM  [        R                  R                  UU5      nUR                  UX45        U(       d  GM  [        R                  R                  UU5      nU R                  UU5      nUR                  UUS45        GM+     / nU GH;  u  pn[        R                  " U	5      nUR&                  S   S:X  a(  UR&                  S   S:X  a  UR                  XU45        MX  U R                  U5      nU(       a  UR                  nUR)                  U5      nOUR                  nUR                  n[        R                  " / UR&                  S S QUR&                  SS   Vs/ s H  nUR#                  S[$        5      PM     snQUP76 n [!        U 5      n!U U:w  a  [        R                  " SU	U!5        UR                  U!X45        GM>     Un[+        [-        U5      5      nU$ s  snf )Nz	MIXED-DIRzDATA-DIRz
BINARY-DIRzFRAMEWORK-DIR.BINARY	EXTENSIONDATAzDirectory classification: %rz%Cross-linking directory %r of type %rzContents/ResourcesContents/FrameworksSYMLINKzKCreating symlink to work around the dot in the name of directory %r (%s)...r   zContents/MacOSPKGFr   rc      	Resources   zSanitizing dest path: %r -> %r)dictrd   re   r`   r\   r&   r   debugitemsr_   r'   r(   r)   rk   r:   r   r2   replaceDOT_REPLACEMENTrg   rf   sortedr   )"rG   r3   
bundle_tocdirectory_types_MIXED_DIR_TYPE_DATA_DIR_TYPE_BINARY_DIR_TYPE_FRAMEWORK_DIR_TYPE_TOP_LEVEL_DIRrM   rN   rO   r^   framework_dirparent_dirs
parent_dirdirectory_typedirectory_pathrequires_crosslinksymlink_srcsymlink_destsymlink_reforig_dest_nameorig_dest_path	file_destfile_base_dircrosslink_base_dirsanitized_tocframework_pathparent_pathremaining_pathpartsanitized_dest_pathsanitized_dest_names"                                     rQ   _process_bundle_tocBUNDLE._process_bundle_tocB  s   
 &%#'- ))#.-0)I((3I 33I>M1D.#+33'//{*'H *
 /5=5I!1~!0!4!4Z!P!^3H8L%4N!%55(f:L%4N.<+ *# .1B 	3_E
 />.C.C.E*NN 0 (..J!+!=!sATATU_A`dsAs%LL@.R`a
 / ggll+?P!ww||,A>R ggll+@.Q!ww||,@.Q::<UK|[)DE5 /FL />.C.C.E*NN!44 / .---LL]_bcq_r 2NC##++CA + /F< 36.NH$--n=N <'GGLL)9>J	!!9h"AB
 U"GGLL)=~N	!!9h"AB
  "ww||,<nM">>|YW!!<i"HI
 &&~66 !6%)"V# 4%:" !6%9" "'!-+22
%/%A%w_EXEXYcEdhwEw"
 9$);!!277<<~#NPX"cd!!277<<0BN#SU]"hi ]NCIy(=> "!!ww||,>O">>|YW!!<i"HIG 36V -7)I((3I q!Z/IOOA4F+4U$$i8%DE "44Y?N,33!*!6!6{!C'..!*")"2"2 #""2A&#ALARARSTSUAVWAV$,,sO4AVW# #
 #&&9":"i/=yJ]^  "5x!JK9 .8< #
 M*56
 Xs    Yc                    SSK Jn  [        U R                  5      (       aC  [        R
                  R                  U R                  5      (       a  [        U R                  5        [        R                  " SU R                  5        [        R                  " [        R
                  R                  U R                  SS5      5        [        R                  " [        R
                  R                  U R                  SS5      5        [        R                  " [        R
                  R                  U R                  SS5      5        [        U R                  SS	US
   5      U l        [        R
                  R                  U R                  5      U l        [         R"                  " U R                  [        R
                  R                  U R                  SS[        R
                  R%                  U R                  5      5      5        U R&                  U R&                  U R(                  [        R
                  R%                  U R*                  5      [        R
                  R%                  U R                  5      SSU R,                  S.nU R.                  (       a  SUS'   OSUS'   [1        U R2                  [4        5      (       a,  U R2                  (       a  UR7                  U R2                  5        [        R
                  R                  U R                  SS5      n[9        US5       n[:        R<                  " X$5        S S S 5        U R?                  U R@                  5      n[B        RD                  " S5      nU GH  u  pxn	[        R
                  R                  U R                  U5      n
[        R
                  RG                  U
5      n [        R                  " USS9  U	S;   a~  [M        [B        RD                  " U5      RO                  U5      5      n[Q        UUU RR                  U RT                  U RV                  U RX                  U RZ                  U R\                  U	S:H  S9	nU	S:X  a  [        R^                  " X5        OU	S:w  d   S5       e[        R
                  Ra                  U5      (       d  [c        SU< S35      e[d        (       a6  [        R
                  Rg                  U
5      (       a  [c        SU S U	 S!35      e[         R"                  " X5        U	S";   d6  U	S#:X  d  GM  [        Rh                  " U[        Rj                  5      (       d  GM  [        Rl                  " U
S$5        GM     [        R                  " S%5         [n        Rp                  " U R                  U RZ                  U R\                  SS&9  [        R                  " S,U R                  5        [        Rt                  Rw                  S-S(5      S(:w  aS  [        R                  " S.U R                  5        U R}                  U R                  5        [        R                  " S/5        g g ! , (       d  f       GN= f! [H         a    [K        SU< S35      ef = f! [r         ah  n[        Rt                  Rw                  S'S(5      S(:X  a3  [        Rx                  " S)U5        [        Rx                  " S*5         S nAGN*[{        S+5      UeS nAff = f)0Nr   r   zBuilding BUNDLE %src   MacOSrv   
Frameworks)icnsr   workpathz6.0APPL)CFBundleDisplayNameCFBundleNameCFBundleIdentifierCFBundleExecutableCFBundleIconFileCFBundleInfoDictionaryVersionCFBundlePackageTypeCFBundleShortVersionStringTLSBackgroundOnlyNSHighResolutionCapablez
Info.plistwbrr   )exist_okz2ERROR: Pyinstaller needs to create a directory at z/, but there already exists a file at that path!)rp   ro   rp   )	use_stripuse_upxr=   r7   r8   r9   strict_arch_validationrs   
DEPENDENCYz5MERGE DEPENDENCY entries are not supported in BUNDLE!z	Resource z is not a valid file!z5Attempting to collect a duplicated file into BUNDLE: z (type: ))rp   ro   r   rq   i  zSigning the BUNDLE...)deep(PYINSTALLER_STRICT_BUNDLE_CODESIGN_ERROR0z"Error while signing the bundle: %sz*You will need to sign the bundle manually!zFailed to codesign the bundle!z*Building BUNDLE %s completed successfully.#PYINSTALLER_VERIFY_BUNDLE_SIGNATUREz$Verifying signature for BUNDLE %s...zBUNDLE verification complete!)?r    r   r	   r   r'   r(   isdirr
   r   infotocbasenamemakedirsr)   r   r   abspathshutilcopyfiler/   r1   r   rD   r   r6   r!   r   rx   updateopenplistlibdumpr   r3   rd   re   r*   FileExistsError
SystemExitr2   rf   r   r4   r5   r=   r7   r8   r9   symlinkisfilerE   r   existsaccessX_OKchmodosxutilssign_binary	Exceptionenvironr&   warningRuntimeErrorverify_bundle_signature)rG   r   info_plist_dictplist_filenameplist_fhr~   CONTENTS_FRAMEWORKS_PATHrM   rN   rO   r^   dest_dirr   es                 rQ   assembleBUNDLE.assemble*  s   +tyy))bggmmDII.F.FDII($*:*:; 	BGGLLJ@A
BGGLLJDE
BGGLLJEF (		9fd:FVW	 GGOODII.	 			277<<		:{TVT[T[TdTdeienenTo#pq $(<< LL #'"8"8"$''"2"24<<"@ " 0 0 ;-2#)*.,,%
, <<26O./ :>O56 doot,,""4??3dii\J.$'8MM/4 ( --dhh7
 $+#3#34I#J -7)ITYY	:Iwwy1HHt4 22!$W%5%5i%@%L%LMe%f!g3""jj HH $ 0 0 $ 0 0&*&<&<&*&<&<,4,C
 9$

8/  </h1hh/ ww~~h//$y<Q%RSS&&277>>)+D+D$OPY{Zbckbllmn  4AA&299Xrww+G+GE*k .8p 	+,	L  D,B,BDDZDZaef 	@$BRBRS ::>>?ELKK>		J((3KK78 M] (' #  H UD D j  	Lzz~~H#NRUUCQGKLL"#CD!K	Ls7   !YY!5Y? 
Y!Y<?
[1	A[, [,,[1c                 p   SSSSSU /n[         R                  " U[         R                  [         R                  SS9nUR                  (       a(  [        SU S	UR                   S
UR                   35      e SS KnSn[        R                  " U 5      R                  S5       Hg  nUR                  5       (       d  M  UR                  U5      n[!        U Vs/ s H  owU;   PM	     sn5      (       d  MP  [#        S[%        U5      < S35      e   g ! [         a    [        R                  " S5         g f = fs  snf )Nz/usr/bin/codesignz--verifyz--all-architecturesz--deepz--strictutf8)stdoutstderrencodingzcodesign command (z) failed with error code z
!
output: r   zJxattr package not available; skipping verification of extended attributes!)zcom.apple.cs.CodeDirectoryzcom.apple.cs.CodeRequirementszcom.apple.cs.CodeRequirements-1zcom.apple.cs.CodeSignature*z5Code-sign attributes found in extended attributes of !)
subprocessrunPIPESTDOUT
returncodeSystemErrorr   xattrModuleNotFoundErrorr   r   rd   Pathrglobis_file	listxattranyrE   r2   )
bundle_dircmd_argspr   CODESIGN_ATTRSentry
file_attrscodesign_attrs           rQ   r   BUNDLE.verify_bundle_signature  s    (5JHV`blmNN8JOOJDUDU`fg<<$XJ.G~U`abaiai`jk "	

 \\*-33C8E==??/J^T^MZ/^TUU #XY\]bYcXffg!hii 9 # 	KKde	  Us   6D D3
 D0/D0)r1   r   r8   r6   r9   rD   r   r   r   r4   r7   r3   r5   r=   r   )__name__
__module____qualname____firstlineno__r.   _GUTSrX   staticmethodr`   rk   r   r   r   __static_attributes____classcell__)rP   s   @rQ   r   r   (   sc    ^@E
   
 
DfPJ9X )j )jrS   r   )"r'   rd   r   r   r   PyInstallerr   r#   PyInstaller.building.apir   r   PyInstaller.building.datastructr   r   r   PyInstaller.building.utilsr	   r
   r   PyInstaller.compatr   r   PyInstaller.building.iconr   PyInstaller.utils.miscutilsmiscr@   PyInstaller.utils.osxosxr   r|   r%   r   rU   rS   rQ   <module>r     s^    
     & 1 I I ] ] = 9 * *,,  x
jV x
jrS   