#python #zip #shutil
Вопрос:
Я пытался заархивировать пакет приложений shutil.make_archive
, используя формат zip, вот так
app_pkg = '/path/to/my.app'
shutil.make_archive(app_pkg, 'zip', '/path/to/installer')
Созданный zip-файл извлекается /path/to/installer
без проблем.
Но приложение внутри папки установщика, /path/to/installer/my.app
т. е., вылетает при двойном щелчке.
Полный журнал сбоев выглядит следующим образом
Process: mia [32751]
Path: /Users/USER/Desktop/*/mia.app/Contents/MacOS/mia
Identifier: com.example.mia
Version: 1.0.0 (1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: mia [32751]
User ID: 527235363
Date/Time: 2021-06-06 20:20:49.763 0800
OS Version: macOS 11.3.1 (20E241)
Report Version: 12
Bridge OS Version: 5.3 (18P4556)
Anonymous UUID: 3D0E276C-DA9D-1DF6-7059-6A3AACF3A73D
Time Awake Since Boot: 1000000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
terminating with uncaught exception of type NSException
abort() called
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff208c798b __exceptionPreprocess 242
1 libobjc.A.dylib 0x00007fff205ffd92 objc_exception_throw 48
2 CoreFoundation 0x00007fff2097d32a _CFThrowFormattedException 202
3 CoreFoundation 0x00007fff2097b581 -[__NSPlaceholderArray initWithCapacity:].cold.1 0
4 CoreFoundation 0x00007fff207d0230 -[__NSPlaceholderArray initWithObjects:count:] 154
5 CoreFoundation 0x00007fff2082a793 [NSArray arrayWithObjects:count:] 40
6 FlutterMacOS 0x00000001055b1b14 -[FlutterEngine loadAOTData:] 148
7 FlutterMacOS 0x00000001055b1766 -[FlutterEngine runWithEntrypoint:] 1526
8 FlutterMacOS 0x00000001055be487 -[FlutterViewController launchEngine] 87
9 FlutterMacOS 0x00000001055be0c5 -[FlutterViewController viewWillAppear] 101
10 AppKit 0x00007fff23194320 -[NSViewController _sendViewWillAppear] 40
11 AppKit 0x00007fff231941e0 -[NSViewController _windowWillOrderOnScreen] 98
12 AppKit 0x00007fff238e91fe -[NSView _windowWillOrderOnScreen] 67
13 AppKit 0x00007fff238e9294 -[NSView _windowWillOrderOnScreen] 217
14 AppKit 0x00007fff23194071 -[NSWindow _doWindowWillBeVisibleAsSheet:] 59
15 AppKit 0x00007fff2319201f -[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:] 1319
16 AppKit 0x00007fff231917a0 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] 135
17 AppKit 0x00007fff23190797 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] 289
18 AppKit 0x00007fff23190614 -[NSWindow orderWindow:relativeTo:] 155
19 AppKit 0x00007fff2302675f -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] 2033
20 AppKit 0x00007fff2301abb8 loadNib 392
21 AppKit 0x00007fff2301a1c4 [NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] 693
22 AppKit 0x00007fff23019e1a -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] 201
23 AppKit 0x00007fff23019bf8 [NSBundle(NSNibLoading) loadNibNamed:owner:] 394
24 AppKit 0x00007fff2300c762 NSApplicationMain 566
25 mia 0x000000010559b759 main 9
26 libdyld.dylib 0x00007fff2076ff3d start 1
27 ??? 0x0000000000000001 0x0 1
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff20725946 __pthread_kill 10
1 libsystem_pthread.dylib 0x00007fff20754615 pthread_kill 263
2 libsystem_c.dylib 0x00007fff206a9411 abort 120
3 libc abi.dylib 0x00007fff20717ef2 abort_message 241
4 libc abi.dylib 0x00007fff207095fd demangling_terminate_handler() 266
5 libobjc.A.dylib 0x00007fff2060258d _objc_terminate() 96
6 libc abi.dylib 0x00007fff20717307 std::__terminate(void (*)()) 8
7 libc abi.dylib 0x00007fff20719beb __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) 27
8 libc abi.dylib 0x00007fff20719bb2 __cxa_throw 116
9 libobjc.A.dylib 0x00007fff205ffec0 objc_exception_throw 350
10 com.apple.CoreFoundation 0x00007fff2097d32a _CFThrowFormattedException 202
11 com.apple.CoreFoundation 0x00007fff2097b581 -[__NSPlaceholderArray initWithObjects:count:].cold.3 38
12 com.apple.CoreFoundation 0x00007fff207d0230 -[__NSPlaceholderArray initWithObjects:count:] 154
13 com.apple.CoreFoundation 0x00007fff2082a793 [NSArray arrayWithObjects:count:] 40
14 io.flutter.flutter-macos 0x00000001055b1b14 -[FlutterEngine loadAOTData:] 148
15 io.flutter.flutter-macos 0x00000001055b1766 -[FlutterEngine runWithEntrypoint:] 1526
16 io.flutter.flutter-macos 0x00000001055be487 -[FlutterViewController launchEngine] 87
17 io.flutter.flutter-macos 0x00000001055be0c5 -[FlutterViewController viewWillAppear] 101
18 com.apple.AppKit 0x00007fff23194320 -[NSViewController _sendViewWillAppear] 40
19 com.apple.AppKit 0x00007fff231941e0 -[NSViewController _windowWillOrderOnScreen] 98
20 com.apple.AppKit 0x00007fff238e91fe -[NSView _windowWillOrderOnScreen] 67
21 com.apple.AppKit 0x00007fff238e9294 -[NSView _windowWillOrderOnScreen] 217
22 com.apple.AppKit 0x00007fff23194071 -[NSWindow _doWindowWillBeVisibleAsSheet:] 59
23 com.apple.AppKit 0x00007fff2319201f -[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:] 1319
24 com.apple.AppKit 0x00007fff231917a0 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] 135
25 com.apple.AppKit 0x00007fff23190797 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] 289
26 com.apple.AppKit 0x00007fff23190614 -[NSWindow orderWindow:relativeTo:] 155
27 com.apple.AppKit 0x00007fff2302675f -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] 2033
28 com.apple.AppKit 0x00007fff2301abb8 loadNib 392
29 com.apple.AppKit 0x00007fff2301a1c4 [NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] 693
30 com.apple.AppKit 0x00007fff23019e1a -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] 201
31 com.apple.AppKit 0x00007fff23019bf8 [NSBundle(NSNibLoading) loadNibNamed:owner:] 394
32 com.apple.AppKit 0x00007fff2300c762 NSApplicationMain 566
33 com.example.mia 0x000000010559b759 main 9 (AppDelegate.swift:5)
34 libdyld.dylib 0x00007fff2076ff3d start 1
Thread 1:
0 libsystem_pthread.dylib 0x00007fff20750484 start_wqthread 0
Thread 2:
0 libsystem_pthread.dylib 0x00007fff20750484 start_wqthread 0
Thread 3:
0 libsystem_pthread.dylib 0x00007fff20750484 start_wqthread 0
Thread 4:
0 libsystem_pthread.dylib 0x00007fff20750484 start_wqthread 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x000000010c7eae00 rcx: 0x00007ffeea664318 rdx: 0x0000000000000000
rdi: 0x0000000000000103 rsi: 0x0000000000000006 rbp: 0x00007ffeea664340 rsp: 0x00007ffeea664318
r8: 0x00007ffeea6641e0 r9: 0x0000000000000000 r10: 0x000000010c7eae00 r11: 0x0000000000000246
r12: 0x0000000000000103 r13: 0x0000003000000008 r14: 0x0000000000000006 r15: 0x0000000000000016
rip: 0x00007fff20725946 rfl: 0x0000000000000246 cr2: 0x00007fff87442fd0
Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133
Thread 0 instruction stream not available.
Thread 0 last branch register state not available.
Binary Images:
0x105599000 - 0x10559cfff com.example.mia (1.0.0 - 1) <6FDB6C75-DD8C-3E3A-AC4E-B7DE513EB0F5> /Users/USER/Desktop/*/mia.app/Contents/MacOS/mia
0x1055ad000 - 0x106014fff io.flutter.flutter-macos (1.0 - 1.0) <E04597C4-4CD7-3C8C-9387-DE1D1C021257> /Users/USER/Desktop/*/mia.app/Contents/Frameworks/FlutterMacOS.framework/Versions/A/FlutterMacOS
0x1099c1000 - 0x1099d0fff libobjc-trampolines.dylib (824) <443A76FC-45AB-380A-98BF-EF0466708A33> /usr/lib/libobjc-trampolines.dylib
0x10a810000 - 0x10ab23fff App (0) <7CF9C6C2-B0CB-33AD-B315-07BAFEA054D7> /Users/USER/Desktop/*/mia.app/Contents/Frameworks/App.framework/App
0x10c713000 - 0x10c7aefff dyld (851.27) <7EAA668B-F906-3BAA-A980-139BBE6E8766> /usr/lib/dyld
0x7fff2048c000 - 0x7fff2048dfff libsystem_blocks.dylib (79) <1C8538C3-F2BE-3F02-89AE-E7052DE66D51> /usr/lib/system/libsystem_blocks.dylib
0x7fff2048e000 - 0x7fff204c3fff libxpc.dylib (2038.100.48) <CFB56DA8-7462-3E8F-9CFB-20926C6A2BB5> /usr/lib/system/libxpc.dylib
0x7fff204c4000 - 0x7fff204dbfff libsystem_trace.dylib (1277.100.21) <1AAE1F8F-9F9D-3327-8A95-3A6887CED713> /usr/lib/system/libsystem_trace.dylib
0x7fff204dc000 - 0x7fff20579fff libcorecrypto.dylib (1000.100.38) <96A88875-7771-394E-A88E-389DCD02A935> /usr/lib/system/libcorecrypto.dylib
0x7fff2057a000 - 0x7fff205a6fff libsystem_malloc.dylib (317.100.9) <029B5632-62B4-39F6-981C-BCA99C1FBF1D> /usr/lib/system/libsystem_malloc.dylib
0x7fff205a7000 - 0x7fff205ebfff libdispatch.dylib (1271.100.5) <6B7B23E3-2FD4-3EA2-8A89-CE06244CCA98> /usr/lib/system/libdispatch.dylib
0x7fff205ec000 - 0x7fff20625fff libobjc.A.dylib (824) <929E3040-4605-3C14-885B-D742EF02F2CB> /usr/lib/libobjc.A.dylib
0x7fff20626000 - 0x7fff20628fff libsystem_featureflags.dylib (28.60.1) <FEA91919-A5BB-3606-9445-F2077D90BF87> /usr/lib/system/libsystem_featureflags.dylib
0x7fff20629000 - 0x7fff206b1fff libsystem_c.dylib (1439.100.3) <DF45CDEC-6B7E-3586-94B4-F3679A762661> /usr/lib/system/libsystem_c.dylib
0x7fff206b2000 - 0x7fff20707fff libc .1.dylib (905.6) <B027735F-B398-381C-84A7-606D7BBE4997> /usr/lib/libc .1.dylib
0x7fff20708000 - 0x7fff2071dfff libc abi.dylib (905.6) <22AFC7FC-2DB6-3EF0-9CC0-EFFB9B65D5E2> /usr/lib/libc abi.dylib
0x7fff2071e000 - 0x7fff2074dfff libsystem_kernel.dylib (7195.101.2) <62A19DE4-50C5-3866-B5B2-43220E379C3B> /usr/lib/system/libsystem_kernel.dylib
0x7fff2074e000 - 0x7fff20759fff libsystem_pthread.dylib (454.100.8) <52F807B1-41A0-3D1E-AE89-115CA570863F> /usr/lib/system/libsystem_pthread.dylib
0x7fff2075a000 - 0x7fff20795fff libdyld.dylib (851.27) <9F95C644-D1BD-38D9-9612-6188FE9EA53C> /usr/lib/system/libdyld.dylib
0x7fff20796000 - 0x7fff2079ffff libsystem_platform.dylib (254.80.2) <03429519-EBEA-3549-84A6-0FD426CB7373> /usr/lib/system/libsystem_platform.dylib
0x7fff207a0000 - 0x7fff207cbfff libsystem_info.dylib (542.40.3) <C189F0D7-A430-328D-BD7F-7EB0FA023736> /usr/lib/system/libsystem_info.dylib
0x7fff207cc000 - 0x7fff20c69fff com.apple.CoreFoundation (6.9 - 1775.118.101) <895AFD1C-0307-32B3-81CB-BA33DA368DE1> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff20c6a000 - 0x7fff20e9cfff com.apple.LaunchServices (1122.33 - 1122.33) <CBFF2714-646C-3DDB-906D-672E420683E6> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x7fff20e9d000 - 0x7fff20f70fff com.apple.gpusw.MetalTools (1.0 - 1) <CD0A257C-70F9-3C42-A13E-76FD54BEFD96> /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools
0x7fff20f71000 - 0x7fff211cdfff libBLAS.dylib (1336.101.1) <28ABAD61-A323-33C6-8674-8A14118D4C20> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff211ce000 - 0x7fff2121afff com.apple.Lexicon-framework (1.0 - 86.1) <27959773-C4F4-33BC-9A68-39EF2037F1E5> /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon
0x7fff2121b000 - 0x7fff21289fff libSparse.dylib (106) <A666D9B0-8979-3C9C-83D6-1C0B535B8B0F> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib
0x7fff2128a000 - 0x7fff21307fff com.apple.SystemConfiguration (1.20 - 1.20) <BEDC3BFB-D680-3E56-9A3A-2FAB181C52A9> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fff21308000 - 0x7fff2133cfff libCRFSuite.dylib (50) <E49A8F87-3F3A-3A0F-853E-65FA6FB33E77> /usr/lib/libCRFSuite.dylib
0x7fff2133d000 - 0x7fff21575fff libmecabra.dylib (929.9) <87ACCBB5-FD09-3044-B6FF-1A94A7129DDF> /usr/lib/libmecabra.dylib
0x7fff21576000 - 0x7fff218d3fff com.apple.Foundation (6.9 - 1775.118.101) <5B112EDB-35C1-31A7-BFDA-E185D1B49D93> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff218d4000 - 0x7fff219bcfff com.apple.LanguageModeling (1.0 - 247.3) <81DEF845-C1A0-3BD0-9820-D1C308AFBE09> /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
0x7fff219bd000 - 0x7fff21af3fff com.apple.CoreDisplay (236.4 - 236.4) <C1F98CC6-5C02-372D-BFC8-420DEF159C9D> /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay
0x7fff21af4000 - 0x7fff21d64fff com.apple.audio.AudioToolboxCore (1.0 - 1180.90) <EB4DE2B5-7947-3422-8151-9E1BDA2B3183> /System/Library/PrivateFrameworks/AudioToolboxCore.framework/Versions/A/AudioToolboxCore
0x7fff21d65000 - 0x7fff21f49fff com.apple.CoreText (677.4.0.4 - 677.4.0.4) <F65330BD-9D48-3DE5-9E6B-1232B5BDB656> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
0x7fff21f4a000 - 0x7fff225dafff com.apple.audio.CoreAudio (5.0 - 5.0) <68667A4E-B4BC-3DF4-9D34-1E3ECECF7E0F> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x7fff225db000 - 0x7fff2292ffff com.apple.security (7.0 - 59754.100.106) <E9261CB0-E729-3F58-98B7-172F243D4427> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff22930000 - 0x7fff22b8ffff libicucore.A.dylib (66112) <478D57C3-FFF8-35E1-A64F-8490A616AB37> /usr/lib/libicucore.A.dylib
0x7fff22b90000 - 0x7fff22b99fff libsystem_darwin.dylib (1439.100.3) <28AB0CBC-61F6-3A01-BCE2-A53DA1AECB0F> /usr/lib/system/libsystem_darwin.dylib
0x7fff22b9a000 - 0x7fff22e85fff com.apple.CoreServices.CarbonCore (1307.2 - 1307.2) <C43BE82A-9E75-39C3-807F-2E87B97B7A78> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x7fff22e86000 - 0x7fff22ec4fff com.apple.CoreServicesInternal (476.1 - 476.1) <65BD8E8C-2F23-3790-B9CB-C04671BE34EE> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal
0x7fff22ec5000 - 0x7fff22efffff com.apple.CSStore (1122.33 - 1122.33) <209D2E9A-FC95-3E51-A0DC-4F32C21B2266> /System/Library/PrivateFrameworks/CoreServicesStore.framework/Versions/A/CoreServicesStore
0x7fff22f00000 - 0x7fff22faefff com.apple.framework.IOKit (2.0.2 - 1845.100.19) <99034CC2-EC1B-38C0-A8DE-CE37672DF139> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff22faf000 - 0x7fff22fbafff libsystem_notify.dylib (279.40.4) <1AA89769-E07F-37CD-BBCF-6DBD345862EB> /usr/lib/system/libsystem_notify.dylib
0x7fff22fbb000 - 0x7fff23008fff libsandbox.1.dylib (1441.101.1) <EC86BFE6-4909-356F-BBEF-DDB1C886D38E> /usr/lib/libsandbox.1.dylib
0x7fff23009000 - 0x7fff23d50fff com.apple.AppKit (6.9 - 2022.44.151) <10AFBC3A-E9A4-3E62-B9F5-97DF579B7A84> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x7fff23d51000 - 0x7fff23f9ffff com.apple.UIFoundation (1.0 - 728.6) <C815FD3F-C0F0-31F6-B60D-C544D807384F> /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation
0x7fff23fa0000 - 0x7fff23fb2fff com.apple.UniformTypeIdentifiers (636.9 - 636.9) <5F110054-A401-34EA-B789-F62B6B152DC4> /System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/UniformTypeIdentifiers
0x7fff23fb3000 - 0x7fff2413dfff com.apple.desktopservices (1.19 - 1346.4.7) <A3CAC396-18DC-3B13-9505-54BE001014CE> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x7fff2441d000 - 0x7fff24a9cfff libnetwork.dylib (2288.100.111) <8D567D13-AE70-34BF-834D-9A65C702A8EA> /usr/lib/libnetwork.dylib
0x7fff24a9d000 - 0x7fff24f3bfff com.apple.CFNetwork (1237 - 1237) <347078F9-34AC-3AD5-AA02-B7E5E1D11FB6> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x7fff24f3c000 - 0x7fff24f4afff libsystem_networkextension.dylib (1295.101.1) <33F45B5A-D346-3E7F-AB34-DFC4387E5A3C> /usr/lib/system/libsystem_networkextension.dylib
0x7fff24f4b000 - 0x7fff24f4bfff libenergytrace.dylib (22.100.1) <C6283CA4-26A1-352B-B678-C81D0E5E02D6> /usr/lib/libenergytrace.dylib
0x7fff24f4c000 - 0x7fff24fa8fff libMobileGestalt.dylib (978.100.37) <1B957D3E-C0F7-36AF-98E4-8897F8633BEA> /usr/lib/libMobileGestalt.dylib
0x7fff24fa9000 - 0x7fff24fbffff libsystem_asl.dylib (385) <4D4E0D4F-8B40-3ACC-85E1-16375966D6CC> /usr/lib/system/libsystem_asl.dylib
0x7fff24fc0000 - 0x7fff24fd7fff com.apple.TCC (1.0 - 1) <10E022E6-5939-32DF-80E7-11BEA294F987> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
0x7fff24fd8000 - 0x7fff2533bfff com.apple.SkyLight (1.600.0 - 585) <5DB42D5D-CF51-3433-96E6-B2987E0C33C8> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
0x7fff2533c000 - 0x7fff259c5fff com.apple.CoreGraphics (2.0 - 1463.14.2) <E16063AD-03D6-3DC7-A1D4-7103D3721A5A> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x7fff259c6000 - 0x7fff25abcfff com.apple.ColorSync (4.13.0 - 3473.4.3) <69831124-C7EE-3E6E-AC2E-6DCF8A96DB02> /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x7fff25abd000 - 0x7fff25b18fff com.apple.HIServices (1.22 - 715) <7F4A58B2-2A3A-321D-BD82-536D0E37A759> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x7fff25ebf000 - 0x7fff262defff com.apple.CoreData (120 - 1048) <E44CC602-AE8E-3AC0-A3D4-37E9A5AA949F> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x7fff262df000 - 0x7fff262f4fff com.apple.ProtocolBuffer (1 - 285.24.10.20.1) <B83422A6-FA4A-3E24-891F-15851A8D8265> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer
0x7fff262f5000 - 0x7fff264a8fff libsqlite3.dylib (321.3) <39129A81-0E78-3130-85AD-5FA0BFBCC6FA> /usr/lib/libsqlite3.dylib
0x7fff264a9000 - 0x7fff26525fff com.apple.Accounts (113 - 113) <928FC136-F5E1-3865-8384-AB5B7A626C7C> /System/Library/Frameworks/Accounts.framework/Versions/A/Accounts
0x7fff26526000 - 0x7fff2653dfff com.apple.commonutilities (8.0 - 900) <951F55FB-F13F-30E6-AB97-1CEEBE0E78DE> /System/Library/PrivateFrameworks/CommonUtilities.framework/Versions/A/CommonUtilities
0x7fff2653e000 - 0x7fff265bdfff com.apple.BaseBoard (526 - 526) <E88C7B2A-5372-3E8C-B719-AAC35B0F4E91> /System/Library/PrivateFrameworks/BaseBoard.framework/Versions/A/BaseBoard
0x7fff265be000 - 0x7fff26606fff com.apple.RunningBoardServices (1.0 - 505.100.7.0.1) <2E2672F5-C9F1-36E4-B3BA-D3561D7D8BEC> /System/Library/PrivateFrameworks/RunningBoardServices.framework/Versions/A/RunningBoardServices
0x7fff26607000 - 0x7fff2667bfff com.apple.AE (918.4 - 918.4) <5377134F-CCA8-3610-8888-8598115A8E8F> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x7fff2667c000 - 0x7fff26682fff libdns_services.dylib (1310.100.10) <CCC9994C-9A07-3740-98AE-908617A67CA5> /usr/lib/libdns_services.dylib
0x7fff26683000 - 0x7fff2668afff libsystem_symptoms.dylib (1431.100.22) <226C631F-5380-395A-AA20-D686AEA05B9B> /usr/lib/system/libsystem_symptoms.dylib
0x7fff2668b000 - 0x7fff2680ffff com.apple.Network (1.0 - 1) <E70D5387-9843-34AB-B8C4-F468EB7EB1EF> /System/Library/Frameworks/Network.framework/Versions/A/Network
0x7fff26810000 - 0x7fff2683ffff com.apple.analyticsd (1.0 - 1) <356D0732-7AC4-3579-A96E-640FD4C9AB56> /System/Library/PrivateFrameworks/CoreAnalytics.framework/Versions/A/CoreAnalytics
0x7fff26840000 - 0x7fff26842fff
Если я заархивирую /path/to/installer
папку с помощью собственной zip-утилиты macOS, приложение будет работать нормально.
Я провел двоичное сравнение между обоими результатами и не смог найти очевидных различий, за исключением .DS_Store
файла. Но у меня никогда раньше не было проблем с .DS_Store
такого рода сценариями, поэтому я не верю, что причина в этом.
Где я ошибаюсь?
Ответ №1:
Нашел проблему. shutil.make_archive()
не следует символическим ссылкам начиная с python 3.9.5. Таким образом, символические ссылки не включены в молнии.
Это приводит к повреждению библиотеки и исполняемых пакетов, таких как *.framework
«s».
Обходной путь, который я обхожу , заключается в использовании gztar
вместо zip
, который сохраняет основные символические ссылки.
shutil.make_archive(app_pkg, 'gztar', '/path/to/installer')