a paid nerd
a paid nerd

Reputation: 31512

.dmg that expands like a .zip

I swear that I've seen Mac OS X applications distributed as .dmg's that, when opened, expand and leave the application in place (deleting the .dmg) instead of mounting a virtual disk.

How are these auto-expanding .dmg archives created?

Upvotes: 2

Views: 360

Answers (1)

Gordon Davisson
Gordon Davisson

Reputation: 125788

This is called an "internet-enabled" disk image. It's basically a normal disk image, but with a special setting that says it should be expanded rather than mounted. You can create one by making a standard disk image, then running:

hdiutil internet-enable /path/to/image.dmg

You can reverse this with:

hdiutil internet-enable -no /path/to/image.dmg

See the hdiutil man page for more info. Also, this page has an AppleScript to automate the process.

Upvotes: 2

Related Questions