mirror of
https://github.com/storytold/cadcraft.git
synced 2026-12-04 00:28:24 +00:00
Merge pull request #3772 from davidmann4/feat/macos-cli-in-app
packaging(macos): ship cadcraft-cli inside CADCraft.app
This commit is contained in:
1 file changed
+8
-2
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build, sign and (optionally) notarize the macOS release artifacts:
|
||||
#
|
||||
# $DIST/cadcraft-<version>-macos-<arch>.dmg CADCraft.app on a drag-to-Applications DMG
|
||||
# $DIST/cadcraft-<version>-macos-<arch>.dmg CADCraft.app on a drag-to-Applications DMG, with
|
||||
# cadcraft-cli in Contents/MacOS for the ArtCraft Launcher
|
||||
# $DIST/cadcraft-cli-<version>-macos-<arch>.zip the headless CLI
|
||||
#
|
||||
# Usage: packaging/macos/package.sh [--arch universal|aarch64|x86_64] [--skip-build]
|
||||
@@ -117,6 +118,9 @@ echo "==> assembling $APP"
|
||||
mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
|
||||
# Executable and icon carry the display name (CFBundleExecutable / CFBundleIconFile).
|
||||
cp "$WORK/bin/cadcraft" "$APP/Contents/MacOS/CADCraft"
|
||||
# The CLI beside the app: the ArtCraft Launcher lists an installed app for AI agents only when
|
||||
# `cadcraft-cli` sits next to its executable, and `cadcraft-cli mcp` starts the app from there.
|
||||
cp "$WORK/bin/cadcraft-cli" "$APP/Contents/MacOS/cadcraft-cli"
|
||||
cp "$ROOT/assets/app-icon/cadcraft.icns" "$APP/Contents/Resources/CADCraft.icns"
|
||||
# The licences and the bundled dependency font notices are installed before the app is signed.
|
||||
cp "$ROOT/LICENSE-MIT" "$ROOT/LICENSE-APACHE" "$ROOT/NOTICE" "$ROOT/ATTRIBUTION.md" \
|
||||
@@ -130,7 +134,8 @@ plutil -lint "$APP/Contents/Info.plist"
|
||||
printf 'APPL????' >"$APP/Contents/PkgInfo"
|
||||
|
||||
# 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 nested code is the CLI and the main executable; frameworks/helpers would be signed here too.
|
||||
sign --options runtime "$APP/Contents/MacOS/cadcraft-cli"
|
||||
sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP/Contents/MacOS/CADCraft"
|
||||
sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP"
|
||||
codesign --verify --strict --deep --verbose=2 "$APP"
|
||||
@@ -183,5 +188,6 @@ ditto -c -k --keepParent "$CLI_DIR" "$CLI_ZIP"
|
||||
if [[ "$NOTARIZE" = 1 ]]; then notarize "$CLI_ZIP"; fi
|
||||
|
||||
"$WORK/bin/cadcraft-cli" --version
|
||||
"$APP/Contents/MacOS/cadcraft-cli" --version
|
||||
echo "==> done"
|
||||
ls -lh "$DMG" "$CLI_ZIP"
|
||||
Reference in new issue
Block a user