A shell script to build fancy DMGs.
Create-dmg is mostly maintained by @aonez and the contributors who send pull requests. The project home page is https://github.com/create-dmg/create-dmg.
We will merge any pull request that adds something useful and does not break existing things.
If you're an active user and want to be a maintainer, or just want to chat, please ping us on Gitter at gitter.im/create-dmg/Lobby, or email Andrew directly.
Create-dmg was originally created by Andrey Tarantsov. In May 2020 Andrew Janke helped vastly with the project.
You can install this script using Homebrew:
brew install create-dmgYou can download the latest release and install it from there:
make installYou can also clone the entire repository and run it locally from there:
git clone https://github.com/create-dmg/create-dmg.gitcreate-dmg [options ...] <output_name.dmg> <source_folder>All contents of source_folder will be copied into the disk image.
Options:
hdiutil supports native disk image encryption using AES-256 (slower but stronger) or AES-128 (faster but weaker). Enabling disk image encryption via create-dmg will require the entry of the password during the middle (compression phase) of the process. Take care to enter the password correctly, because hdiutil will not prompt a second time to confirm the password.
#!/bin/sh
test -f Application-Installer.dmg && rm Application-Installer.dmg
create-dmg
--volname "Application Installer"
--volicon "application_icon.icns"
--background "installer_background.png"
--window-pos 200 120
--window-size 800 400
--icon-size 100
--icon "Application.app" 200 190
--hide-extension "Application.app"
--app-drop-link 600 185
"Application-Installer.dmg"
"source_folder/"See the examples folder in the source tree for more examples.
Nothing except a standard installation of macOS/OS X is required.
We think this works in OS X 10.6 Snow Leopard and later.
We'd like to keep it working in as many versions as possible, but unfortunately, we just don't have test boxes running old versions of OS X adequate to make this happen. Development and testing mostly happens in the last 3-5 years' worth of macOS releases; as of 2020, this means macOS 10.12 and later.
But if you find a bug in an older version, go ahead and report it! We'll try to work with you to get it fixed.
If you're running OS X 10.5 or earlier, you're SOL. That's just too hard to deal with in 2023. ;)