Replies: 4 comments
-
|
There's a node utility that does a pretty good job. There's no native go way currently (not if you want a working .DS_Store file). Mat has a good write up on the process here https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5 |
Beta Was this translation helpful? Give feedback.
-
|
I just figured out the basics by making this script. But I like the background in Mat's approach, I'll check that out too. Thanks. After running # Set variables
APP_PATH="/Users/xx/wails-test/wails-test/build/bin/wails-test.app"
DMG_PATH="/Users/xx/wails-test/wails-test/build/bin/wails-test.dmg"
TMP_DIR="/tmp/dmg-build"
VOLUME_NAME="Wails Test"
# Clean up any existing temporary directory
rm -rf "$TMP_DIR"
mkdir -p "$TMP_DIR"
# Copy the .app file to the temporary directory
cp -R "$APP_PATH" "$TMP_DIR/"
# Create the Applications shortcut
ln -s /Applications "$TMP_DIR/Applications"
# Create the DMG file
hdiutil create -volname "$VOLUME_NAME" \
-srcfolder "$TMP_DIR" \
-ov \
-format UDZO \
"$DMG_PATH"
# Clean up temporary directory
rm -rf "$TMP_DIR"
# Output result
echo "DMG created at: $DMG_PATH"I think it would be great to have a generic "DMG generation" option when using |
Beta Was this translation helpful? Give feedback.
-
For future reference this was mentioned in the article: https://gist.github.com/mholt/11008646c95d787c30806d3f24b2c844. |
Beta Was this translation helpful? Give feedback.
-
|
Just found another wrapper of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Have you read the Documentation Contribution Guidelines?
Description
I reluctantly purchased an M1 Apple device simply for building Wails app in the future. I have setup Homebrew, Go, Wails, Xcode and managed to build a universal .app file. Thank you for that great work. Now I only need to figure out how to test the universal app on a non-ARM Mac. And also, how to build an DMG Installer for Mac.
I've found some references to DMG files but none in the documentation and none offer a solution:
Self-service
Beta Was this translation helpful? Give feedback.
All reactions