FEAT: cài đặt các thư viện để chuẩn bị build exe trên window
This commit is contained in:
@@ -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")
|
||||
Reference in New Issue
Block a user