From 99a916fed60e8c33231aefe63c55513a0dcc550d Mon Sep 17 00:00:00 2001 From: Vassiliy Yegorov Date: Mon, 15 Jun 2026 11:41:57 +0700 Subject: [PATCH] fix(bundle): provide per-arch spaceshd sidecars for universal build Tauri's universal target builds each arch separately and resolves externalBin with that arch's triple (spaceshd-aarch64-apple-darwin / -x86_64-apple-darwin), lipo'ing them itself. The previous single -universal-apple-darwin sidecar made the per-arch sub-build fail with 'resource path ... doesn't exist'. Co-Authored-By: Claude Opus 4.8 (1M context) --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 63d5017..ee53dd8 100644 --- a/Makefile +++ b/Makefile @@ -35,14 +35,14 @@ targets: ## add rust targets for the universal build .PHONY: dmg dmg: targets ## build the universal (Intel + Apple Silicon) .dmg — UNSIGNED - # Build the daemon for both arches and lipo into a universal sidecar so it - # ships inside spacesh.app/Contents/MacOS/spaceshd (else the GUI is offline). + # Tauri's universal build compiles each arch separately and expects a sidecar + # named with THAT arch's triple; it lipo's them into the universal bundle and + # ships spaceshd inside spacesh.app/Contents/MacOS (else the GUI is offline). cargo build --release -p spaceshd --target aarch64-apple-darwin cargo build --release -p spaceshd --target x86_64-apple-darwin mkdir -p $(SIDECAR_DIR) - lipo -create -output $(SIDECAR_DIR)/spaceshd-universal-apple-darwin \ - target/aarch64-apple-darwin/release/spaceshd \ - target/x86_64-apple-darwin/release/spaceshd + cp target/aarch64-apple-darwin/release/spaceshd $(SIDECAR_DIR)/spaceshd-aarch64-apple-darwin + cp target/x86_64-apple-darwin/release/spaceshd $(SIDECAR_DIR)/spaceshd-x86_64-apple-darwin cd $(APP_DIR) && npm run tauri build -- --target $(TAURI_TARGET) --config $(BUNDLE_CONFIG) @echo "→ $(DMG_DIR)" && ls -lh $(DMG_DIR)/*.dmg