A DMG Installer is convenient way to provide end-users a simple way to install an application bundle. They are basically a folder with a shortcut to the Applications directory but they can be customized with icons, backgrounds, and layout properties. A DMG file (.dmg) is a Mac OS X Disk Image file and it is used to package files or folders providing compression, encryption, and read-only to the package.
- Create a new folder and place your
.app
inside it - Type
Disk Utility
into Spotlight cmd space from Finder - File > New > Disk Image from Folder (or press cmd shift< kbd>n) and pick this folder inside which your app resides
- File > Save As and save it as
myapp.dmg
inDocuments
withread/write
- Mount
myapp.dmg
- Right Click
Applications
folder and selectMake Alias
- Move
Applications
shortcut inside the mounted disk image - Create
.background
folder inside the image and place your background image (500x320) here - Open
View Options
on the root of the disk image, selectPicture
forBackground
and drag the image inside the.background
folder to set the background - Arrange icons as needed to align with the background (Tip: Use cmd 1 for icon view)
- Finally, eject/unmount the image.
- Open
Disk Utility
, then Images > Convert and selectmyapp.dmg
- File > Save As and save as
myapp_final.dmg
inDocuments
withread-only
Congratulations you are finished! Mount the new dmg to verify it is working properly.
open /Applications/Utilities/Disk\ Utility.app/
# Save as dmg and then
open ~/Documents/myapp.dmg
open /Volumes/myapp/
cd /Volumes/myapp/
ln -s /Applications Applications
# Create .background, copy image and Set background
# Arrange and Adjust Icons
umount /Volumes/myapp/
hdiutil convert -format UDZO -o ~/Documents/myapp_final.dmg ~/Documents/myapp.dmg