-
Notifications
You must be signed in to change notification settings - Fork 3
/
gudpy.spec
84 lines (75 loc) · 2.51 KB
/
gudpy.spec
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
# -*- mode: python ; coding: utf-8 -*-
VERSION = "0.5.0"
binaries = [
(os.path.join("bin", f), '.')
for f in os.listdir("bin")
if f not in ["StartupFiles", "configs"]
]
block_cipher = None
import sys
main_cli = os.path.join('gudpy', 'gudpy_cli.py')
main_gui = os.path.join('gudpy', 'gudpy_gui.py')
data = [(os.path.join("bin", "StartupFiles"), os.path.join("bin", "StartupFiles")), (os.path.join("bin", "configs"), os.path.join("bin", "configs"))]
ui = [(os.path.join("gudpy", "gui", "widgets", "ui_files"), "ui_files"), (os.path.join("gudpy", "gui", "widgets", "resources"), "resources")]
datas = [*data, *ui]
a_cli = Analysis([main_cli],
pathex=[main_cli, 'gudpy'],
binaries=[],
datas=data,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=['gui'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
a_gui = Analysis([main_gui],
pathex=[main_gui, 'gudpy'],
binaries=[],
datas=datas,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz_cli = PYZ(a_cli.pure, a_cli.zipped_data,
cipher=block_cipher)
pyz_gui = PYZ(a_gui.pure, a_gui.zipped_data,
cipher=block_cipher)
exe = EXE(pyz_cli,
a_cli.scripts,
[],
exclude_binaries=True,
name=f'GudPy-CLI-{VERSION}',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
gui_exe = EXE(pyz_gui,
a_gui.scripts,
[],
exclude_binaries=True,
name=f'GudPy-GUI-{VERSION}',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False )
coll = COLLECT(exe,
gui_exe,
a_cli.binaries,
a_cli.zipfiles,
a_cli.datas,
strip=False,
upx=True,
name=f'GudPy-{VERSION}')
# Now bundle everything in one folder
app = BUNDLE(coll,
name=f'GudPy-{VERSION}.app',
icon=None,
bundle_identifier=None)