Re: Custom icon for bundle?
Re: Custom icon for bundle?
- Subject: Re: Custom icon for bundle?
- From: Greg Guerin <email@hidden>
- Date: Sat, 10 Jun 2006 19:54:10 -0700
Jim Wintermyre wrote:
>The one problem is that it seems that the custom icon is not actually named
>"Icon", it's got some non-ASCII character appended to the end. If you do an
>ls of the bundle directory in the terminal, it shows "Icon?" for the icon
>file since it can't display this last character.
>
>This is probably a Stupid Terminal Question (tm), but how do I figure out
>what that non-printing character is, and then incorporate it into my script?
You don't have to know what the character is, as long as you know it's only
one character, which it is.
You just use the shell's single-char wild-card whenever you have to refer
to the file specifically, and you use cp's ability to take a target-dir
instead of a target-file, where it puts the copy with its original name.
e.g.:
cp "path_to_src_icon"/Icon? "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}"
/Developer/Tools/SetFile -a V "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}"/Icon?
Note the change in quoting to the SetFile command, so the wild-carded
pattern is OUTSIDE the quotes. You could put everything except the
wild-card inside the quotes, if you wanted.
I thought the Finder still put custom-icons into the resource-fork of the
icon-file, but I could be wrong. If it does, 'cp' won't work, and you
should use 'ditto --rsrc ...' (see 'man ditto').
The only other gotcha is don't have more than one file that matches the
pattern Icon?, otherwise weird things will happen.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden