• 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: Set Document Icon from the Command Line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set Document Icon from the Command Line


  • Subject: Re: Set Document Icon from the Command Line
  • From: Brian Ray <email@hidden>
  • Date: Wed, 11 Apr 2007 11:03:13 -0500


On Apr 11, 2007, at 10:43 AM, Ken Mankoff wrote:


Is there a way to set the document icon from the command line? I am able to set a folder icon by copying the "Icon^M" file into the directory, but have not found a way to do this for a file/document. I know about the 'hidden' rsrc/ sub-folder attached to every file, and am comfortable using the Rez and DeRez CLI tools, but their man page did not help...

Why bother setting the icon in the resource fork?

I think the the icon is associated with the document type in the Applications Info.plist.

Something like:

 .....
   <key>CFBundleDocumentTypes</key>
   <array>
      <dict>
         <key>CFBundleTypeExtensions</key>
         <array>
            <string>abc</string>
            <string>text</string>
         </array>
         <key>CFBundleTypeIconFile</key>
         <string>MyExample.icns</string>
        ....

Although, you may need to tell launch services or have the finder see the Application bundle in some way--like opening the directory where its contained.

Brian Ray
email@hidden
http://kazavoo.com/blog


_______________________________________________ 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: Set Document Icon from the Command Line
      • From: "Ken Mankoff" <email@hidden>
References: 
 >Set Document Icon from the Command Line (From: "Ken Mankoff" <email@hidden>)

  • Prev by Date: Re: Set Document Icon from the Command Line
  • Next by Date: Re: Set Document Icon from the Command Line
  • Previous by thread: Re: Set Document Icon from the Command Line
  • Next by thread: Re: Set Document Icon from the Command Line
  • Index(es):
    • Date
    • Thread