Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Anyone knows how to customize the icon for a standard OS X package?

Anyone knows how to customize the icon for a standard OS X package?
Thread Tools
Senior User
Join Date: Nov 2002
Location: US
Status: Offline
Reply With Quote
Feb 18, 2004, 12:30 PM
 
I'd like to have my own customized icon showing up for my .pkg package, instead of the generic one. I know I can do this by copying/pasting the icon onto the .pkg file. But I'm trying to automate the entire pacakging process using a script (from collecting raw material to producing a final .dmg file containing the .pkg and some other documnets).

Is there anyway to make the icon change automatic? Maybe inserting some .icns file into the resource directory, but with a special filename?

Thanks!
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Feb 19, 2004, 12:46 AM
 
You could create an icon-setting tool using the IconFamily class.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Feb 19, 2004, 01:01 AM
 
Manually paste a custom icon onto the .pkg once: you'll get an "Icon\r" file inside the package. You can then stick that file into your automated process, along with a call to /Developer/Tools/SetFile to set the custom icon bit in the package's metadata (which is what instructs the Finder to use the "Icon\r" file).
Rick Roe
icons.cx | weblog
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:00 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2