changed customer to studio

This commit is contained in:
ykcheungab
2026-09-12 14:03:00 +08:00
parent a2db648560
commit 904c27125f
71 changed files with 112 additions and 3959 deletions
+8 -8
View File
@@ -10,25 +10,25 @@ def is_frozen() -> bool:
return bool(getattr(sys, "frozen", False))
def _customer_root_from_shared() -> Path:
"""Repo layout: shared/src/orisys_app_shared -> apps/customer."""
def _studio_root_from_shared() -> Path:
"""Repo layout: shared/src/orisys_app_shared -> apps/studio."""
here = Path(__file__).resolve()
# .../orisys-app/shared/src/orisys_app_shared/paths.py
repo_root = here.parents[3]
return repo_root / "apps" / "customer"
return repo_root / "apps" / "studio"
def app_root() -> Path:
"""Return the customer app root (editable) or EXE directory (frozen)."""
"""Return the studio app root (editable) or EXE directory (frozen)."""
if is_frozen():
return Path(sys.executable).resolve().parent
# Prefer cwd override when launched from apps/customer
# Prefer cwd override when launched from apps/studio
cwd = Path.cwd().resolve()
if (cwd / "config").is_dir() and (cwd / "run.py").is_file():
return cwd
if (cwd / "apps" / "customer" / "config").is_dir():
return cwd / "apps" / "customer"
return _customer_root_from_shared()
if (cwd / "apps" / "studio" / "config").is_dir():
return cwd / "apps" / "studio"
return _studio_root_from_shared()
def config_dir() -> Path: