Skip to content

vladignatyev/node-appdmg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-appdmg

Generate beautiful DMG-images for your OS X applications.

Installation

npm install -g appdmg

Usage

appdmg <json-path> <dmg-path>
  • json-path: Path to the JSON Specification file
  • dmg-path: Path at which to place the final DMG

Test

To produce a test DMG to your desktop, run the following command:

appdmg test/appdmg.json ~/Desktop/test.dmg

JSON Specification

Visualization

The specification for the image is a simple json file, example provided below. All paths are relative to the json-file's path. (Comments are not allowed, I'm only using them for demonstration purposes.)

{

  // The title of the produced DMG, which will be shown when mounted
  "title": "Test Title",

  // Path to your .app
  "app": "TestApp.app",

  // Path to your background
  "background": "TestBkg.png",

  // Path to your icon, which will be shown when mounted
  "icon": "TestIcon.icns",

  // Size and position of the icons in the DMG
  // Positions are specified as X and Y in the center of said icon
  // "app" is your application
  // "alias" is an alias to the Applications folder
  "icons": {
    "size": 80,
    "app": [192, 344],
    "alias": [448, 344]
  }

}

API

The application can also be called from within another javascript file, example:

var appdmg = require('appdmg');

appdmg('test/appdmg.json', 'test.dmg', function (err, path) {
  // err is an potential error
  // path is the path to the final DMG
});

OS Support

Currently the only supported os is Mac OS X.

Supporing other operating systems would involve writing a custom .DS_Store writer, but if accomplished would bring improvements even to the Mac platform since we could drop all the apple script stuff which currently adds ~15 seconds to the build time and pops up the Finder.

About

Generate your app dmgs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 85.0%
  • AppleScript 7.3%
  • Objective-C 6.8%
  • Shell 0.9%