forked from 1b-agent/fieldcraft-upstream
Bundle the macOS CLI inside FieldCraft.app
This commit is contained in:
1 parent
991dd354cb
commit
2be6aff2f9
5 files changed
+37
-8
No files matched your search
@@ -10,4 +10,8 @@ right-click FieldCraft.app in Applications and choose Open, then Open again. Or
|
||||
Updating: quit FieldCraft, drag FieldCraft.app from this disk image onto Applications and
|
||||
choose Replace.
|
||||
|
||||
The command-line tool, fieldcraft-cli, is a separate download (fieldcraft-cli-*-macos-*.zip).
|
||||
The command-line tool is included at
|
||||
|
||||
/Applications/FieldCraft.app/Contents/MacOS/fieldcraft-cli
|
||||
|
||||
It is also available separately (fieldcraft-cli-*-macos-*.zip).
|
||||
@@ -125,6 +125,7 @@ mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources/Licenses"
|
||||
# CFBundleIconName). Assets.car holds the layered icon for macOS 26 and later, the .icns the
|
||||
# icon for earlier versions (assets/app-icon/README.md).
|
||||
cp "$WORK/bin/fieldcraft" "$APP/Contents/MacOS/FieldCraft"
|
||||
cp "$WORK/bin/fieldcraft-cli" "$APP/Contents/MacOS/fieldcraft-cli"
|
||||
cp "$ICONS/icon.icns" "$APP/Contents/Resources/FieldCraft.icns"
|
||||
cp "$ICONS/Assets.car" "$APP/Contents/Resources/Assets.car"
|
||||
copy_docs "$APP/Contents/Resources/Licenses"
|
||||
@@ -133,7 +134,8 @@ sed -e "s/@APP_ID@/$APP_ID/g" -e "s/@VERSION@/$VERSION/g" -e "s/@SHORT_VERSION@/
|
||||
plutil -lint "$APP/Contents/Info.plist"
|
||||
printf 'APPL????' >"$APP/Contents/PkgInfo"
|
||||
|
||||
# Sign inside-out: the executable, then the bundle (no --deep on the bundle's own signature).
|
||||
# Sign inside-out: both executables, then the bundle (no --deep on the bundle's own signature).
|
||||
sign --options runtime --identifier "$APP_ID.cli" "$APP/Contents/MacOS/fieldcraft-cli"
|
||||
sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP/Contents/MacOS/FieldCraft"
|
||||
sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP"
|
||||
codesign --verify --strict --deep --verbose=2 "$APP"
|
||||
@@ -185,9 +187,14 @@ cmp "$ICONS/Assets.car" "$M_APP/Contents/Resources/Assets.car"
|
||||
for f in "${DOC_FILES[@]}"; do
|
||||
test -s "$M_APP/Contents/Resources/Licenses/$f"
|
||||
done
|
||||
for arch in "${WANT[@]}"; do lipo "$M_APP/Contents/MacOS/FieldCraft" -verify_arch "$arch"; done
|
||||
for bin in FieldCraft fieldcraft-cli; do
|
||||
test -x "$M_APP/Contents/MacOS/$bin"
|
||||
for arch in "${WANT[@]}"; do lipo "$M_APP/Contents/MacOS/$bin" -verify_arch "$arch"; done
|
||||
codesign --verify --strict --verbose=2 "$M_APP/Contents/MacOS/$bin"
|
||||
"$M_APP/Contents/MacOS/$bin" --version
|
||||
done
|
||||
codesign --verify --strict --deep --verbose=2 "$M_APP"
|
||||
"$M_APP/Contents/MacOS/FieldCraft" --version
|
||||
"$M_APP/Contents/MacOS/fieldcraft-cli" commands >/dev/null
|
||||
hdiutil_retry detach "$MNT" >/dev/null
|
||||
trap - EXIT
|
||||
if [ "$NOTARIZE" = 1 ]; then
|
||||
|
||||
Reference in new issue
Block a user