Add macOS packaging with .dmg and .app bundle
- Add cargo-bundle configuration for macOS app bundle - Create placeholder app icon (blue with "A" letter) - Update build-all.sh to create .dmg and .app.zip - Update README with new build output table macOS packages: - .dmg: Disk image for drag-to-Applications install - .app.zip: Zipped app bundle alternative
This commit is contained in:
@@ -83,6 +83,31 @@ docker run --rm --platform linux/amd64 \
|
||||
zip -j "$DIST_DIR/avif-maker-$VERSION-windows-x86_64.zip" \
|
||||
target/x86_64-pc-windows-gnu/release/avif-maker.exe
|
||||
|
||||
# macOS (native build)
|
||||
echo ""
|
||||
echo "Building macOS..."
|
||||
cargo build --release
|
||||
|
||||
# Create .app bundle
|
||||
echo "Creating .app bundle..."
|
||||
cargo bundle --release
|
||||
|
||||
# Find the .app bundle
|
||||
APP_PATH="target/release/bundle/osx/AVIF Maker.app"
|
||||
if [[ -d "$APP_PATH" ]]; then
|
||||
# Create DMG
|
||||
echo "Creating DMG..."
|
||||
DMG_NAME="avif-maker-$VERSION-macos.dmg"
|
||||
rm -f "$DIST_DIR/$DMG_NAME"
|
||||
hdiutil create -volname "AVIF Maker" -srcfolder "$APP_PATH" -ov -format UDZO "$DIST_DIR/$DMG_NAME"
|
||||
|
||||
# Also create a zip of the .app for those who prefer it
|
||||
echo "Creating .app zip..."
|
||||
(cd "target/release/bundle/osx" && zip -r "../../../../$DIST_DIR/avif-maker-$VERSION-macos.app.zip" "AVIF Maker.app")
|
||||
else
|
||||
echo "Warning: .app bundle not found at expected path"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "================================"
|
||||
echo "Build complete! Artifacts in $DIST_DIR/"
|
||||
|
||||
Reference in New Issue
Block a user