Bundle (NEXTSTEP)

Bundle (NEXTSTEP)

Under NEXTSTEP, Mac OS X and GNUstep, a bundle is a directory that allows related resources such as software code to be grouped together. They were introduced into the Macintosh world as "packages" in Mac OS 9 and are similar in concept to the Application Directories used in RISC OS and on the ROX Desktop.

Applications, frameworks, and plugins are most commonly grouped as bundles, although documents can also be grouped as bundles. They are manipulated with the NSBundle class in the NeXT Foundation kit, and with CFBundle under Core Foundation.

A bundle usually contains one file representing executable code, and files that represent resources such as nibs, images, sounds, and other media. On other systems such as Microsoft Windows, these resources are usually included directly in the executable file itself at compile time. On older Macintoshes, a similar technique is used, where additional metadata can be added to a file's resource fork. Beginning with the Mac OS X, however, the NEXTSTEP concept of bundles was adopted for this purpose. Most types of bundles are used and interacted with as though they were ordinary files on the system in an attempt to reduce accidental tampering. A bundle also aims to ease problems associated with organizing resources by using a more simple structure of hierarchical directories rather than the resource fork.

The Uniform Type Identifier (UTI) for a bundle is com.apple.bundle and for a package is com.apple.package.

Application Bundles

Application bundles are often presented to users as a single file known as a "package". This file is really a directory ending in a .app extension. Control-clicking (or right-clicking) on the package allows a user to open up the bundle and see the contents. In an application, the first directory in the bundle is usually Contents; within contents there is usually another directory with the executable code (called MacOS for Macs, or the application's name for GNUstep), which contains the application's executable code, and a directory called Resources, which contains the resources of the application.

Among other things, the Resources folder contains localized versions of the application's nib files.

Other common subdirectories include Plugins, Frameworks, and Shared Frameworks. The Frameworks directory contains frameworks used by the application, and are used even if another version of the framework exists on the system. The Shared Frameworks directory contains frameworks that can be used both by the application that contains them, and other applications; they are used only if a newer version does not exist elsewhere on the system. Plugins contains extensible code used by the application.

The UTI for an application is com.apple.application and an application bundle is com.apple.application-​bundle .

Loadable Bundles

Loadable bundles are bundles which contain code that can be loaded at runtime [ [http://developer.apple.com/documentation/Cocoa/Conceptual/LoadingCode/Concepts/AboutLoadableBundles.html Code Loading Programming Topics for Cocoa: About Loadable Bundles ] ] . Loadable bundles usually have the extension .bundle and are most often used as plug-ins. An example of application which traditionally supports bundles is Apple Mail [ [http://www.tikouka.net/mailapp/ Apple Mail plug-ins and tools ] ] [ [http://hawkwings.net/plugins.htm Hawk Wings - Plug-ins for Apple Mail ] ] . On Mac OS X there is a way to load bundles even into applications that don't support them allowing for third party hacks for popular applications such as Safari [ [http://pimpmysafari.com/plugins/ Pimp My Safari: plugins ] ] .

Other bundle formats

Other bundles include Rich Text Format documents with images, which carry the .rtfd extension, OS X widgets, and partially downloaded files in Safari, which carry the .download extension. In GarageBand, Keynote, Pages, Numbers, iMovie HD and Xcode the project files are also represented as bundles.

Apple's installer packages (.pkg) are bundles that contain pax archives. See Installer (Mac OS X).

There are many third-party Mac OS X applications which utilize their own custom bundle format (e.g. CandyBar's .iContainer bundles).

References

ee also

* Application Directory - the RISC OS analogue to an application bundle
* klik - A Linux application that makes use of similar principles

External links

* [http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/CFBundles.html Bundle Programming Guide] at Apple Developer Connection
* [http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSBundle.html NSBundle documentation] from the GNUstep project
* [http://www.sveinbjorn.org/platypus Platypus] - a tool to create application bundles around scripts


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Bundle — may refer to:In mathematics: * Fiber bundle, in particular in topology, a space that looks locally like a product space *Bundle (mathematics), a generalization of a fiber bundle dropping the condition of a local product structureIn medicine: *… …   Wikipedia

  • NeXTSTEP — graphical user interface Company / developer NeXT OS family Unix like Working state …   Wikipedia

  • Bundle — ist ein Begriff aus dem Englischen und steht für „Bündel“. Die Bezeichnung wird oft bei PC Produkten verwendet und kann hier verschiedene Bedeutungen haben. Bundle als Bündelung von zwei verschiedenen Produkten, die zusammenpassen. Neuen… …   Deutsch Wikipedia

  • Document (Informatique) — Cet article court présente un sujet plus amplement développé ici : Document. En informatique, le mot document, notion de l interface utilisateur, est généralement synonyme de fichier, mais sur Mac OS X il peut aussi s agir d un… …   Wikipédia en Français

  • Document (informatique) — Cet article court présente un sujet plus développé dans : Document. En informatique, le mot document, notion de l interface utilisateur, est généralement synonyme de fichier, mais sur Mac OS X il peut aussi s agir d un bundle (en) qui… …   Wikipédia en Français

  • Document informatique — Document (informatique) Cet article court présente un sujet plus amplement développé ici : Document. En informatique, le mot document, notion de l interface utilisateur, est généralement synonyme de fichier, mais sur Mac OS X il peut aussi s …   Wikipédia en Français

  • Zekr — У этого термина существуют и другие значения, см. Зикр (значения). Zekr …   Википедия

  • Property List — Vorlage:Infobox Dateiformat/Wartung/MagischeZahl fehltVorlage:Infobox Dateiformat/Wartung/Standard fehltVorlage:Infobox Dateiformat/Wartung/Website fehlt Property List Dateiendung: .plist MIME Type: application/x plist …   Deutsch Wikipedia

  • HP-UX — 11i Famille Unix Type de noyau Noyau monolithique avec modules chargeables dynamiquement Plates formes IA 64 …   Wikipédia en Français

  • Cocoa (API) — Cocoa Developer(s) Apple Written in Objective C Operating system Mac OS X Type Software framework …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”