Re: Old-style resource files in mach-o project
Re: Old-style resource files in mach-o project
- Subject: Re: Old-style resource files in mach-o project
- From: Michael Casteel <email@hidden>
- Date: Mon, 5 Sep 2005 15:27:09 -0700
On 9/5/05, Jonny Taylor said:
>I'm trying to migrate an old CFM Carbon project to xCode. I've got
>everything compiling and linking, but the app is failing at runtime
because
>there are resources that it expects to find which are not there.
>
>The old app (build under CW) has both .rsrc and .r files whose contents
end
>up in the app's resource fork. The app is not bundled or anything like
that.
>[...].rsrc or
>..r files. The .rsrc file is copied to Contents/Resources, but the
resultant
>file has both the data and resource forks empty. Xcode doesn't seem to
be
>doing anything with the .r file at all.
Sounds like your .rsrc and .r files have not made their way into a
'Build Resource Manager Resources' build phase in your target. You want
to add such a build phase and drag+drop your .rsrc and .r files into it.
It's the first build phase under my Target.
In my project, this results in the necessary processing to compile the
.r files and merge the .rsrc file into a single (data fork) resource
file.
What you are seeing with your old-style (resource fork) .rsrc file is a
result of XCode's default copying scheme: data fork only. The .rsrc file
doesn't have one of those.
If you need to copy a resource fork to your executable, there's a Build
setting under 'Packaging' for 'Preserve HFS Data'--if you check it, then
it will preserve the resource fork.
But, there's probably no need for you to do that...if you get your
Resource Build phase working.
After I got this going, it didn't take much effort to work through the
DLOG and WIND resources, migrating them to my Interface Builder NIB. Now
there are a few resources left which haven't seemed worth while
converting. Mostly PICT images; I'll have to do them someday, but it
looks like a lot of work from where I sit.
--
Mike Casteel
email@hidden Seattle, WA
_______________________________________________
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