diff options
Diffstat (limited to 'labui.spec')
| -rw-r--r-- | labui.spec | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -17,13 +17,24 @@ root_dir = Path(SPECPATH) # root.json is generated by scripts/release/repo_init.py — bundle it once it # exists so a fresh install can bootstrap tufup trust without an insecure # first fetch. Skip silently before that's ever been run (e.g. first build). +# Read from this platform's own repo tree (scripts/release/<platform>/) — +# must match core.updater._platform_key()'s mapping, since a build only ever +# bundles its own platform's root.json. +def _platform_key(): + if sys.platform.startswith("win"): + return "win" + if sys.platform == "darwin": + return "mac" + return "linux" + datas = [ (str(root_dir / "ui" / "style_dark.qss"), "ui"), (str(root_dir / "ui" / "style_light.qss"), "ui"), (str(root_dir / "ui" / "style.qss"), "ui"), (str(root_dir / "plugins"), "plugins"), ] -_root_json = root_dir / "scripts" / "release" / "repository" / "metadata" / "root.json" +_root_json = (root_dir / "scripts" / "release" / _platform_key() + / "repository" / "metadata" / "root.json") if _root_json.exists(): datas.append((str(_root_json), "repository/metadata")) |
