build: add pyinstaller packaging
Tests / Python 3.11 / Windows (push) Has been cancelled

This commit is contained in:
chengma
2026-07-03 09:26:27 +08:00
parent dd2a8e3360
commit 6d4f60fcdb
12 changed files with 309 additions and 12 deletions
+9 -1
View File
@@ -5,9 +5,17 @@ import os
import sys
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
def _project_root():
if getattr(sys, "frozen", False):
return os.path.dirname(os.path.abspath(sys.executable))
return os.path.dirname(os.path.abspath(__file__))
PROJECT_ROOT = _project_root()
if PROJECT_ROOT not in sys.path:
sys.path.insert(0, PROJECT_ROOT)
if getattr(sys, "frozen", False):
os.chdir(PROJECT_ROOT)
from app.gui import main