• 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: Resource forks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resource forks


  • Subject: Re: Resource forks
  • From: Ricky Sharp <email@hidden>
  • Date: Sun, 25 Apr 2004 08:08:08 -0500

On Apr 25, 2004, at 4:34 AM, Nicolas Zinovieff wrote:

On 25 Apr, 2004, at 07:25, Chris Espinosa wrote:

Yes, "legacy" targets default to resource fork, and you have to add the -useDF flag to use the data fork. Native targets default to -useDF and there is no override to return it to the resource fork.

Just for the sake of descending AND ascending compatibility.

I don't quite understand what you want to be compatible with. Mach-O binaries shouldn't have resource forks, and Xcode can't create CFM binaries, so I don't understand the need for Xcode to create binaries with resource-fork data.

I don't know about the "shouldn't". I have this project that comes from a long way and uses resource forks in the executable. I maintain it and the fact that xcodes changes such a simple behavior without any way of getting back on my feet is just a pain in the neck.
Nothing I can't handle, but still...

It isn't a pain. The only thing you need to watch out for is that Xcode carbon projects include a CSResourcesFileMapped key in the Info.plist file set to a value of Yes. I had a situation in my application where I needed to decrypt certain resources. That didn't work anymore since the Handle returned by Get1Resource and friends was memory mapped to the .rsrc file on disk and provided read-only access. The immediate workaround was to set that key's value to No. A better workaround is to take advantage of the better performance with the memory mapped resources and just operate on copies of those Handles should you need read/write access.


Other than that, having the resources in the data fork is completely transparent. The runtime loads that data-fork resource file automatically for you and you can continue to use ResMgr APIs as if those resources were in the resource-fork of your executable.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Founder & President
Instant Interactive(tm)   http://www.instantinteractive.com
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Resource forks
      • From: Nicolas Zinovieff <email@hidden>
References: 
 >Re: Resource forks (From: Marc Pergand <email@hidden>)
 >Re: Resource forks (From: Nicolas Zinovieff <email@hidden>)
 >Re: Resource forks (From: Chris Espinosa <email@hidden>)
 >Re: Resource forks (From: Nicolas Zinovieff <email@hidden>)

  • Prev by Date: Re: Resource forks
  • Next by Date: Re: Resource forks
  • Previous by thread: Re: Resource forks
  • Next by thread: Re: Resource forks
  • Index(es):
    • Date
    • Thread