• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I get the background graphic in a custom DMG for a manual install to stick?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I get the background graphic in a custom DMG for a manual install to stick?


  • Subject: Re: How do I get the background graphic in a custom DMG for a manual install to stick?
  • From: Iceberg-Dev <email@hidden>
  • Date: Thu, 5 Nov 2009 23:13:35 +0100

On Nov 3, 2009, at 5:06 AM, Michael A. Crawford wrote:

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?

1. On which version of Mac OS X are you creating your disk image and on which version are you testing it?


If you build a disk image on Snow Leopard with a background image, the background image will not be seen on Tiger.

2. I don't understand why you need to bless the dmg.

Personally, I just create a blank read-write disk image in Disk Utility with a capacity big enough to handle the contents I need to put into it.

I then copy the contents, copy the image, set the image as the background, use SetFile -a V.

And finally convert the disk image to a compressed disk image with disk utility.

3. Cases where your background image can not show up include:

- you have 2 disk images with the same name mounted. The background image will show up the next time you open only one image. You don't need to fix anything, this is a bug/limitation of Mac OS X.

- it can happen sometimes if you changed the name of the mounted disk image. You would need to fix it. When I change the name of the mounted volume, I usually do it with the disk image window opened. Maybe it does not change anything but it seems to work better this way.




_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: How do I get the background graphic in a custom DMG for a manual install to stick?
      • From: John Gee <email@hidden>
References: 
 >How do I get the background graphic in a custom DMG for a manual install to stick? (From: "Michael A. Crawford" <email@hidden>)

  • Prev by Date: Re: Installer Problem
  • Next by Date: Re: Installer Problem
  • Previous by thread: Re: How do I get the background graphic in a custom DMG for a manual install to stick?
  • Next by thread: Re: How do I get the background graphic in a custom DMG for a manual install to stick?
  • Index(es):
    • Date
    • Thread