< Previous PageNext Page > Hide TOC

Managed Installs

As described in “Overview of Software Delivery,” managed installs give you more control over the installation process, which, among other things, allows you to fine-tune the user’s install experience. However, when your product is made up of a single component that doesn’t need to be placed at privileged locations in the file system, such as /Applications or /Library, you should provide users with a manual install for your product. Manual installs are faster and easier to perform for novice and expert users alike. See “Manual Installs” for details.

Multicomponent products benefit from managed installs because you can specify how each of a product’s components is installed. Also, remote installs—which allow you to install products remotely on several computers on a network—are based on managed installs. For more information on remote installs, see “Performing Remote Installs.”

Managed installs provide these features:

On a more detailed level, managed installs provide fine control over the installation process, including:

There are three ways of defining a managed install:

The following sections describe the major elements of managed installs and some of their limitations.

In this section:

Packages
System and Volume Requirements
The Installation Process
The User Install Experience
Postinstallation Process Action
Limitations of Managed Installs


Packages

The central part of a managed install is the installation package, which contains your product and installation information. The following sections describe installation packages and the various types of packages you may need to create when developing a managed install for a product.

What Is a Package?

An installation package (also known as a package) is a file package (a directory that appears in the Finder as a single file) created using the PackageMaker application (/Developer/Applications/Utilities). Packages contain a product or product component—the package’s payload—to be installed on a computer, and install configuration information that determines where and how the product is installed.

Note: Application executables are usually enclosed in a bundle: a structured directory hierarchy that contains resources needed by the application, such as images and localized strings. Because these bundles are normally file packages, the term application package refers to an application bundle that the Finder displays as a single file. However, in this document the term package refers to an installation package, not an application package. For detailed information on Mac OS X bundles, see Bundle Programming Guide.

Packages have the extension .pkg or .mpkg. When a user double-clicks a package in a Finder window, the Installer application opens the package and walks the user through the installation process.

A package can specify details about four aspects of the package itself and its payload:

Component Packages

A complex product, such as the Levon product introduced in “Overview of Software Delivery,” is made up of distinct components. Except for single-component products, component packages are used in conjunction with metapackages or distribution packages (described later in this chapter) to create an install experience. Specifically, component packages:

Component packages have the extension .pkg. Each component package contains a single product component and specifies product information, package properties, installation properties, and install operations.

Note: During an install of a metapackage (described in “Metapackages”), the product information for the contained component packages is not used or shown to the user. The product information for a component package is used only when installing the component package by itself, with no enclosing metapackage. Therefore, product information on a component package is generally used only by someone creating a metapackage or a distribution package containing that component package as they define the product information for the containing package.

Component packages can be installed on their own or as part of the install of a multicomponent product. After the payload of a component package is installed, Installer places a receipt in the /Library/Receipts directory of the installation volume. An installation receipt is a token that Installer uses to determine whether a package has already been installed on a system. As long as the receipt is present, subsequent installs of packages using the same package filename on the same volume are processed as upgrades.

Metapackages

A metapackage is an installation package that contains other installation packages. The enclosed packages can be component packages or metapackages (but not distribution packages).

Metapackages allow you to define a simple install experience for a multicomponent product. When users open a metapackage with the Installer application, they can choose to install only the components they need. Each enclosed package becomes an install choice. For example, if a product includes a tutorial-files component that the user performing the install doesn’t need, they can choose not to install that component.

Metapackages have the extension .mpkg. Table 4-1 shows what aspects of a metapackage and the packages (component packages and other metapackages) it contains are used in the installation process.

Table 4-1  Installation process of a metapackage

Product information

Package properties

Installation properties

Install operations

Metapackage

image: ../art/active_check.jpg

image: ../art/inactive_check.jpg

image: ../art/inactive_check.jpg

image: ../art/inactive_check.jpg

Contained packages

image: ../art/inactive_check.jpg

image: ../art/active_check.jpg

image: ../art/active_check.jpg

image: ../art/active_check.jpg

Table 4-1 indicates that the containing metapackage specifies package properties, installation properties, and specify install operations. However, the only aspect of the metapackage used in the installation process is its product information. Conversely, for the packages the metapackage contains, all aspects except product information are used in the installation process.

Compatibility: Metapackages can be installed on computers running Mac OS X v10.2 (Jaguar) or later.

Distribution Packages

A distribution package is a metapackage that specifies both product and installation information for a product. Distribution packages provide more sophisticated facilities to tailor the installation process. The major features distribution packages provide are:

The central part of a distribution package is the distribution script. This is a JavaScript-based script file that contains all the information that defines an install experience. When you create a distribution package using PackageMaker, the package’s distribution script is created for you.

Distribution packages differ from metapackages in these areas:

Table 4-2 shows what aspects of a distribution package and the component packages it contains are used in the installation process.

Table 4-2  Installation process of a distribution package

Product information

Package properties

Installation properties

Install operations

Distribution package

image: ../art/active_check.jpg

image: ../art/active_check.jpg

Contained packages

image: ../art/inactive_check.jpg

image: ../art/active_check.jpg

image: ../art/inactive_check.jpg

image: ../art/active_check.jpg

Table 4-2 indicates that a distribution package specifies only product information and installation properties, and both aspects are used in the installation process. The contained packages may specify all package aspects, but only their package properties and install operations contribute to the installation process.

Important: The system and volume requirements for a distribution package must reflect all the system and volume requirements of each of the component packages the distribution package contains.

Compatibility: Distribution packages can be installed on computers running Mac OS X v10.4 or later.

System and Volume Requirements

Two of the installation properties you can specify in a package are system requirements and volume requirements. These two properties define criteria the installation host must meet in order for the installation process to proceed.

The Installation Process

After the Installer application opens a package, it performs the installation process in several phases:

The following sections detail the operations that the Installer application performs in the Requirements Check, Preinstall, and Postinstall phases of the installation process for the three types of installation package files. For details on the purpose of the executable files used to define installation requirements and install operations (InstallationCheck, VolumeCheck, preflight, preinstall, preupgrade, postinstall, postupgrade, and postflight), see “Specifying Install Operations” and “Specifying System and Volume Requirements in Pre-Tiger Systems.”

Component Package Installation Process

This is how Installer performs the Requirements Check, Preinstall, and Postinstall phases of a component package’s installation process:

Metapackage Installation Process

This is how the Installer application performs the Requirements Check, Preinstall, and Postinstall phases of a metapackage’s installation process:

Distribution Package Installation Process

This is how the Installer application performs the Requirements Check, Preinstall, and Postinstall phases of a distribution package’s installation process:

Note: Any executable-based install operations specified in the distribution package itself (not in the component packages it contains) are ignored by the Installer application when the distribution package is installed in computers running Mac OS X v10.4 and later. On earlier versions of the operating system, the Installer application invokes the executable-based install operations as was done for metapackages (see “Metapackage Installation Process”). You can take advantage of this feature when creating a single managed install solution for Tiger and pre-Tiger systems. See “Creating a Hybrid Metapackage” for more information.

The User Install Experience

The install experience that the Installer application shows users after they open an installation package has the following phases:

Postinstallation Process Action

After an installation process is complete, the Installer application can recommend or mandate that the user log out of the system or restart or shut down the computer, depending on the most drastic postinstallation process action specified in the installation package. When specifying a package’s postinstallation process action, you must take into account the nature of your product and the way it interacts with Mac OS X and other executables in the system.

Limitations of Managed Installs

There are some issues and limitations of managed installs:



< Previous PageNext Page > Hide TOC


© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-07-24)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.