add macos ci build
This commit is contained in:
5 files changed
+193
-9
No files matched your search
@@ -10,15 +10,26 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
|
||||
APP_PATH="$BUILD_DIR/asteria-qt.app"
|
||||
DMG_NAME="Asteria-macOS.dmg"
|
||||
DMG_NAME="Asteria.dmg"
|
||||
CODESIGN="${CODESIGN:-false}"
|
||||
CODESIGN_IDENTITY="${CODESIGN_IDENTITY:--}"
|
||||
|
||||
if [ ! -d "$APP_PATH" ]; then
|
||||
echo "ERROR: App bundle not found at $APP_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Deploy Qt frameworks into the .app bundle
|
||||
"$QT_DIR/bin/macdeployqt" "$APP_PATH" -qmldir="$PROJECT_DIR/src/qml"
|
||||
|
||||
# Create .dmg
|
||||
hdiutil create -volname "Asteria" -srcfolder "$APP_PATH" \
|
||||
-ov -format UDZO "$BUILD_DIR/$DMG_NAME"
|
||||
if [ "$CODESIGN" = "true" ]; then
|
||||
echo "Signing $APP_PATH with identity '$CODESIGN_IDENTITY'..."
|
||||
codesign --force --deep --sign "$CODESIGN_IDENTITY" "$APP_PATH"
|
||||
fi
|
||||
|
||||
# Create .dmg directly in output directory
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
mv "$BUILD_DIR/$DMG_NAME" "$OUTPUT_DIR/"
|
||||
hdiutil create -volname "Asteria" -srcfolder "$APP_PATH" \
|
||||
-ov -format UDZO "$OUTPUT_DIR/$DMG_NAME"
|
||||
|
||||
echo "Created: $OUTPUT_DIR/$DMG_NAME"
|
||||
Reference in new issue
Block a user