Skip to content

Commit b7d82b2

Browse files
committed
Add macOS install instructions and DMG build tooling
- Add Installation section to README with xattr fix for Gatekeeper warning - Add dmg-assets/Install Instructions.txt shown inside the DMG window - Add scripts/build-dmg.sh using create-dmg for custom DMG packaging - Add build:dmg npm script - Bump version to 0.1.1
1 parent 5e8e796 commit b7d82b2

6 files changed

Lines changed: 79 additions & 3 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ Browse, filter by BPM/key, preview audio and MIDI, and organize your own library
1515

1616
**Download:** [stack.swendl.com](https://stack.swendl.com)
1717

18+
## Installation (macOS)
19+
20+
1. Download the `.dmg` from the releases page or [stack.swendl.com](https://stack.swendl.com)
21+
2. Open the DMG and drag **Stack.app** to your Applications folder
22+
3. If macOS says _"Stack is damaged and can't be opened"_, run this once in Terminal:
23+
24+
```bash
25+
xattr -rd com.apple.quarantine /Applications/Stack.app
26+
```
27+
28+
4. Launch Stack from Applications
29+
30+
> This warning appears because the app is not yet notarized with Apple. The command removes the quarantine flag macOS applies to downloaded files.
31+
1832
## Features
1933

2034
- Offline-first desktop app
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Stack — Install Instructions
2+
─────────────────────────────
3+
4+
1. Drag Stack.app to the Applications folder on the right.
5+
6+
2. Launch Stack from Applications or Spotlight.
7+
8+
3. If macOS says "Stack is damaged and can't be opened",
9+
open Terminal and run:
10+
11+
xattr -rd com.apple.quarantine /Applications/Stack.app
12+
13+
Then launch normally.
14+
15+
─────────────────────────────
16+
stack.swendl.com

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"preview": "vite preview",
1010
"tauri": "tauri",
1111
"db:clear": "rm -f \"$HOME/Library/Application Support/app.stack.desktop/stack.db\" \"$HOME/Library/Application Support/app.stack.desktop/stack.db-wal\" \"$HOME/Library/Application Support/app.stack.desktop/stack.db-shm\"",
12-
"tauri:dev:cleardb": "npm run db:clear && npm run tauri dev"
12+
"tauri:dev:cleardb": "npm run db:clear && npm run tauri dev",
13+
"build:dmg": "bash scripts/build-dmg.sh"
1314
},
1415
"dependencies": {
1516
"@crabnebula/tauri-plugin-drag": "^2.1.0",

scripts/build-dmg.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
set -e
3+
4+
cd "$(dirname "$0")/.."
5+
6+
APP_NAME="Stack"
7+
ARCH="aarch64"
8+
VERSION=$(node -p "require('./src-tauri/tauri.conf.json').version" 2>/dev/null || grep '"version"' src-tauri/tauri.conf.json | head -1 | sed 's/.*"version": "\(.*\)".*/\1/')
9+
DMG_NAME="${APP_NAME}_${VERSION}_${ARCH}.dmg"
10+
APP_PATH="src-tauri/target/release/bundle/macos/${APP_NAME}.app"
11+
OUTPUT_DIR="src-tauri/target/release/bundle/dmg"
12+
STAGING_DIR="/tmp/dmg-staging-${APP_NAME}"
13+
14+
if ! command -v create-dmg &> /dev/null; then
15+
echo "Error: create-dmg not found. Install it with: brew install create-dmg"
16+
exit 1
17+
fi
18+
19+
echo "Building ${APP_NAME} v${VERSION}..."
20+
npm run tauri build -- --bundles app
21+
22+
mkdir -p "$OUTPUT_DIR"
23+
rm -f "$OUTPUT_DIR/$DMG_NAME"
24+
rm -rf "$STAGING_DIR"
25+
mkdir -p "$STAGING_DIR"
26+
27+
cp -r "$APP_PATH" "$STAGING_DIR/"
28+
cp "dmg-assets/Install Instructions.txt" "$STAGING_DIR/"
29+
30+
create-dmg \
31+
--volname "$APP_NAME" \
32+
--background "src-tauri/icons/dmg-bg-gray-dots.png" \
33+
--window-pos 200 120 \
34+
--window-size 660 400 \
35+
--icon-size 100 \
36+
--icon "${APP_NAME}.app" 180 170 \
37+
--hide-extension "${APP_NAME}.app" \
38+
--app-drop-link 480 170 \
39+
--icon "Install Instructions.txt" 330 310 \
40+
"$OUTPUT_DIR/$DMG_NAME" \
41+
"$STAGING_DIR"
42+
43+
rm -rf "$STAGING_DIR"
44+
45+
echo "Done: $OUTPUT_DIR/$DMG_NAME"

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stack"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = "Local sample library manager"
55
authors = ["Stack"]
66
edition = "2021"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "Stack",
4-
"version": "0.1.0",
4+
"version": "0.1.1",
55
"identifier": "app.stack.desktop",
66
"build": {
77
"beforeDevCommand": "npm run dev",

0 commit comments

Comments
 (0)