update exe GUI build

This commit is contained in:
ykcheungab
2026-06-21 12:01:34 +08:00
parent 258948bcb7
commit 7feae9550e
18 changed files with 862 additions and 173 deletions
+4 -1
View File
@@ -1,5 +1,6 @@
from __future__ import annotations
import sys
from dataclasses import dataclass
from pathlib import Path
@@ -44,10 +45,12 @@ def _candidate_export_dirs(export_dir) -> list[Path]:
here = Path(__file__).resolve()
candidates = [
Path.cwd() / raw, # repo root / user cwd
Path.cwd() / raw,
here.parents[1] / raw, # packaged wheel: orisys/assets/...
here.parents[3] / raw, # editable install: repo/assets/...
]
if getattr(sys, "frozen", False):
candidates.insert(0, Path(sys.executable).resolve().parent / raw)
unique: list[Path] = []
for candidate in candidates:
resolved = candidate.resolve()