|
|
||||||||||||||
|
| < Previous PageNext Page > |
A bundle can contain any number of files containing Resource
Manager–style resources in their data forks. These resource files—which,
by convention, have an extension of .rsrc —are
treated as bundle resources just as any other kind of file under
the Resources directory. It is possible to
use Core Foundation Bundle Services to get a CFURL type to such
a file, convert that to an FSRef type, and then open it using the
Resource Manager. There are, however, two special resource files
that Bundle Services manages for you if you provide them. One is
for nonlocalized resources, and it is called executable
name.rsrc,
where executable name is the name of
your main executable. This file is stored with the other nonlocalized
resources, in the Resources directory.
The other file is for localized resources, and it is called Localized.rsrc.
This file is stored in the appropriate .lproj directory,
one version for each language or region. Be sure that the resources
are stored in the file’s data fork, not the resource fork.
When an application is launched, Bundle Services automatically attempts to open these files so that your application's resources are always available. For other bundles—frameworks and loadable bundles—you must do this yourself using the Bundle Services function provided specifically for this purpose.
If for some reason you are unable to convert your Carbon application
to the
bundle scheme,
you can include the
information property list
(Info.plist) in your
single-file application as a resource of type 'plst',
id 0. See “CFM Executables” for more information.
| < Previous PageNext Page > |
Last updated: 2003-08-21
Get information on Apple products.
Visit the Apple Store online or at retail locations. 1-800-MY-APPLE Copyright © 2003 Apple Computer, Inc. All rights reserved. | Terms of use | Privacy Notice |