-
Notifications
You must be signed in to change notification settings - Fork 4
/
gcft.spec
80 lines (70 loc) · 2.14 KB
/
gcft.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
# -*- mode: python -*-
block_cipher = None
from version import VERSION
build_version = VERSION
import os
import glob
def build_datas_recursive(paths):
datas = []
for path in paths:
for filename in glob.iglob(path, recursive=True):
dest_dirname = os.path.dirname(filename)
if dest_dirname == "":
dest_dirname = "."
data_entry = (filename, dest_dirname)
datas.append(data_entry)
#print(data_entry)
return datas
import platform
import glob
def get_binaries():
if platform.system() in ["Darwin", "Linux"]:
return [('./PyJ3DUltra/build/J3DUltra*.so', '.')]
assert platform.system() == "Windows"
for glob_pattern in [
'./PyJ3DUltra/build/J3DUltra*.pyd',
'./PyJ3DUltra/build/Debug/J3DUltra*.pyd',
'./PyJ3DUltra/build/Release/J3DUltra*.pyd',
]:
if glob.glob(glob_pattern):
return [(glob_pattern, '.')]
raise Exception("Could not find Windows PyJ3DUltra executable")
a = Analysis(['gcft.py'],
pathex=["./gclib", "./gclib/gclib"],
binaries=get_binaries(),
datas=build_datas_recursive([
'assets/**/*.*',
'version.txt',
]),
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='GameCube File Tools',
debug=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=True,
icon="assets/icon.ico" )
app = BUNDLE(exe,
name='GameCube File Tools.app',
icon="assets/icon.icns",
bundle_identifier=None,
info_plist={
"LSBackgroundOnly": False,
"CFBundleDisplayName": "GameCube File Tools",
"CFBundleName": "GCFT", # 15 character maximum
"CFBundleShortVersionString": build_version,
}
)