FIX: Windows build crash 'app\static does not exist' (datas absolute + APP_DIR freeze-aware) + VU meter ARM/MIDI keyboard
This commit is contained in:
+13
-5
@@ -2,24 +2,32 @@
|
||||
# Chay: pyinstaller engine.spec --clean --noconfirm (tren Windows)
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from PyInstaller.utils.hooks import collect_dynamic_libs, collect_submodules
|
||||
|
||||
# Native DLL cho pedalboard va soundfile
|
||||
binaries = collect_dynamic_libs('pedalboard')
|
||||
binaries += collect_dynamic_libs('soundfile')
|
||||
|
||||
# Root tuyet doi cua thu muc chua spec — datas PHẢI absolute: PyInstaller
|
||||
# resolve duong dan relative theo CWD luc chay lenh (KHONG theo spec file),
|
||||
# chay tu noi khac -> khong tim thay -> bo qua am tham -> app/static thieu
|
||||
# trong bundle -> RuntimeError 'app\static does not exist' luc chay (da gap).
|
||||
_SPEC_ROOT = os.path.abspath(SPECPATH)
|
||||
|
||||
# Assets doc (read-only) + thu muc storage (khoi tao rong; khi frozen,
|
||||
# config.py chuyen storage sang %APPDATA%\SonicForgeDAW\storage)
|
||||
datas = [
|
||||
('app/templates', 'app/templates'), # index.html, favicon.svg
|
||||
('app/static', 'app/static'), # js/css/processors
|
||||
('app/storage', 'app/storage'),
|
||||
('md', 'md'), # /ai-prompt-generator
|
||||
(os.path.join(_SPEC_ROOT, 'app', 'templates'), 'app/templates'), # index.html, favicon.svg
|
||||
(os.path.join(_SPEC_ROOT, 'app', 'static'), 'app/static'), # js/css/processors
|
||||
(os.path.join(_SPEC_ROOT, 'app', 'models'), 'app/models'), # project_schema.json (projects.py)
|
||||
(os.path.join(_SPEC_ROOT, 'app', 'storage'), 'app/storage'),
|
||||
(os.path.join(_SPEC_ROOT, 'md'), 'md'), # /ai-prompt-generator
|
||||
]
|
||||
|
||||
a = Analysis(
|
||||
['desktop_engine.py'],
|
||||
pathex=['.'],
|
||||
pathex=[_SPEC_ROOT],
|
||||
binaries=binaries,
|
||||
datas=datas,
|
||||
hiddenimports=collect_submodules('celery.fixups') + [
|
||||
|
||||
Reference in New Issue
Block a user