mac packaging fixes
This commit is contained in:
4 files changed
+31
-3
No files matched your search
@@ -11,7 +11,7 @@ PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
|
||||
APP_PATH="$BUILD_DIR/asteria-qt.app"
|
||||
DMG_NAME="Asteria.dmg"
|
||||
CODESIGN="${CODESIGN:-false}"
|
||||
CODESIGN="${CODESIGN:-true}"
|
||||
CODESIGN_IDENTITY="${CODESIGN_IDENTITY:--}"
|
||||
|
||||
if [ ! -d "$APP_PATH" ]; then
|
||||
@@ -24,7 +24,27 @@ fi
|
||||
|
||||
if [ "$CODESIGN" = "true" ]; then
|
||||
echo "Signing $APP_PATH with identity '$CODESIGN_IDENTITY'..."
|
||||
codesign --force --deep --sign "$CODESIGN_IDENTITY" "$APP_PATH"
|
||||
xattr -cr "$APP_PATH"
|
||||
|
||||
CODESIGN_ARGS=(--force --sign "$CODESIGN_IDENTITY")
|
||||
if [ "$CODESIGN_IDENTITY" != "-" ]; then
|
||||
CODESIGN_ARGS+=(--options runtime --timestamp)
|
||||
fi
|
||||
|
||||
# Sign nested libraries and plugins inside-out before sealing the bundle
|
||||
find "$APP_PATH/Contents/Frameworks" "$APP_PATH/Contents/PlugIns" \
|
||||
-type f \( -name "*.dylib" -o -name "*.so" \) -print0 2>/dev/null | \
|
||||
while IFS= read -r -d '' bin; do
|
||||
codesign "${CODESIGN_ARGS[@]}" "$bin"
|
||||
done
|
||||
|
||||
find "$APP_PATH/Contents/Frameworks" -maxdepth 1 -type d -name "*.framework" -print0 2>/dev/null | \
|
||||
while IFS= read -r -d '' fw; do
|
||||
codesign "${CODESIGN_ARGS[@]}" "$fw"
|
||||
done
|
||||
|
||||
codesign "${CODESIGN_ARGS[@]}" "$APP_PATH"
|
||||
codesign --verify --deep --strict --verbose=2 "$APP_PATH"
|
||||
fi
|
||||
|
||||
# Create .dmg directly in output directory
|
||||
|
||||
Reference in new issue
Block a user