FEAT: cài đặt các thư viện để chuẩn bị build exe trên window

This commit is contained in:
2026-08-08 08:46:15 +07:00
parent 9ef622f29a
commit 029ed1c456
24 changed files with 575 additions and 13 deletions
+20
View File
@@ -0,0 +1,20 @@
"""Entry point cho daw_engine.exe (PyInstaller — spec desktop 2026-08-08).
Chạy FastAPI backend trên 127.0.0.1:8000 (Dual-Process Desktop Architecture)."""
import os
import sys
import threading
import webbrowser
os.environ.setdefault("SFDATA_DIR", os.path.join(os.path.expanduser("~"), "SonicForgeDAW"))
import uvicorn # noqa: E402
def _open_browser():
webbrowser.open("http://127.0.0.1:8000")
if __name__ == "__main__":
# Mở browser sau khi server sẵn sàng (console=False — chạy ẩn)
threading.Timer(2.0, _open_browser).start()
uvicorn.run("app.main:app", host="127.0.0.1", port=8000, log_level="warning")