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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user