10.3. Application BundlesApplications are the most common type of bundle (see Figure 10.3). An application directory has a name with the suffix .app. The .app directory is a file package; even though it is a directory, the Finder treats it as a single entity. This allows the author of the application to place auxiliary files for the application in a known placeinside the application bundle itselfwith little fear that such files will be misplaced or deleted. Figure 10.3. The structure of a typical application bundle. The executable file is at Contents/MacOS/Application. The application's human interface for English-speaking users is specified in Contents/Resources/English.lproj/MainMenu.nib; presumably, a French version of MainMenu.nib is inside Contents/Resources/FR.lproj. The custom image for a button, ButtonImage.tif, is common to all languages and therefore appears directly in the Resources directory.The Contents directory of an application bundle contains
Individual resource files can be restricted to a target architecture by appending a hyphen and the architecture name to the resource's base name. This way, an application may ask for picture.tif, and the Core Foundation bundle manager will return picture-macos.tif or picture-macosclassic.tif, as appropriate. |
Friday, October 30, 2009
Section 10.3. Application Bundles
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment