I've created a custom DMG used for manual installation of my app. There are two issues with the resulting DMG. First, the original dimensions of the finder window are not preserved when the DMG is opened on a Mac other than my development machine (where it was created). Second, the background graphic, which is a PNG file, is not displayed. I verified that the PNG is indeed in the DMG volume.
Here are the steps I've used to create the manual installer.
1. Use Disk Utility to create an empty sparse image with enough storage for my application 2. Mount the sparse image 3. Bless the sparse image 4. Copy the background image to the mounted sparse image volume 5. Use CMD-J to set the background image for the mounted sparse image to the newly copied background image 6. Use the SetFile -a V command to make the background image invisible to the finder 7. Create a symbolic link for the /Applications directory 8. Copy a directory containing my executable, a license file, and a couple of support files, to the sparse image 9. Unmount the sparse image with CMD-E (eject) 10. Use hdiutil to convert the sparse image to a dmg file
Bless the dmg folder so that the system knows which one to open when the DMG is mounted bless --folder /Volumes/DmgFolder --openfolder /Volumes/DmgFolder
Make the background graphic file invisible to the finder window when the DMG is mounted /Developer/Tools/SetFile -a V /Volumes/DmgFolder/Background.png
Create the symbolic link the to users application directory so they can drag-n-drop for installation ln -s /Applications /Volumes/DmgFolder/.
Convert the sparse image to the compressed DMG hdiutil convert DmgFolder.sparseimage -format UDBZ -o DmgFolder.dmg
Can someone please tell me what is missing?
-Michael ---------------------- There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
-- C.A.R. Hoare
|