Git Product home page Git Product logo

create-dmg's Introduction

create-dmg

Create a good-looking DMG for your macOS app in seconds

Imagine you have finished a macOS app, exported it from Xcode, and now want to distribute it to users. The most common way of distributing an app outside the Mac App Store is by putting it in a .dmg file. These are hard to create, especially good-looking ones. You can either pay for a GUI app where you have to customize an existing design or you can run some homebrewed Bash script and you still have to design it. This tool does everything for you, so you can play with your 🐈 instead.

This tool is intentionally opinionated and simple. I'm not interested in adding lots of options.

Install

Ensure you have Node.js 8 or later installed. Then run the following:

$ npm install --global create-dmg

Usage

$ create-dmg --help

  Usage
    $ create-dmg <app> [destination]

  Options
    --overwrite          Overwrite existing DMG with the same name
    --identity=<value>   Manually set code signing identity (automatic by default)
    --dmg-title=<value>  Manually set DMG title (must be <=27 characters) [default: App name]

  Examples
    $ create-dmg 'Lungo.app'
    $ create-dmg 'Lungo.app' Build/Releases

DMG

The DMG detects the minimum runtime of the app, and uses ULFO (macOS 10.11 or later) or UDZO as appropriate. The resulting image has the filename App Name 0.0.0.dmg, for example Lungo 1.0.0.dmg.

It will try to code sign the DMG, but the DMG is still created and fine even if the code signing fails, for example if you don't have a developer certificate.

Important: Don't forget to notarize your DMG.

Software license agreement

If either license.txt, license.rtf, or sla.r (raw SLAResources file) are present in the same directory as the app, it will be added as a software agreement when opening the image. The image will not be mounted unless the user indicates agreement with the license.

/usr/bin/rez (from Command Line Tools for Xcode) must be installed.

DMG icon

GraphicsMagick is required to create the custom DMG icon that's based on the app icon and the macOS mounted device icon.

Steps using Homebrew

$ brew install graphicsmagick imagemagick

Icon example

Original icon → DMG icon

Links

Related

create-dmg's People

Contributors

dminta avatar dxdc avatar fcastilloec avatar ivoronin avatar kwvg avatar lohoris avatar manrueda avatar michaelsbradleyjr avatar neonowy avatar richienb avatar sindresorhus avatar willowblade 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.