Skip to content
A shell script to build fancy DMGs
Shell Python AppleScript Ruby
Branch: master
Clone or download

Latest commit

aonez Merge pull request #88 from apjanke/no-separate-add-folder-option
Fold --add-folder into --add-file; it's redundant
Latest commit 4ec3c03 Nov 5, 2019


Type Name Latest commit message Commit time
Failed to load latest commit information.
builder Employed YourSway builder to produce source releases. Sep 9, 2008
support Merge pull request #71 from nunopedrosa/master Nov 23, 2018
.gitignore gitignore: add .vscode Nov 5, 2019
LICENSE This repo is actually 6 years old Aug 29, 2014 Fold --add-folder into --add-file; it's redundant Nov 5, 2019
create-dmg Fold --add-folder into --add-file; it's redundant Nov 5, 2019
sample Use preferred format for calling Bash Oct 30, 2019


A shell script to build fancy DMGs.

Status and contribution policy

This project is maintained thanks to the contributors who send pull requests, and now (Sep 2018) with the help of @aonez.

We will merge any pull request that adds something useful and does not break existing things, and will often grant commit access to the repository.

If you're an active user and want to be a maintainer, or just want to chat, please ping us at


  • You can install this script using Homebrew:

    brew install create-dmg
  • You can download the latest release

  • You can also clone the entire repository:

    git clone


create-dmg [options ...] <output_name.dmg> <source_folder>

All contents of source_folder will be copied into the disk image.


  • --volname <name>: set volume name (displayed in the Finder sidebar and window title)
  • --volicon <icon.icns>: set volume icon
  • --background <pic.png>: set folder background image (provide png, gif, jpg)
  • --window-pos <x> <y>: set position the folder window
  • --window-size <width> <height>: set size of the folder window
  • --text-size <text_size>: set window text size (10-16)
  • --icon-size <icon_size>: set window icons size (up to 128)
  • --icon <file_name> <x> <y>: set position of the file's icon
  • --hide-extension <file_name>: hide the extension of file
  • --custom-icon <file_name|custom_icon|sample_file> <x> <y>: set position and custom icon
  • --app-drop-link <x> <y>: make a drop link to Applications, at location x, y
  • --ql-drop-link <x> <y>: make a drop link to /Library/QuickLook, at location x, y
  • --eula <eula_file>: attach a license file to the dmg
  • --rez <rez_path>: specify custom path to Rez tool used to include license file
  • --no-internet-enable: disable automatic mount&copy
  • --format: specify the final image format (default is UDZO)
  • --add-file <target_name> <file|folder> <x> <y>: add additional file or folder (can be used multiple times)
  • --disk-image-size <x>: set the disk image size manually to x MB
  • --hdiutil-verbose: execute hdiutil in verbose mode
  • --hdiutil-quiet: execute hdiutil in quiet mode
  • --sandbox-safe: execute hdiutil with sandbox compatibility and do not bless
  • --version: show tool version number
  • -h, --help: display the help


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 "" 200 190 \
  --hide-extension "" \
  --app-drop-link 600 185 \
  "Application-Installer.dmg" \


You can’t perform that action at this time.