summaryrefslogtreecommitdiff
path: root/labui.spec
diff options
context:
space:
mode:
Diffstat (limited to 'labui.spec')
-rw-r--r--labui.spec13
1 files changed, 12 insertions, 1 deletions
diff --git a/labui.spec b/labui.spec
index 8468909..71d50dd 100644
--- a/labui.spec
+++ b/labui.spec
@@ -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"))