← Commit history

native release: ship dock card, badge, demo audio and templates beside the exe

John Lauer ·5186c6f60b ·27d ago ·parent 59eb37a
1 file changed +16−2
tools/build_native_release.py+16−2
@@ -70,10 +70,24 @@ def main():     shutil.copy2(exe, stage / "kicad-bridge.exe")     (stage / "bridge.json").write_text(json.dumps(manifest, indent=2) + "\n")     (stage / "BRIDGE_VERSION").write_text(ver + "\n")+    # Non-code assets the Python zip shipped and the native verbs still read at run time:+    # the dock card manifest, the taskbar badge, the demo narration and the board template.+    # (No certs: the native build carries its TLS roots in the binary; no scripts.)+    assets = ["dockbar.json", "LICENSE", "SKILL.md", "package.json", "page.json",+              "resources/adom-overlay-32.png", "resources/adom-overlay.ico",+              "templates/blank-board.kicad_pcb"]+    assets += [str(p.relative_to(ROOT)) for p in sorted((ROOT / "resources" / "demo-audio").glob("*")) if p.is_file()]+    missing = [a for a in assets if not (ROOT / a).is_file()]+    if missing:+        sys.exit(f"REFUSING: assets missing from the checkout: {missing}")+    for a in assets:+        dst = stage / a; dst.parent.mkdir(parents=True, exist_ok=True)+        shutil.copy2(ROOT / a, dst)     zpath = dist / f"adom-bridge-kicad-native-v{ver}.zip"     with zipfile.ZipFile(zpath, "w", zipfile.ZIP_DEFLATED) as z:-        for f in sorted(stage.iterdir()):-            z.write(f, f.name)+        for f in sorted(stage.rglob("*")):+            if f.is_file():+                z.write(f, f.relative_to(stage).as_posix())     sha = hashlib.sha256(zpath.read_bytes()).hexdigest()     print(f"built {zpath.name}\n  verbs : {len(verbs)}\n  exe   : {exe.stat().st_size} bytes\n  zip   : {zpath.stat().st_size} bytes\n  sha256: {sha}")     print("not published: flip the manifest by hand once the verb runner passes on the native binary")