Files
cmshoppe/main.py
T
chengma 6d4f60fcdb
Tests / Python 3.11 / Windows (push) Has been cancelled
build: add pyinstaller packaging
2026-07-03 09:26:27 +08:00

25 lines
512 B
Python

#!/usr/bin/env python3
"""cmshopee application entry point."""
import os
import sys
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
if __name__ == "__main__":
raise SystemExit(main())