• 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: Chris Espinosa <email@hidden>
  • Date: Sun, 25 Apr 2004 10:05:34 -0700

On Apr 25, 2004, at 2: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...

See tech note qa1175:  http://developer.apple.com/qa/qa2001/qa1175.html

Q:  Is it ok to build resources into a resource fork in my Mach-O
binary on Mac OS X?

A: No, you should not add resources in a resource fork to Mach-O
binaries. Tools like strip, ranlib, and update_prebinding will ignore
such binaries in Mac OS X version 10.2 and up, and could erase the
resource fork of Mach-O binaries in Mac OS X versions prior to 10.2.
Tools like update_prebinding will actually be run automatically on
binaries as needed by the system, so don't assume that because you do
not explicitly use such tools, that your binaries are safe. Write
resources that your application needs out to a data fork based resource
file instead.

>> If you want to move resource data to the resource fork of a file, you
>> can always add a shell script build phase that copies the data fork
>> resource file into the resource fork of any file by using the named
>> fork notation, e.g. cp foo.rsrc bar.rsrc/..namedfork/rsrc
>
> Or using resmerger...
> OK, but I honestly don't see the reason behind this crippling...

Because Mach-o binaries with resource forks are fragile; their resource
forks can be removed by a large number of conventional UNIX-style
utilities.

Chris
_______________________________________________
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: Marshall Clow <email@hidden>
    • getting only folder from system
      • From: 김경옥 <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: XCode 1.2 & Redo
  • Previous by thread: Re: Resource forks
  • Next by thread: getting only folder from system
  • Index(es):
    • Date
    • Thread