Giter VIP home page Giter VIP logo

create-dmg's Introduction

create-dmg

A shell script to build fancy DMGs.

Status and contribution policy

Create-dmg is maintained thanks to the contributors who send pull requests. As of May 2020, Andrew Janke is the primary maintainer, and (since September 2018) @aonez has helped with the maintenance. 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.

Installation

  • You can install this script using Homebrew:

    brew install create-dmg
  • You can download the latest release and install it from there:

    make install
  • You can also clone the entire repository and run it locally from there:

    git clone https://github.com/create-dmg/create-dmg.git

Usage

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

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

Options:

  • --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 -tom 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, do not bless and do not execute the cosmetic AppleScript
  • --version: show tool version number
  • -h, --help: display the help

Example

#!/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.

Requirements

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 later, you're SOL. That's just too hard to deal with in 2020. ;)

Alternatives

create-dmg's People

Contributors

amethystdeceiver avatar andreyvit avatar aonez avatar apjanke avatar byronclark avatar csparker247 avatar danielbair avatar ecdye avatar farmckon avatar fuzzmz avatar gch1p avatar geary avatar jendave avatar kaloyan-raev avatar kodawah avatar mente avatar mikemccracken avatar miks avatar nsw42 avatar nunopedrosa avatar pzhlkj6612 avatar rbdavison avatar remram44 avatar schoeps avatar seltzered avatar sidney avatar smammy avatar thelastproject avatar uznick avatar wesen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.