Re: Re[2]: Customizing DMG(Apply Background image and Icons)
Re: Re[2]: Customizing DMG(Apply Background image and Icons)
- Subject: Re: Re[2]: Customizing DMG(Apply Background image and Icons)
- From: Michael Watson <email@hidden>
- Date: Wed, 7 Nov 2007 19:30:07 -0500
Oops. For clarification, I'm strictly speaking of automating the
process without icky GUI scripting, not doing it by hand in the Finder.
--
m-s
On 07 Nov, 2007, at 19:28, Michael Watson wrote:
Good news and bad news for you. Let's start with the good news.
You can set the "background picture" property of a folder's
container window with Finder via AppleScript. In order to get this
to work with a disk image's mounted volume, you have to mount the
volume, copy the image file to the volume, open the window of the
volume, then set the property for that. Set it as invisible with
SetFile and you're done.
Easy peasy. (I do this all the time in my custom dmg tool chain.) If
you set the volume's window to an image on your drive, well, it
won't be found when the disk image mounts. (It has to be present on
the image volume.)
NOW FOR THE BAD NEWS:
In Leopard, the ability to set the background picture of a folder
window is somewhat broken. In fact, you're going to get this error
if the background picture resides on a mounted volume, which is
required to get this to work:
"Finder got an error: Couldn't make file [path to background picture
on the volume] into type file."
Works in Tiger perfectly, doesn't in Leopard. But if the background
picture resides on your hard drive, you can set the background
picture of a folder successfully.
Nutshell: If the background picture resides on a mounted volume, the
command won't work.
I filed a bug on this one yesterday. rdar://5582578
--
m-s
On 07 Nov, 2007, at 04:04, Peter Mulholland wrote:
Hello Stéphane,
Wednesday, November 7, 2007, 7:56:13 AM, you wrote:
1. Copy the background picture file to the Disk Image
2. Use the View Options inspector to set the background image.
3. Make the background image invisible with the /DevTools/SetFile
utility. The most difficult part here is to remember whether it's
v or
V that makes a file invisible.
It's -aV - uppercase to set, lowercase to remove.
You can also use the UNIX way - call the file .background.png or so.
The only problem with this is it can be a bit of a swine to set it in
Finder, although if memory serves you can put in the filename into
the
file dialog and it will find it. I do it this way because up until
this post, I didn't realise there were extra file flags :)
What I would like to know, is if there is any way to set the
background image without having to faff about in Finder - some
command
line tool, for example. I guess you could make Finder do it with some
AppleScript.
1. Select the mounted disk image volume
2. Choose File >> Get Info
3. Click on the icon zone in the Info window and copy and paste your
icon
A better solution could be to use Pixadex to set the icon.
Or just copy a file as .VolumeIcon.icns to the root of the dmg :)
--
Best regards,
Peter mailto:email@hidden
_______________________________________________
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
_______________________________________________
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