Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ pnpm run rebuild:native:electron # Electron app / Playwright e2e

If you hit a `NODE_MODULE_VERSION` mismatch, rerun the matching rebuild command and try again.

## Installing a local build (macOS)

To test a production build of the app locally — builds, installs to `/Applications/Spool.app`, and launches it:

```bash
pnpm dev:install:mac
```

Requires Apple Silicon. The script quits any running Spool instance before replacing the bundle and strips the quarantine attribute so Gatekeeper doesn't block the unsigned local build.

## Project structure

```
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"rebuild:native:electron": "pnpm --filter @spool/app run rebuild:native:electron",
"lint": "turbo lint",
"clean": "turbo clean",
"check:phantom-independence": "scripts/phantom-independence-check.sh"
"check:phantom-independence": "scripts/phantom-independence-check.sh",
"dev:install:mac": "scripts/dev-install-mac.sh"
},
"devDependencies": {
"turbo": "^2.9.6",
Expand Down
33 changes: 33 additions & 0 deletions scripts/dev-install-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail

# Build Spool from source and install it into /Applications.
# Intended for developer machines (Apple Silicon, unsigned local builds).
# Run from repo root: bash scripts/dev-install-mac.sh

[[ "$(uname)" == "Darwin" ]] || { echo "dev-install-mac: macOS only"; exit 1; }
[[ "$(uname -m)" == "arm64" ]] || { echo "dev-install-mac: Apple Silicon only"; exit 1; }

cd "$(dirname "$0")/.."

APP_NAME="Spool"
DEST="/Applications/${APP_NAME}.app"
BUILT="packages/app/dist/mac-arm64/${APP_NAME}.app"

echo "==> Quitting running ${APP_NAME}…"
osascript -e "quit app \"${APP_NAME}\"" 2>/dev/null || true

echo "==> Building (pnpm -F @spool/app build:mac)…"
pnpm -F @spool/app build:mac

[[ -d "$BUILT" ]] || { echo "dev-install-mac: build output not found at $BUILT"; exit 1; }

echo "==> Installing to ${DEST}…"
rm -rf "$DEST"
cp -R "$BUILT" "$DEST"

# Unsigned local builds trigger Gatekeeper; strip quarantine so `open` just works.
xattr -rd com.apple.quarantine "$DEST" 2>/dev/null || true

echo "==> Launching…"
open "$DEST"