tags:

views:

1017

answers:

3

It seems like using Finder UX or some sort of UI tool (http://stackoverflow.com/questions/871199/create-drag-drop-graphic-when-installing-os-x-application-from-dmg) the only way to customize how a DMG looks when opened up. That doesn't scale too well and isn't automatable enough.

Anyone know of way to achieve the same thing but using tools such as hdiutil on Mac or mkfs.hfsplus on Linux?

A: 

The OS X Finder stores data about the window size, type, position, background image and icon arrangement (per directory) in a hidden file called .DS_Store. If you follow the general idea from the other question, you should then be able to copy the .DS_Store file from the resulting disk image into new images generated by a deployment script.

rspeed
I tried this as one of my expriments - it didn't seem to work but I'll give it another shot tomorrow.Do you *know* that this works or do you think it should work?
psychotik
I thought so. Looking at the link KevMo posted, I'm now thinking otherwise. It seems that the DS_Store links deeper into the filesystem than I had thought. Sorry about that.
rspeed
+1  A: 

There is a makefile in this tutorial that looks like it will do what you want. I haven't tested it myself, but it's worth a shot.

EDIT: It looks like you're not alone. Check out some of the suggestions for this question: http://stackoverflow.com/questions/96882/how-do-i-create-a-nice-looking-dmg-for-mac-os-x-using-command-line-tools

KevMo
A: 

You can also have a look at create-dmg, this is a usefull command line tool to make dmg with icons and background.

Boris Gougeon