diff --git a/Makefile b/Makefile index 9f21c20..ed9cb31 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ dmg: targets ## build the universal (Intel + Apple Silicon) .dmg — UNSIGNED # 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) + rm -rf $(SIDECAR_DIR) && mkdir -p $(SIDECAR_DIR) # avoid stale sidecars poisoning the bundle 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) @@ -51,7 +51,7 @@ dmg: targets ## build the universal (Intel + Apple Silicon) .dmg — UNSIGNED .PHONY: dmg-native dmg-native: ## build a .dmg for the current arch only (faster) cargo build --release -p spaceshd - mkdir -p $(SIDECAR_DIR) + rm -rf $(SIDECAR_DIR) && mkdir -p $(SIDECAR_DIR) # avoid stale sidecars poisoning the bundle cp target/release/spaceshd $(SIDECAR_DIR)/spaceshd-$(NATIVE_TRIPLE) cd $(APP_DIR) && npm run tauri build -- --config $(BUNDLE_CONFIG) @ls -lh $(NATIVE_DMG_DIR)/*.dmg @@ -70,14 +70,20 @@ kill-daemon: ## stop a running spaceshd so a freshly-built one takes over -rm -f $$HOME/.spacesh/sock .PHONY: install -install: kill-daemon ## copy the built .app to /Applications, restart daemon, clear quarantine +install: kill-daemon ## install the native .app to /Applications, restart daemon, clear quarantine rm -rf /Applications/spacesh.app - cp -R "$(APP_BUNDLE)" /Applications/ 2>/dev/null || cp -R "$(NATIVE_APP_BUNDLE)" /Applications/ + cp -R "$(NATIVE_APP_BUNDLE)" /Applications/ + xattr -dr com.apple.quarantine /Applications/spacesh.app + @echo "Installed (native). Quit & relaunch spacesh; the bundled daemon restarts." + +.PHONY: install-universal +install-universal: kill-daemon ## install the universal .app to /Applications + rm -rf /Applications/spacesh.app + cp -R "$(APP_BUNDLE)" /Applications/ xattr -dr com.apple.quarantine /Applications/spacesh.app - @echo "Installed. The bundled daemon (with the latest code) starts on next launch." .PHONY: reinstall -reinstall: dmg install ## universal rebuild + reinstall + restart daemon (one shot) +reinstall: dmg-native install ## native rebuild + reinstall + restart daemon (fast self-update) # ---- Tests ----