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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ are in [`AGENTS.md`](AGENTS.md). Every bundled asset is listed with its licence
| Build | File | Notes |
|---|---|---|
| App, universal (Apple silicon + Intel) | `materialcraft-<ver>-macos-universal.dmg` | Signed and notarized |
| Command-line tool, universal | `materialcraft-cli-<ver>-macos-universal.zip` | Signed and notarized |
| Command-line tool, universal | `materialcraft-cli-<ver>-macos-universal.zip` | Signed and notarized; the app also carries it as `MaterialCraft.app/Contents/MacOS/materialcraft-cli` |

### Linux

Expand Down
8 changes: 7 additions & 1 deletion packaging/macos/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Build, sign and (optionally) notarize the macOS release artifacts:
#
# $DIST/materialcraft-<version>-macos-<arch>.dmg MaterialCraft.app on a drag-to-Applications DMG
# (the CLI inside too: Contents/MacOS/materialcraft-cli)
# $DIST/materialcraft-cli-<version>-macos-<arch>.zip the headless CLI
#
# Usage: packaging/macos/package.sh [--arch universal|aarch64|x86_64] [--skip-build]
Expand Down Expand Up @@ -102,6 +103,9 @@ echo "==> assembling $APP"
mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
# Executable and icon carry the display name (CFBundleExecutable / CFBundleIconFile).
cp "$WORK/bin/materialcraft" "$APP/Contents/MacOS/MaterialCraft"
# The CLI too, beside the app's executable: the ArtCraft Launcher finds `materialcraft-cli` next to it
# and registers `materialcraft-cli mcp` for agents, which starts the app beside it when it is closed.
cp "$WORK/bin/materialcraft-cli" "$APP/Contents/MacOS/materialcraft-cli"
cp "$ROOT/assets/app-icon/materialcraft.icns" "$APP/Contents/Resources/MaterialCraft.icns"
sed -e "s/@VERSION@/$VERSION/g" -e "s/@SHORT_VERSION@/$SHORT_VERSION/g" \
-e "s/@BUILD_SHA@/${MATERIALCRAFT_BUILD_SHA:-unknown}/g" \
Expand All @@ -112,7 +116,9 @@ printf 'APPL????' >"$APP/Contents/PkgInfo"
copy_docs "$APP/Contents/Resources"

# Sign inside-out: nested code first, then the bundle itself (no --deep on the final signature).
# Today the only nested code is the main executable; frameworks/helpers would be signed here too.
# The bundled CLI is nested executable code, signed as the standalone CLI is (its own identifier,
# hardened runtime), before the app's executable and the bundle are sealed.
sign --options runtime --identifier ai.storyteller.materialcraft-cli "$APP/Contents/MacOS/materialcraft-cli"
sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP/Contents/MacOS/MaterialCraft"
sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP"
codesign --verify --strict --deep --verbose=2 "$APP"
Expand Down
Loading