-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to make a MacOS (Installer) DMG? #3926
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 |
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 |
For future reference this was mentioned in the article: https://gist.github.com/mholt/11008646c95d787c30806d3f24b2c844. |
Just found another wrapper of |
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
The text was updated successfully, but these errors were encountered: