fix(macos): bundle the CLI and resolve it from generated droplets

This commit is contained in:
Nigel Ihza Firdausy committed 2026-10-13 11:01:39 +07:00
1 parent a7919b24e1
commit 0cdd537480
1 file changed
+3 -1
+3 -1
View File
@@ -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"