I spent some time updating the StepMania MacOS installer. There are many features that you probably will want in an installer dmg:
- an “Applications” link or alias
- a custom background image
- custom placement of icons
- .dmg compression
- a way to script building of an installer dmg
Here’s how you’ll want to achieve the above in your installer build script
- Create a temporary directory and copy into it all files you’ll want in your final .dmg (typically a .app or 1 directory, and maybe a documentation file)
- Create a symbolic link (ln -s /Applications $your_temp_dir) or manually make an alias to /Applications and then copy the alias to your temp directory.
- Use the yoursway create dmg script and pass in your temp directory, background image, icon locations, and it will spit out a compressed dmg. Something like: create-dmg –window-size 500 300 –background background.png –icon-size 96 –volname “StepMania4” –icon “Applications” 380 205 –icon “StepMania” 110 205 StepMania.dmg ../$temp.dir. Their script is based on the Adium installer applescript + wrapper.
You can see exactly how StepMania does it by checking out our scripts: https://svn.stepmania.com/svn/branches/4.0/stepmania/PBProject