-
-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathwindows.spec
97 lines (92 loc) · 2.87 KB
/
windows.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
85
86
87
88
89
90
91
92
93
94
95
96
97
from pathlib import Path
import certifi
import sys
def find_msys64_path() -> Path:
"""Check common paths for MSYS2 installations"""
potential_paths = [
# This is the path the GitHub CI msys action uses
Path("D:\\a\\_temp\\msys64"),
# This is default Windows path
Path("C:\\msys64"),
]
for path in potential_paths:
if path.exists():
return path
raise FileNotFoundError("MSYS2 base path not found in common locations")
python_ver = f"{sys.version_info.major}.{sys.version_info.minor}"
msys64_path = find_msys64_path()
print(f"Found msys64 path: {msys64_path}")
a = Analysis(
["src/tauon/__main__.py"],
pathex=[],
binaries=[
(str(Path(msys64_path) / "mingw64" / "bin" / "libFLAC.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "libgme.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "libmpg123-0.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "libogg-0.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "libopenmpt-0.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "libopus-0.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "libopusfile-0.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "libsamplerate-0.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "libvorbis-0.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "libvorbisfile-3.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "libwavpack-1.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "SDL2.dll"), "."),
(str(Path(msys64_path) / "mingw64" / "bin" / "SDL2_image.dll"), "."),
],
datas=[
(certifi.where(), "certifi"),
("src/tauon/assets", "assets"),
("src/tauon/locale", "locale"),
("src/tauon/theme", "theme"),
("src/tauon/templates", "templates"),
("fonts", "fonts"),
("librespot.exe", "."),
("TaskbarLib.tlb", "."),
("TauonSMTC.dll", "lib"),
# This could only have SDL2.framework and SDL2_image.framework to save space...
(f".venv/lib/python{python_ver}/site-packages/sdl2dll/dll", "sdl2dll/dll"),
],
hiddenimports=[
"pylast",
"tekore",
"phazor",
# Zeroconf is hacked until this issue is resolved: https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/840
"zeroconf._utils.ipaddress",
"zeroconf._handlers.answers",
],
hookspath=["extra\\pyinstaller-hooks"],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name="Tauon Music Box",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=["src/tauon/assets/icon.ico"],
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name="TauonMusicBox",
)