|
| 1 | +create-dmg |
| 2 | +========== |
| 3 | + |
| 4 | +A shell script to build fancy DMGs. |
| 5 | + |
| 6 | +Status and contribution policy |
| 7 | +------------------------------ |
| 8 | + |
| 9 | +Create-dmg is maintained thanks to the contributors who send pull requests. |
| 10 | +As of May 2020, [Andrew Janke](https://github.com/apjanke) is the primary maintainer, and (since September 2018) [@aonez](https://github.com/aonez) has helped with the maintenance. |
| 11 | +The project home page is <https://github.com/create-dmg/create-dmg>. |
| 12 | + |
| 13 | +We will merge any pull request that adds something useful and does not break existing things. |
| 14 | + |
| 15 | +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 ](https://gitter.im/create-dmg/Lobby), or [email Andrew directly ]([email protected]). |
| 16 | + |
| 17 | +Create-dmg was originally created by [Andrey Tarantsov](https://github.com/andreyvit). |
| 18 | + |
| 19 | +Installation |
| 20 | +------------ |
| 21 | + |
| 22 | +- You can install this script using [Homebrew](https://brew.sh): |
| 23 | + |
| 24 | + ```sh |
| 25 | + brew install create-dmg |
| 26 | + ``` |
| 27 | + |
| 28 | +- You can download the [latest release](https://github.com/create-dmg/create-dmg/releases/latest) and install it from there: |
| 29 | + |
| 30 | + ```sh |
| 31 | + make install |
| 32 | + ``` |
| 33 | + |
| 34 | +- You can also clone the entire repository and run it locally from there: |
| 35 | + |
| 36 | + ```sh |
| 37 | + git clone https://github.com/create-dmg/create-dmg.git |
| 38 | + ``` |
| 39 | + |
| 40 | +Usage |
| 41 | +----- |
| 42 | + |
| 43 | +```sh |
| 44 | +create-dmg [options ...] <output_name.dmg> <source_folder> |
| 45 | +``` |
| 46 | + |
| 47 | +All contents of source\_folder will be copied into the disk image. |
| 48 | + |
| 49 | +**Options:** |
| 50 | + |
| 51 | +- **--volname \<name\>:** set volume name (displayed in the Finder sidebar and window title) |
| 52 | +- **--volicon \<icon.icns\>:** set volume icon |
| 53 | +- **--background \<pic.png\>:** set folder background image (provide png, gif, jpg) |
| 54 | +- **--window-pos \<x\> \<y\>:** set position the folder window |
| 55 | +- **--window-size \<width\> \<height\>:** set size of the folder window |
| 56 | +- **--text-size \<text_size\>:** set window text size (10-16) |
| 57 | +- **--icon-size \<icon_size\>:** set window icons size (up to 128) |
| 58 | +- **--icon \<file_name\> \<x\> \<y\>:** set position of the file's icon |
| 59 | +- **--hide-extension \<file_name\>:** hide the extension of file |
| 60 | +- **--custom-icon \<file_name|custom_icon|sample_file\> \<x\> \<y\>:** set position and -tom icon |
| 61 | +- **--app-drop-link \<x\> \<y\>:** make a drop link to Applications, at location x, y |
| 62 | +- **--ql-drop-link \<x\> \<y\>:** make a drop link to /Library/QuickLook, at location x, y |
| 63 | +- **--eula \<eula_file\>:** attach a license file to the dmg |
| 64 | +- **--rez \<rez_path\>:** specify custom path to Rez tool used to include license file |
| 65 | +- **--no-internet-enable:** disable automatic mount© |
| 66 | +- **--format:** specify the final image format (default is UDZO) |
| 67 | +- **--add-file \<target_name\> \<file|folder\> \<x\> \<y\>:** add additional file or folder (can be used multiple times) |
| 68 | +- **--disk-image-size \<x\>:** set the disk image size manually to x MB |
| 69 | +- **--hdiutil-verbose:** execute hdiutil in verbose mode |
| 70 | +- **--hdiutil-quiet:** execute hdiutil in quiet mode |
| 71 | +- **--sandbox-safe:** execute hdiutil with sandbox compatibility and do not bless |
| 72 | +- **--version:** show tool version number |
| 73 | +- **-h, --help:** display the help |
| 74 | + |
| 75 | +Example |
| 76 | +------- |
| 77 | + |
| 78 | +```sh |
| 79 | +#!/bin/sh |
| 80 | +test -f Application-Installer.dmg && rm Application-Installer.dmg |
| 81 | +create-dmg \ |
| 82 | + --volname "Application Installer" \ |
| 83 | + --volicon "application_icon.icns" \ |
| 84 | + --background "installer_background.png" \ |
| 85 | + --window-pos 200 120 \ |
| 86 | + --window-size 800 400 \ |
| 87 | + --icon-size 100 \ |
| 88 | + --icon "Application.app" 200 190 \ |
| 89 | + --hide-extension "Application.app" \ |
| 90 | + --app-drop-link 600 185 \ |
| 91 | + "Application-Installer.dmg" \ |
| 92 | + "source_folder/" |
| 93 | +``` |
| 94 | + |
| 95 | +See the `examples` folder in the source tree for more examples. |
| 96 | + |
| 97 | +Alternatives |
| 98 | +------------ |
| 99 | + |
| 100 | +- [node-appdmg](https://github.com/LinusU/node-appdmg) |
| 101 | +- [dmgbuild](https://pypi.python.org/pypi/dmgbuild) |
| 102 | +- see the [StackOverflow question](http://stackoverflow.com/questions/96882/how-do-i-create-a-nice-looking-dmg-for-mac-os-x-using-command-line-tools) |
0 commit comments