-
Notifications
You must be signed in to change notification settings - Fork 47
/
joystick_gremlin.spec
82 lines (73 loc) · 1.67 KB
/
joystick_gremlin.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
# -*- mode: python -*-
import os
block_cipher = None
# Properly enumerate all files required for the action_plugins and
# container_plugins system
action_plugins_files = []
for root, _, files in os.walk("action_plugins"):
for fname in files:
if fname.endswith(".pyc"):
continue
action_plugins_files.append((os.path.join(root, fname), root))
added_files = [
("about", "about"),
("doc", "doc"),
("gfx", "gfx"),
("qml", "qml")
]
added_files.extend(action_plugins_files)
added_binaries = [
("vjoy/vJoyInterface.dll", "."),
("dill/dill.dll", "."),
]
a = Analysis(
["jg_qml.py"],
pathex=['C:\\Users\\Ivan\\Code\\JoystickGremlin'],
binaries=added_binaries,
datas=added_files,
hiddenimports=[],
hookspath=None,
runtime_hooks=None,
excludes=None,
win_no_prefer_redirects=None,
win_private_assemblies=None,
cipher=block_cipher
)
to_keep = []
to_exclude = {
"Qt6WebChannel.dll",
"Qt6WebEngineCore.dll",
"Qt6WebEngineQuick.dll",
"Qt6WebEngineQuickDelegatesQml.dll",
"Qt6WebSockets.dll"
}
# Only keep binaries we actually want, exlucindg a bunch of Qt crap
for (dest, source, kind) in a.binaries:
if os.path.split(dest)[1] not in to_exclude:
to_keep.append((dest, source, kind))
a.binaries = to_keep
pyz = PYZ(
a.pure,
a.zipped_data,
cipher=block_cipher
)
exe = EXE(
pyz,
a.scripts,
exclude_binaries=True,
name="joystick_gremlin",
debug=False,
strip=None,
upx=True,
console=False,
icon="gfx\\icon.ico"
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=None,
upx=True,
name="joystick_gremlin"
)