• 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: Rez include problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rez include problem


  • Subject: Re: Rez include problem
  • From: Allen Cronce <email@hidden>
  • Date: Mon, 27 Mar 2006 15:11:20 -0800

Hey Steve! Long time no talk!

Thanks to everyone who answered. I found that changing the include statement to a relative path from the source tree got me further. Something like this:

include "../../../BuildResults/Release/MyCarbonLib" 'cfrg' (0) AS 'XFRG' (0);

Now I consistently get this new error:

/Developer/Tools/Rez - The resource file "../../../BuildResults/Release/MyCarbonLib" appears to be corrupt.

So I guess that means that Rez doesn't support traditional resource fork based files. Or as per Steve's doc spelunking, the include files have to be using the same fork as the output file. So I'll look into transitioning to a datafork based resource, as per Chris' suggestion.

Best,
--
Allen Cronce

Steve Christensen wrote:
On Mar 26, 2006, at 3:47 PM, Allen Cronce wrote:

I'm running into an error while trying to import a specific resource from a CodeWarrior generated CFM shared library (where the code is in the data fork and the resources are in the resource fork), and save it in the target as another resource type.

Here's the failing line from the .r file:

include "MyCarbonLib" 'cfrg' (0) AS 'XFRG' (0);

What is supposed to happen is the 'cfrg' 0 resource should be copied from the "MyCarbonLib" file and saved as an 'XFRG' resource in the target. This works with CodeWarrior. But under Xcode 2.2.1, I get the following error:

/Developer/Tools/Rez - SysError -43, resource file "MyCarbonLib" not found.

I've verified that the MyCarbonLib file is included in the project. And I've tried adding the path to the file's parent directory in the REZ_SEARCH_PATHS option. But I still get this error.

I had a bunch of problems with this, too. I added a -i "$(SRCROOT)/resources/directory/path" (with quotes) to the "Other Rez Flags" and it seemed to be better at finding things but I occasionally get weird not found errors. It would be nice if Rez could dump out the paths it tried (and failed) so you can see where it thinks the files are supposed to be.


Maybe the rez tool is expecting data fork based resources instead of traditional resource files? But if that's the case, it would be nice to get some error other than "file not found".

I seem to recall seeing a mention in one of the docs that include files must have resources in the same fork as the output resource file. This is, of course, unfortunate if you're trying to move resource fork based resources into another file's data fork.


I suppose I could derez the 'cfrg' resource from the library, then include the resulting .r file in the Xcode project. But since it's dynamically created when CW makes the library, that's a bit cumbersome. I guess I could automate this in our build process somehow, but I'm trying to avoid a second career as a build engineer ;-)

I ended up converting several resource files to .r files, though fortunately for me, they're static resources. It sounds like adding a script to the build process should do it. I'm not sure if you'd need to run it at the end of the target that builds the CFM file or if you could do it in the one that uses it. For the latter case, I'm just thinking that the build dependencies for the receiving target might be determined before you'd had a chance to DeRez the CFM file.


steve

_______________________________________________
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


_______________________________________________ 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
References: 
 >Rez include problem (From: Allen Cronce <email@hidden>)
 >Re: Rez include problem (From: Steve Christensen <email@hidden>)

  • Prev by Date: Re: Strip and universal binaries
  • Next by Date: Re: Accelerated Obj-C Dispatch on Intel Only
  • Previous by thread: Re: Rez include problem
  • Next by thread: Help with Xcode i386 Link problems
  • Index(es):
    • Date
    • Thread