Re: FxPlugins & creator codes
Re: FxPlugins & creator codes
- Subject: Re: FxPlugins & creator codes
- From: Steve Christensen <email@hidden>
- Date: Thu, 28 Apr 2011 11:46:47 -0700
My, my, you kids with no sense of history. :) That particular error is a resource manager error. As I recall from a previous life it has to do with the resource map structure in a resource file (resource or data fork) being inconsistent, damaged or missing.
Probably for what Rainer's seeing, the icon resource(s) are in the resource fork, not the data fork. If you look below, ResMerger specifies that the source icons come from GenericPluginIcon.rsrc's data fork (-srcIs DF) and get copied into the bundle's icon file's resource fork (-dstIs RSRC). I did it that way to make sure that everything played well with source control. If your source icons are in the resource fork, change the command to -srcIs RSRC.
On Apr 27, 2011, at 2:15 PM, Darrin Cardani wrote:
> Well, it probably doesn't help too much, but according to CarbonCore/MacErrors.h:
>
>> mapReadErr = -199, /*map inconsistent with operation*/
>
> I've asked the devtools team if they can explain what it means. The description makes it sound like a file system error of some sort, but I'm not entirely sure. I'll let you know if I get any responses.
>
> Darrin
>
> On Apr 27, 2011, at 12:33 PM, Rainer Standke wrote:
>
>> That works better, changing it to perl. Thanks, Paul.
>>
>> However, I still get an error:
>>> file /GenericPluginIcon.rsrc: ### ResMerger - ERROR: mapReadErr
>>
>> It seems like it finds the file there, but it seems like it doesn't like it - what gives?
>>
>> Thanks,
>>
>> Rainer
>>
>>
>>
>> On Apr 27, 2011, at 10:45, Paul Schneider wrote:
>>
>>>
>>> It looks like Steve's script is not sh, but some other language, possibly perl? Try changing the shell to /usr/bin/perl.
>>>
>>>
>>> On Apr 27, 2011, at 12:34 PM, Rainer Standke wrote:
>>>
>>>> Hello Steve,
>>>>
>>>> so I am finally getting around to trying this, and I am running into problems.
>>>>
>>>> here is the script I am using, running as the last build phase:
>>>>
>>>>> my $BUNDLE = "$ENV{BUILT_PRODUCTS_DIR}/$ENV{WRAPPER_NAME}";
>>>>> my $SRCICON = "$ENV{PROJECT_DIR}/Resources/images/GenericPluginIcon.rsrc";
>>>>> my $DESTICON = "$BUNDLE/Icon\r";
>>>>>
>>>>> # copy the custom icon to the target's bundle, renaming it to "Icon\r" along the way
>>>>> `rm -f "$DESTICON"`;
>>>>> `ResMerger -srcIs DF -dstIs RSRC "$SRCICON" -o "$DESTICON"`;
>>>>>
>>>>> # make the copied icon file invisible
>>>>> `/Developer/Tools/SetFile -a V "$DESTICON"`;
>>>>>
>>>>> # mark the bundle as having a custom icon
>>>>> `/Developer/Tools/SetFile -a C "$BUNDLE"`;
>>>>
>>>>
>>>> Here are the errors I get:
>>>>
>>>>> PhaseScriptExecution "Run Script" "/Users/rainer/Documents/Rainer's Dev Stuff/build files/FXPlugGenerator1.build/Debug/FXPlugGenerator1.build/Script-D5D3121513687B9B005BD029.sh"
>>>>> cd "/Users/rainer/Documents/Rainer's Dev Stuff/Xcode Projects/XXX/XXX 2011/FXPlugGenerator1"
>>>>> /bin/sh -c "\"/Users/rainer/Documents/Rainer's Dev Stuff/build files/FXPlugGenerator1.build/Debug/FXPlugGenerator1.build/Script-D5D3121513687B9B005BD029.sh\""
>>>>>
>>>>> /Users/rainer/Documents/Rainer's Dev Stuff/build files/FXPlugGenerator1.build/Debug/FXPlugGenerator1.build/Script-D5D3121513687B9B005BD029.sh: line 2: my: command not found
>>>>> /Users/rainer/Documents/Rainer's Dev Stuff/build files/FXPlugGenerator1.build/Debug/FXPlugGenerator1.build/Script-D5D3121513687B9B005BD029.sh: line 3: my: command not found
>>>>> /Users/rainer/Documents/Rainer's Dev Stuff/build files/FXPlugGenerator1.build/Debug/FXPlugGenerator1.build/Script-D5D3121513687B9B005BD029.sh: line 4: my: command not found
>>>>> file : ### ResMerger - ERROR: errFSMissingName
>>>>> /Users/rainer/Documents/Rainer's Dev Stuff/build files/FXPlugGenerator1.build/Debug/FXPlugGenerator1.build/Script-D5D3121513687B9B005BD029.sh: line 11: ERROR:: command not found
>>>>> /Users/rainer/Documents/Rainer's Dev Stuff/build files/FXPlugGenerator1.build/Debug/FXPlugGenerator1.build/Script-D5D3121513687B9B005BD029.sh: line 14: ERROR:: command not found
>>>>
>>>> Any idea what I am doing wrong?
>>>>
>>>> Thanks!
>>>>
>>>> Rainer
>>>>
>>>>
>>>> On Apr 7, 2011, at 11:26, Steve Christensen wrote:
>>>>
>>>>> On Apr 7, 2011, at 9:18 AM, Darrin Cardani wrote:
>>>>>
>>>>>> On Apr 6, 2011, at 6:24 PM, Rainer Standke wrote:
>>>>>>
>>>>>>> should one supply a custom, Apple-issued creator code for an FxPlug bundle?
>>>>>>
>>>>>> Nope. The UUID in the Info.plist is sufficient.
>>>>>>
>>>>>>> Also, my bundle gets built with just the regular folder icon - is there something I can do to have it have the plugin icon?
>>>>>>
>>>>>> That's a good question. I see this, too. I've asked internally and will let you know what they tell me.
>>>>>
>>>>> The plugins take on the default icon due to their extension, so supplying a creator won't make a difference. When I've wanted to specify the plugin icon, I've done so by applying a custom icon to the bundle using a target script that runs after the rest of the plugin is built. Here's what I've used. Please note that the source icon is a data fork based resource file containing a 'icns' #-16455 resource.
>>>>>
>>>>> steve
>>>>>
>>>>> -------------------------------------
>>>>> my $BUNDLE = "$ENV{BUILT_PRODUCTS_DIR}/$ENV{WRAPPER_NAME}";
>>>>> my $SRCICON = "$ENV{PROJECT_DIR}/path/to/icon.rsrc";
>>>>> my $DESTICON = "$BUNDLE/Icon\r";
>>>>>
>>>>> # copy the custom icon to the target's bundle, renaming it to "Icon\r" along the way
>>>>> `rm -f "$DESTICON"`;
>>>>> `ResMerger -srcIs DF -dstIs RSRC "$SRCICON" -o "$DESTICON"`;
>>>>>
>>>>> # make the copied icon file invisible
>>>>> `/Developer/Tools/SetFile -a V "$DESTICON"`;
>>>>>
>>>>> # mark the bundle as having a custom icon
>>>>> `/Developer/Tools/SetFile -a C "$BUNDLE"`;
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden