FEAT: chuẩn bị thư viện để tạo file exe trên window
This commit is contained in:
+67
@@ -0,0 +1,67 @@
|
||||
# engine.spec — PyInstaller config cho daw_engine.exe (sidecar Python)
|
||||
# Chay: pyinstaller engine.spec --clean --noconfirm (tren Windows)
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
from PyInstaller.utils.hooks import collect_dynamic_libs
|
||||
|
||||
# Native DLL cho pedalboard va soundfile
|
||||
binaries = collect_dynamic_libs('pedalboard')
|
||||
binaries += collect_dynamic_libs('soundfile')
|
||||
|
||||
# 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
|
||||
]
|
||||
|
||||
a = Analysis(
|
||||
['desktop_engine.py'],
|
||||
pathex=['.'],
|
||||
binaries=binaries,
|
||||
datas=datas,
|
||||
hiddenimports=[
|
||||
'uvicorn.logging',
|
||||
'uvicorn.loops',
|
||||
'uvicorn.loops.auto',
|
||||
'uvicorn.protocols',
|
||||
'uvicorn.protocols.http',
|
||||
'uvicorn.protocols.http.auto',
|
||||
'uvicorn.protocols.websockets',
|
||||
'uvicorn.protocols.websockets.auto',
|
||||
'pedalboard',
|
||||
'soundfile',
|
||||
'sf2utils',
|
||||
'mido.backends.rtmidi',
|
||||
],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=['tkinter'],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=None,
|
||||
noarchive=False,
|
||||
)
|
||||
|
||||
pyz = PYZ(a.pure, a.zipped_data, cipher=None)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='daw_engine',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=False, # True khi debug (xem log truc tiep), False cho production
|
||||
icon='src-tauri/icons/icon.ico',
|
||||
)
|
||||
Reference in New Issue
Block a user