I have created a package using PackageMaker and want to change the default icon for .pkg file. After some googling, seticon utility from here http://sveinbjorn.org/osxutils_docs solved my problem for all OSX-es except the latest Lion 10.7 (Kernel 11.0.0). The default icon was replaced by grey square insensitive for double clicks, looks like broken file association.
Additional two days googling gave me some knowledge about resource fork, SetFile(1) and some other useful staff like this old thread Changing icon of package created by package maker but still no luck.
I am trying to do something like:
target=pack.pkg
icon_filename="$(perl -e 'print "Icon\r"')"
touch "$target/..namedfork/rsrc/$icon_filename"
cp "Icon.icns" "$target/..namedfork/rsrc/$icon_filename"
/Developer/Tools/SetFile -a C "$target"
and getting: build-Mac:pack.pkg/..namedfork/ not a directory.
What am I doing wrong? Does anyone can tell me the difference in resource fork in Lion? Any other script-able solution?
Please note, I am a total newbie in MACs and will appreciate a detailed answer for dummies.