@@ -59,79 +59,66 @@ a = Analysis(
5959
6060pyz = PYZ (a .pure )
6161
62- if platform .system () != "Darwin" :
63-
62+ # Platform-specific configuration
63+ is_windows = platform .system () == "Windows"
64+ is_darwin = platform .system () == "Darwin"
65+ use_splash = is_windows # Splash only on Windows (disabled on Linux for Python 3.14 compatibility)
66+ use_strip = is_darwin # Strip symbols only on macOS
67+
68+ # Splash screen (Windows only)
69+ splash = None
70+ if use_splash :
6471 splash = Splash ('logo.png' ,
65- binaries = a .binaries ,
66- datas = a .datas ,
67- text_pos = (170 , 400 ),
68- text_size = 12 ,
69- text_color = 'white' ,
70- text_default = 'Loading application ...'
71- )
72-
73- exe = EXE (
74- pyz ,
75- splash ,
76- a .scripts ,
77- [('O' , None , 'OPTION' ), ('O' , None , 'OPTION' )], # https://github.com/numpy/numpy/issues/13248
78- exclude_binaries = True ,
79- name = 'aignostics' ,
80- debug = False ,
81- bootloader_ignore_signals = False ,
82- strip = True if platform .system () == "Darwin" else False ,
83- upx = True ,
84- console = False ,
85- disable_windowed_traceback = False ,
86- argv_emulation = False ,
87- target_arch = None ,
88- codesign_identity = None ,
89- entitlements_file = None ,
90- icon = ['logo.ico' ],
91- )
92-
93- coll = COLLECT (
94- exe ,
95- splash .binaries ,
96- a .binaries ,
97- a .datas ,
98- strip = True if platform .system () == "Darwin" else False ,
99- upx = True ,
100- upx_exclude = [],
101- name = 'aignostics' ,
72+ binaries = a .binaries ,
73+ datas = a .datas ,
74+ text_pos = (170 , 400 ),
75+ text_size = 12 ,
76+ text_color = 'white' ,
77+ text_default = 'Loading application ...'
10278 )
10379
104- else :
105-
106- exe = EXE (
107- pyz ,
108- a .scripts ,
109- [('O' , None , 'OPTION' ), ('O' , None , 'OPTION' )], # https://github.com/numpy/numpy/issues/13248
110- exclude_binaries = True ,
111- name = 'aignostics' ,
112- debug = False ,
113- bootloader_ignore_signals = False ,
114- strip = True if platform .system () == "Darwin" else False ,
115- upx = True ,
116- console = False ,
117- disable_windowed_traceback = False ,
118- argv_emulation = False ,
119- target_arch = None ,
120- codesign_identity = None ,
121- entitlements_file = None ,
122- icon = ['logo.ico' ],
123- )
80+ # Build EXE arguments dynamically
81+ exe_args = [pyz ]
82+ if splash :
83+ exe_args .append (splash )
84+ exe_args .extend ([
85+ a .scripts ,
86+ [('O' , None , 'OPTION' ), ('O' , None , 'OPTION' )], # https://github.com/numpy/numpy/issues/13248
87+ ])
88+
89+ exe = EXE (
90+ * exe_args ,
91+ exclude_binaries = True ,
92+ name = 'aignostics' ,
93+ debug = False ,
94+ bootloader_ignore_signals = False ,
95+ strip = use_strip ,
96+ upx = True ,
97+ console = False ,
98+ disable_windowed_traceback = False ,
99+ argv_emulation = False ,
100+ target_arch = None ,
101+ codesign_identity = None ,
102+ entitlements_file = None ,
103+ icon = ['logo.ico' ],
104+ )
124105
125- coll = COLLECT (
126- exe ,
127- a .binaries ,
128- a .datas ,
129- strip = True if platform .system () == "Darwin" else False ,
130- upx = True ,
131- upx_exclude = [],
132- name = 'aignostics' ,
133- )
106+ # Build COLLECT arguments dynamically
107+ collect_args = [exe ]
108+ if splash :
109+ collect_args .append (splash .binaries )
110+ collect_args .extend ([a .binaries , a .datas ])
111+
112+ coll = COLLECT (
113+ * collect_args ,
114+ strip = use_strip ,
115+ upx = True ,
116+ upx_exclude = [],
117+ name = 'aignostics' ,
118+ )
134119
120+ # macOS app bundle
121+ if is_darwin :
135122 app = BUNDLE (
136123 coll ,
137124 name = 'aignostics.app' ,
0 commit comments