1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-01-18 13:07:58 +00:00

Generate DMG images for macOS instead of placing .app in tarball

This commit is contained in:
Romein van Buren 2023-12-23 13:02:38 +01:00
parent 6af1f4a028
commit 42993b28e9
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49
2 changed files with 8 additions and 29 deletions

View File

@ -13,48 +13,27 @@ cat > build/darwin/dmg_settings.json << EOF
"background": "$(pwd)/build/darwin/dmg_background.png", "background": "$(pwd)/build/darwin/dmg_background.png",
"icon-size": 100, "icon-size": 100,
"window": { "window": {
"size": { "width": 155, "height": 250 }, "size": { "width": 750, "height": 400 }
"position": { "x": 360, "y": 360 }
}, },
"contents": [ "contents": [
{ "x": 750, "y": 500, "type": "link", "path": "/Applications" }, { "x": 600, "y": 175, "type": "link", "path": "/Applications" },
{ "x": 595, "y": 250, "type": "file", "path": "$(pwd)/build/bin/Rolens.app" } { "x": 150, "y": 175, "type": "file", "path": "$(pwd)/build/bin/Rolens.app" }
] ]
} }
EOF EOF
# AMD/Intel # AMD/Intel
wails build -platform darwin/amd64 wails build -platform darwin/amd64
# create-dmg \ appdmg build/darwin/dmg_settings.json build/bin/Rolens.dmg
# --volname Rolens \ zip -j releases/rolens-$1-amd64.zip build/bin/Rolens.dmg
# --window-size 155 250 \
# --volicon build/appicon.png \
# --eula LICENSE \
# --app-drop-link 750 500 \
# --icon-size 100 \
# --background build/darwin/dmg_background.png \
# --add-file Rolens.app build/bin/Rolens.app 595 250 \
# build/bin/Rolens.dmg emptydir
# appdmg build/darwin/dmg_settings.json build/bin/Rolens.dmg
tar -czvf releases/rolens-$1-amd64.tar.gz --directory build/bin Rolens.app
# Cleanup # Cleanup
rm -rf build/bin/Rolens.app rm -rf build/bin/Rolens.dmg
# ARM/AppleM1 # ARM/AppleM1
wails build -platform darwin/arm64 wails build -platform darwin/arm64
# create-dmg \ appdmg build/darwin/dmg_settings.json build/bin/Rolens.dmg
# --volname Rolens \ zip -j releases/rolens-$1-arm64.zip build/bin/Rolens.dmg
# --window-size 155 250 \
# --volicon build/appicon.png \
# --eula LICENSE \
# --app-drop-link 750 500 \
# --icon-size 100 \
# --background build/darwin/dmg_background.png \
# --add-file Rolens.app build/bin/Rolens.app 595 250 \
# build/bin/Rolens.dmg emptydir
# appdmg build/darwin/dmg_settings.json build/bin/Rolens.dmg
tar -czvf releases/rolens-$1-arm64.tar.gz --directory build/bin Rolens.app
# Cleanup # Cleanup
rm -rf build/bin/Rolens.app rm -rf build/bin/Rolens.app

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 16 KiB