# Background image in .dmg?



## colddiver (Jul 23, 2001)

Anyone found a way to insert a background image in  a .dmg disk image (_a la_ OmniGroup - see OmniWeb.dmg for an example)?

I have noticed that the image is in an invisible folder called .windowbg (the image itself being called .windowbg.jpeg). I tried replicating that folder (and its corresponding image) in a newly created .dmg (using dmgmaker) but it did not work.

While we're at it: anyone found a way to define a fixed window position and size for .dmg disk images (quite useful if a background image is there...).

Colddiver, newbie Cocoa developer


----------



## endian (Jul 23, 2001)

You should just be able to set it like any other window - through view options. As far as Finder is concerned, a disk image is just another volume. I have had trouble getting it to stick sometimes, but now that I think about it I may have been trying to edit a read-only image.


----------



## colddiver (Jul 23, 2001)

Humm... I tried using the View Options as you suggested and it didn't work. I will try again...

in the meantime, if someone know a more reliable way to do this, I would like to know.

Colddiver


----------



## monty (Aug 1, 2001)

AFAIK, the name of the file and the folder it's in is irrelevant, as long as it's invisible so that the user can't SEE it. Then select that file in the view options for that window as the background.

Note: I haven't actually done this so it may not work but I have set a picture as the background for other windows, just never on a disk image. But a can't see how it wouldn't work.

Peter


----------



## simon_h_82 (Jun 21, 2005)

I think you might be able to click
  -  view
  -  show view options
  -  under background
  -  show picture

thats what ive been doing


----------



## Randman (Jun 22, 2005)

Once the dmg is created, Apple i for info and copy and paste the new icon just as you would with any other icon change.


----------



## ElDiabloConCaca (Jun 22, 2005)

I think they (Omni) set up a regular folder the way they wanted it complete with background image and icon placement, then used Disk Utility and made an image from that folder (File > New > Disk Image from Folder).

Your background image doesn't have to be hidden, they just do that so there's no clutter on the disk image -- just the application and whatever needs to be seen by the user.


----------



## btoth (Jun 23, 2005)

The easiest way I've found:

1) Create new disk image as read/writable from the folder of files you want on the disk image, including the image.

2) Open the disk image in a new window, position everything how you want it, size the window.

3) Set the view options to that image

4) With the developer tools installed, there's a tool in /developer/tools called SetFile.  type in /developer/tools/setfile -V imagefilename  (the uppercase V makes it invisible in the Finder) in the Terminal

5) Convert your disk image to compressed or whatever.


----------



## gopa810 (Oct 30, 2009)

I have found this here:

http://mac101.net/content/how-to/how-to-create-dmg-art-for-fancy-application-installations/


----------

