create-dmg/readme.md

51 lines
1.8 KiB
Markdown
Raw Normal View History

2017-03-27 14:09:27 +00:00
# create-dmg [![Build Status](https://travis-ci.org/sindresorhus/create-dmg.svg?branch=master)](https://travis-ci.org/sindresorhus/create-dmg)
2018-04-29 12:07:51 +00:00
> Create a good-looking [DMG](https://en.wikipedia.org/wiki/Apple_Disk_Image) for your macOS app in seconds
2017-03-27 14:09:27 +00:00
2017-03-31 14:19:57 +00:00
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.
2017-03-31 12:46:41 +00:00
<img src="screenshot-cli.gif" width="998">
2018-04-29 12:07:51 +00:00
Discuss it on [Product Hunt](https://www.producthunt.com/posts/create-dmg) and [Twitter](https://twitter.com/sindresorhus/status/846416556754010112).
2017-03-27 14:09:27 +00:00
*This tool is intentionally opinionated and simple. I'm not interested in adding lots of options.*
You might also find my [`LaunchAtLogin`](https://github.com/sindresorhus/LaunchAtLogin) project useful.
2017-03-27 14:09:27 +00:00
## Install
2018-04-29 12:07:51 +00:00
Ensure you have [Node.js](https://nodejs.org) 8 or later installed. Then run the following:
2017-03-31 13:59:29 +00:00
2017-03-27 14:09:27 +00:00
```
$ npm install --global create-dmg
```
## Usage
```
$ create-dmg --help
2018-04-29 12:07:51 +00:00
Usage
$ create-dmg <app> [destination]
2018-04-29 12:02:41 +00:00
2018-04-29 12:07:51 +00:00
Examples
$ create-dmg 'Lungo.app'
$ create-dmg 'Lungo.app' Build/Releases
2017-03-27 14:09:27 +00:00
```
## DMG
The DMG requires macOS 10.11 or later and has the filename `appName-appVersion.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.
2017-03-27 14:09:27 +00:00
<img src="screenshot-dmg.png" width="772">
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)