Once you get into the subject, it becomes clear that you cannot generate a .dmg file on a linux machine. It's really annoying and lead me to create a hacky deployment workflow that booted an OSX virtual machine, scp'd some my packaged nw.io project there, ran it through CreateDMG, and scp'd it back to the host so that I could release the .dmg from linux. Nasty, but it works, kinda.

I decided to see if there was any way to get the full thing working on a linux box, and stumbled upon the development of a still fairly unkown project named bomutils that came with an excellent tutorial on how to make a .pkg package installer, which is (imo) a perfect alternative. A .pkg file is basically the windows installer synonym for OSX and many users will be familiar with them.

To set this up, you will need some dependencies, namely bomutils, libxml2-dev and libssl-dev. You can use the following commands to install them into an ubuntu environment:

Once you have that, you can setup this build script. Make sure to change the values to match your build process, run it, and if all goes well, you will be delivered a neat .pkg file that can be installed on any Mac that runs OS-X 10.5+

Ofcourse, this script is currently targeted at node-webkit, but there's no reason it can't work for any other App.

I'm currently working with the guys at Gisto so that we can maybe integrate this directly into nwjs-shell-builder. Until then, I hope this helps somebody!