diff --git a/packaging/macos/package.sh b/packaging/macos/package.sh index 194b3792939..a5a2858bf87 100755 --- a/packaging/macos/package.sh +++ b/packaging/macos/package.sh @@ -102,6 +102,7 @@ echo "==> assembling $APP" mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources" # Executable and icon carry the display name (CFBundleExecutable / CFBundleIconFile). cp "$WORK/bin/photocraft" "$APP/Contents/MacOS/PhotoCraft" +cp "$WORK/bin/photocraft-cli" "$APP/Contents/MacOS/photocraft-cli" cp "$ROOT/assets/app-icon/photocraft.icns" "$APP/Contents/Resources/PhotoCraft.icns" # Licences of the embedded craft-fonts fonts (only when built with CRAFT_FONTS_DIR). if [ -n "${CRAFT_FONTS_DIR:-}" ]; then @@ -115,7 +116,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 bundled CLI is nested executable code; sign it before sealing the app bundle. +sign --options runtime --identifier ai.storyteller.photocraft-cli "$APP/Contents/MacOS/photocraft-cli" sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP/Contents/MacOS/PhotoCraft" sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP" codesign --verify --strict --deep --verbose=2 "$APP"