What's New in QuickTime 5

| Previous | Chapter Contents | Chapter Top | Next |

How and Where Your Component Gets Installed

There are two types of component executables on Mac OS X: Code Fragment Manager (CFM) and Mach-O. You can also build a CFM component updated for Carbon that runs on both Mac OS X and Mac OS 9.

Third-party components are typically stored in the /Library/QuickTime directory, formerly known as the QuickTime Extensions folder. Programmatically, you find this folder by calling FindFolder with the constant kQuickTimeExtensionsFolderType .

Both types of executables -- CFM and Mach-O -- can be packaged in either one of two ways.

  1. The "monolithic" way, i.e., where you have a single file that has a resource fork and a data fork. The data fork will contain the code and the resource fork will contain the 'thng' resource and any other resources that are required. In the case of CFM, they would also contain the 'cfrg' resource. The binary could be a CFM executable or a Mach-O executable. Executables that are packaged this way in the /Library/QuickTime directory tend to have their file names ending in .qtx in order to identify them.
  2. The other way of packaging components is by means of bundle (directory) packaging, which is typically used by plug-ins and applications. (For more information about bundles, refer to Inside Mac OS X: System Overview, Chapter 4, "Bundles," which is available for download at http://developer.apple.com/documentation/MacOSX/SystemOverview/SystemOverview.pdf.)

As far as components are concerned, there are two important differences between the regular plug-in bundle and the component as a bundle. These have to do with the bundles' package info file -- PkgInfo -- which is an 8 byte file that's effectively a type and creator for the bundle, with the first 4 bytes being the type and the second 4 bytes being the creator. For example, Apple's components all have 'thngapp1' in that file. Similarly, in the Info.plist file within the bundle that's an XML property list, there is a key in the Info.plist file called CFBundlePackageType . It should have the value 'thng' to identify this as a component.


© 2001 Apple Computer, Inc.

What's New in QuickTime 5

| Previous | Chapter Contents | Chapter Top | Next |