Home      Discussion      Topics      Dictionary      Almanac
Signup       Login
Bundle (NEXTSTEP)

Bundle (NEXTSTEP)

Discussion
Ask a question about 'Bundle (NEXTSTEP)'
Start a new discussion about 'Bundle (NEXTSTEP)'
Answer questions from other users
Full Discussion Forum
 
Encyclopedia
In NEXTSTEP
NEXTSTEP
NeXTSTEP was the object-oriented, multitasking operating system developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube...

, OPENSTEP
OpenStep
OpenStep was an object-oriented application programming interface specification for an object-oriented operating system that used a non-NeXTSTEP operating system as its core, principally developed by NeXT with Sun Microsystems. OPENSTEP was a specific implementation of the OpenStep API developed...

, their lineal descendants Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, iOS, and in GNUstep
GNUstep
GNUstep is a free software implementation of Cocoa Objective-C libraries , widget toolkit, and application development tools not only for Unix-like operating systems, but also for Microsoft Windows. It is part of the GNU Project.GNUstep features a cross-platform, object-oriented development...

, a bundle is a directory
Directory (file systems)
In computing, a folder, directory, catalog, or drawer, is a virtual container originally derived from an earlier Object-oriented programming concept by the same name within a digital file system, in which groups of computer files and other folders can be kept and organized.A typical file system may...

 that allows related resources such as an application's executable and its graphics to be grouped together, appearing as a single file to the user.

Examples include applications
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

, frameworks
Application framework
In computer programming, an application framework consists of a software framework used by software developers to implement the standard structure of an application for a specific development environment ....

, and plugins. They are accessed with the NSBundle class in Cocoa
Cocoa (API)
Cocoa is Apple's native object-oriented application programming interface for the Mac OS X operating system and—along with the Cocoa Touch extension for gesture recognition and animation—for applications for the iOS operating system, used on Apple devices such as the iPhone, the iPod Touch, and...

, NEXTSTEP
NEXTSTEP
NeXTSTEP was the object-oriented, multitasking operating system developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube...

 and GNUstep
GNUstep
GNUstep is a free software implementation of Cocoa Objective-C libraries , widget toolkit, and application development tools not only for Unix-like operating systems, but also for Microsoft Windows. It is part of the GNU Project.GNUstep features a cross-platform, object-oriented development...

's Foundation
Foundation Kit
The Foundation Kit, or just Foundation for short, is an Objective-C framework in the OpenStep specification. It provides basic classes such as wrapper classes and data structure classes. This framework uses the prefix NS .-NSObject:...

 frameworks, and with CFBundle in Core Foundation
Core Foundation
Core Foundation is a C application programming interface in Mac OS X & iOS, and is a mix of low-level routines and wrapper functions...

.

A bundle usually contains one file representing executable code, and files that represent resources such as nibs, images, sounds, and other media. On some other systems, such as Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

, 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
Metadata
The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

 can be added to a file's resource fork
Resource fork
The resource fork is a construct of the Mac OS operating system used to store structured data in a file, alongside unstructured data stored within the data fork. A resource fork stores information in a specific form, such as icons, the shapes of windows, definitions of menus and their contents, and...

. The Finder treats bundles, which can also be referred to as packages
Package (Mac OS X)
Under Mac OS X, a package is a directory that is normally treated by the Finder as a single file, with the components of the object that the package represents being stored in files in the directory tree under that directory...

, as opaque files with no underlying structure.

The Uniform Type Identifier
Uniform Type Identifier
A Uniform Type Identifier is a text string used on software provided by Apple Inc. to uniquely identify a given class or type of item...

 (UTI) for an Apple bundle is com.apple.bundle.

Similar in concept are the application directories
Application directory
An application directory is a grouping of software code, help files and resources that together comprise a complete software package but are presented to the user as a single object....

 used in RISC OS
RISC OS
RISC OS is a computer operating system originally developed by Acorn Computers Ltd in Cambridge, England for their range of desktop computers, based on their own ARM architecture. First released in 1987, under the name Arthur, the subsequent iteration was renamed as in 1988...

 and on the ROX Desktop
ROX Desktop
The ROX Desktop is a graphical desktop environment for the X Window System. It is based on the ROX-Filer which is a drag and drop spatial file manager. It is free software released under the GNU General Public License. The environment was inspired by the user interface of RISC OS...

, and the RUNZ bundles in Super OS.

Mac OS X application bundles


Application bundles are directory hierarchies, with the top-level directory having a name that ends with a .app extension. In an application bundle, the first directory in the bundle underneath the top-level directory is usually named Contents. Within Contents there is usually another directory (called MacOS on Macs, or using the application's name on GNUstep
GNUstep
GNUstep is a free software implementation of Cocoa Objective-C libraries , widget toolkit, and application development tools not only for Unix-like operating systems, but also for Microsoft Windows. It is part of the GNU Project.GNUstep features a cross-platform, object-oriented development...

), which contains the application's executable code. Within the Contents folder there is usually also 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 file
Interface Builder
Interface Builder is a software development application for Apple's Mac OS X operating system. It is part of Xcode , the Apple Developer Connection developer's toolset. Interface Builder allows Cocoa and Carbon developers to create interfaces for applications using a graphical user...

s.

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.

Mac OS X framework bundles


Mac OS X frameworks are also stored as bundles; the top-level directory of a framework bundle has a name that is the name of the framework followed by the extension .framework. In the top-level directory is a Versions directory, with subdirectories for one or more versions of the framework, each subdirectory containing the dynamic library code for the framework, in a file whose name is the same as the name of the framework, possibly with a Headers folder containing header file
Header file
Some programming languages use header files. These files allow programmers to separate certain elements of a program's source code into reusable files. Header files commonly contain forward declarations of classes, subroutines, variables, and other identifiers...

s for the framework, and other subfolders such as Resources. The Versions directory also contains a symbolic link Current to the directory for the current version of the framework. In the top-level directory are symbolic links to the contents of Versions/Current..

Mac OS X loadable bundles


Loadable bundles are bundles which contain code that can be loaded at runtime. Loadable bundles usually have the extension .bundle and are most often used as plug-ins. An example of an application that traditionally supports bundles is 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
Safari (web browser)
Safari is a web browser developed by Apple Inc. and included with the Mac OS X and iOS operating systems. First released as a public beta on January 7, 2003 on the company's Mac OS X operating system, it became Apple's default browser beginning with Mac OS X v10.3 "Panther". Safari is also the...

.

Other bundle formats


There are many third-party Mac OS X applications which utilize their own custom bundle format (e.g. CandyBar
CandyBar
CandyBar is a Mac OS X application by Panic and The Iconfactory that replaces system icons with icons/docks of the user's choosing. The latest release, CandyBar 3, runs on Mac OS X 10.5 "Leopard" and 10.6 "Snow Leopard" and supports high-resolution 512-by-512 Leopard icons, as well as changing the...

's .iContainer bundles).

.lproj


An .lproj file is a bundle that contains localization files for Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 software. It typically contains the .nib files for a given language along with string files and images if need be (for example, ReadMe
README
A readme file contains information about other files in a directory or archive and is commonly distributed with computer software. Such a file is usually a text file called README.TXT, README.1ST, READ.ME, or simply README, although some Microsoft Windows software may occasionally include a...

 or license files). These localized files are used by install makers to customize install packages. They are also included into an application bundle.

See also

  • Application Directory
    Application directory
    An application directory is a grouping of software code, help files and resources that together comprise a complete software package but are presented to the user as a single object....

     — the RISC OS
    RISC OS
    RISC OS is a computer operating system originally developed by Acorn Computers Ltd in Cambridge, England for their range of desktop computers, based on their own ARM architecture. First released in 1987, under the name Arthur, the subsequent iteration was renamed as in 1988...

     analogue to an application bundle
  • klik — A Linux application that makes use of similar principles
  • RUNZ

External links