-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogNotes.debug.spec
More file actions
73 lines (63 loc) · 1.64 KB
/
Copy pathLogNotes.debug.spec
File metadata and controls
73 lines (63 loc) · 1.64 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
# -*- mode: python ; coding: utf-8 -*-
# Debug spec: identical to LogNotes.spec but console=True so stderr is
# visible. Use this when the release exe launches but silently fails (missing
# DLL, hidden import). Build:
# pyinstaller build/LogNotes.debug.spec --clean --noconfirm
from pathlib import Path
from PyInstaller.utils.hooks import collect_all, collect_data_files
PROJECT_ROOT = Path(SPECPATH).parent
datas = [
(str(PROJECT_ROOT / "src" / "ui" / "assets"), "src/ui/assets"),
]
binaries = []
hiddenimports = [
"sounddevice",
"sounddevice._sounddevice",
"silero_vad",
"pystray._win32",
"ttkbootstrap",
]
_BUNDLE_PKGS = (
"sounddevice", "faster_whisper", "ctranslate2", "torch", "torchaudio",
# Add "onnxruntime", "onnx_asr" to enable bundled Parakeet support.
)
for pkg in _BUNDLE_PKGS:
try:
d, b, h = collect_all(pkg)
datas += d
binaries += b
hiddenimports += h
except Exception as e:
print(f"[spec] collect_all skipped {pkg}: {e}")
datas += collect_data_files("ttkbootstrap")
a = Analysis(
[str(PROJECT_ROOT / "main.py")],
pathex=[str(PROJECT_ROOT)],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
excludes=["tkinter.test"],
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name="LogNotes-debug",
debug=False,
strip=False,
upx=False,
console=True,
icon=str(PROJECT_ROOT / "src" / "ui" / "assets" / "logo.ico"),
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
name="LogNotes-debug",
)