-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMSCMonitor.spec
More file actions
105 lines (96 loc) · 2.65 KB
/
MSCMonitor.spec
File metadata and controls
105 lines (96 loc) · 2.65 KB
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
# -*- mode: python ; coding: utf-8 -*-
import os
from PyInstaller.utils.hooks import collect_all
# parse command line arguments
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--mac_osx', action='store_true')
parser.add_argument('--win', action='store_true')
parser.add_argument('--debug', action='store_true')
args = parser.parse_args()
datas = [
('.env', '.'),
('resources/MSCLogo.icns', './resources'),
('resources/MSCLogo.ico', './resources'),
]
numpy_datas, numpy_binaries, numpy_hiddenimports = collect_all('numpy')
ws_hiddenimports=['websockets', 'websockets.legacy']
a = Analysis(['main.py'],
pathex=[],
binaries=numpy_binaries,
datas=datas + numpy_datas,
hiddenimports=numpy_hiddenimports + ws_hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
noarchive=False,
)
pyz = PYZ(a.pure)
if args.win:
exe = EXE(
pyz,
a.binaries,
a.datas,
a.scripts,
name='MSC Monitor',
icon='resources/MSCLogo.ico',
debug=args.debug is not None and args.debug,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
console=args.debug is not None and args.debug,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
)
elif args.mac_osx:
exe = EXE(
pyz,
a.binaries,
a.datas,
a.scripts,
name='MSC Monitor',
debug=args.debug is not None and args.debug,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=os.environ.get('APPLE_APP_DEVELOPER_ID', ''),
entitlements_file='./entitlements.plist',
)
app = BUNDLE(
exe,
name='MSC Monitor.app',
icon='resources/MSCLogo.icns',
bundle_identifier='com.justinstasiw.mscmonitor',
version='2.0.0',
info_plist={
'NSPrincipalClass': 'NSApplication',
'NSAppleScriptEnabled': False,
}
)
else:
exe = EXE(
pyz,
a.binaries,
a.datas,
a.scripts,
name='MSC Monitor',
icon='resources/MSCLogo.ico',
debug=args.debug is not None and args.debug,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
)