create-dmg

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

Github星跟踪图

create-dmg Build Status

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.

Discuss it on Product Hunt and Twitter.

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

You might also find my LaunchAtLogin project useful.

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 title of DMG volume (only used if app name is >27 character limit)

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

DMG

The DMG requires macOS 10.11 or later and 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.

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

主要指标

概览
名称与所有者sindresorhus/create-dmg
主编程语言JavaScript
编程语言JavaScript (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2017-03-27 17:24:44
推送于2024-01-30 10:16:23
最后一次提交
发布数25
最新版本名称v7.0.0 (发布于 2024-01-30 17:15:34)
第一版名称v1.0.0 (发布于 2017-03-28 00:36:33)
用户参与
星数4.9k
关注者数36
派生数207
提交数83
已启用问题?
问题数61
打开的问题数7
拉请求数19
打开的拉请求数0
关闭的拉请求数13
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?