Prepare for binary release

This commit is contained in:
2025-11-22 20:32:57 +08:00
parent dddab6dbbc
commit a095616569
2 changed files with 12 additions and 2 deletions

View File

@@ -35,7 +35,11 @@ def create_app(
"""Create and configure the Flask application."""
config = AppConfig.from_env(test_config)
project_root = Path(__file__).resolve().parent.parent
if getattr(sys, "frozen", False):
project_root = Path(sys._MEIPASS)
else:
project_root = Path(__file__).resolve().parent.parent
app = Flask(
__name__,
static_folder=str(project_root / "static"),