mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
Merge branch 'develop' of https://github.com/DonutWare/Fladder into develop
This commit is contained in:
commit
4220c68ca3
3 changed files with 73 additions and 2 deletions
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
|
|
@ -222,8 +222,11 @@ jobs:
|
|||
APP_DIR="build/macos/Build/Products/Release-production"
|
||||
mv "$APP_DIR/fladder.app" "$APP_DIR/Fladder.app"
|
||||
|
||||
- name: Create DMG file
|
||||
run: hdiutil create -format UDZO -srcfolder build/macos/Build/Products/Release-production/Fladder.app build/macos/Build/Products/Release-production/macOS.dmg
|
||||
- name: Install create-dmg
|
||||
run: brew install create-dmg
|
||||
|
||||
- name: Create DMG with custom background
|
||||
run: ./scripts/create_dmg.sh
|
||||
|
||||
- name: Archive macOS artifact
|
||||
uses: actions/upload-artifact@v4.0.0
|
||||
|
|
|
|||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -5,6 +5,8 @@
|
|||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.build/
|
||||
.dmg_temp/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
|
|
|
|||
66
scripts/create_dmg.sh
Executable file
66
scripts/create_dmg.sh
Executable file
|
|
@ -0,0 +1,66 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script to create DMG for Fladder macOS app using create-dmg
|
||||
# Usage: ./create_dmg.sh
|
||||
|
||||
set -e
|
||||
|
||||
# Configuration
|
||||
APP_NAME="Fladder"
|
||||
APP_PATH="build/macos/Build/Products/Release-production/Fladder.app"
|
||||
DMG_PATH="build/macos/Build/Products/Release-production/macOS.dmg"
|
||||
BACKGROUND_IMAGE="assets/macos-dmg/Fladder-DMG-Background.jpg"
|
||||
TEMP_DMG_DIR="dmg_temp"
|
||||
|
||||
# Check if app exists
|
||||
if [ ! -d "$APP_PATH" ]; then
|
||||
echo "Error: App not found at $APP_PATH"
|
||||
echo "Please build the app first with: flutter build macos --flavor production"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if background image exists
|
||||
if [ ! -f "$BACKGROUND_IMAGE" ]; then
|
||||
echo "Error: Background image not found at $BACKGROUND_IMAGE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Clean up any existing artifacts
|
||||
rm -rf "$TEMP_DMG_DIR"
|
||||
rm -f "$DMG_PATH"
|
||||
|
||||
echo "Creating DMG for $APP_NAME with custom background..."
|
||||
|
||||
# Create temporary directory structure for DMG
|
||||
mkdir -p "$TEMP_DMG_DIR"
|
||||
cp -R "$APP_PATH" "$TEMP_DMG_DIR/"
|
||||
|
||||
# Create DMG with create-dmg using enhanced settings
|
||||
create-dmg \
|
||||
--volname "$APP_NAME" \
|
||||
--volicon "$APP_PATH/Contents/Resources/AppIcon.icns" \
|
||||
--background "$BACKGROUND_IMAGE" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 800 500 \
|
||||
--icon-size 80 \
|
||||
--icon "$APP_NAME.app" 210 250 \
|
||||
--hide-extension "$APP_NAME.app" \
|
||||
--app-drop-link 603 250 \
|
||||
--format UDZO \
|
||||
--hdiutil-quiet \
|
||||
"$DMG_PATH" \
|
||||
"$TEMP_DMG_DIR"
|
||||
|
||||
# Clean up temp directory
|
||||
rm -rf "$TEMP_DMG_DIR"
|
||||
|
||||
echo "DMG created successfully at: $DMG_PATH"
|
||||
|
||||
# Verify the DMG was created
|
||||
if [ -f "$DMG_PATH" ]; then
|
||||
echo "DMG file size: $(du -h "$DMG_PATH" | cut -f1)"
|
||||
echo "You can test the DMG by opening: $DMG_PATH"
|
||||
else
|
||||
echo "ERROR: DMG creation failed!"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue