app
KiCad - the KiCad Bridge
Public Made by Adomby adom
Reference implementation of the KiCad bridge: multi-instance Python server, forward path via kicad-cli, reverse path via in-process plugin. Most complex of the three bundled bridges.
← Commit history
BRIDGE_VERSION+1−1@@ -1 +1 @@-0.9.8+0.9.9
bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "kicad", "displayName": "KiCad EDA",- "version": "0.9.8",+ "version": "0.9.9", "description": "Reverse bridge for KiCad \u2014 board/schematic introspection, lint via kicad-cli, plugin install, multi-instance probe, in-process DRC.", "homepage": "https://github.com/adom-inc/adom-desktop", "author": "Adom Inc.",
handlers/place_footprint.py+12−4@@ -87,11 +87,19 @@ def handle_place_footprint(kicad_info: dict, args: dict) -> dict: pcbnew_exe = kicad_info.get("pcbnew_exe") if pcbnew_exe and Path(pcbnew_exe).exists(): try:- # detached launch so the bridge doesn't block on the GUI- _safe_run([pcbnew_exe, str(out_path)], timeout=8)+ # DETACHED launch — a GUI must NOT go through subprocess.run(timeout=…),+ # which KILLS the child on timeout. Popen fire-and-forget, DETACHED_PROCESS+ # so pcbnew outlives the bridge and inherits no console handle.+ flags = 0x00000008 if sys.platform == "win32" else 0 # DETACHED_PROCESS+ subprocess.Popen(+ [pcbnew_exe, str(out_path)],+ creationflags=flags,+ stdin=subprocess.DEVNULL,+ stdout=subprocess.DEVNULL,+ stderr=subprocess.DEVNULL,+ close_fds=True,+ ) opened = True- except subprocess.TimeoutExpired:- opened = True # launched; it just doesn't return (GUI stays up) except OSError as e: return {"success": True, "boardPath": str(out_path), "footprintName": fp_name, "placedAt": [x, y], "opened": False,