"""Verify the PyInstaller onedir output has the expected portable layout.""" from __future__ import annotations import sys from pathlib import Path ROOT = Path(__file__).resolve().parents[1] DIST = ROOT / "dist" / "SensorBench" def require(path: Path) -> None: if not path.exists(): raise FileNotFoundError(f"Missing build artifact: {path}") def main() -> int: require(DIST / "SensorBench.exe") require(DIST / "config" / "options.json") require(DIST / "config" / "locales" / "zh_CN.json") require(DIST / "config" / "locales" / "en_US.json") require(DIST / "steps" / "default.json") require(DIST / "_internal") print(f"Verified SensorBench dist layout: {DIST}") return 0 if __name__ == "__main__": raise SystemExit(main())