Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Overview of Install Operations

After the Installer application finishes checking installation requirements, it performs an install through distinct operations, known as install operations. You can define all but one of these operations, which copy payloads to their installation destinations. You should not use install operations to fix install problems, such as incorrect ownership and access permissions. You should use install operations only when other managed-install features, such as installation requirements, are not adequate for the chore you need to perform as part of installing a package or metapackage.

Table 7-1 lists the install operations in the order Installer performs them.

Table 7-1  Install operations and executables

Install operation

Operation executable

Description

Preflight

preflight

Prepares the target system for the install; for example, quitting or stopping specific applications or processes.

Preinstall

preinstall

Prepares the target system for a payload for which no receipt is found.

Preupgrade

preupgrade

Prepares the target system for a payload for which a receipt is found.

Payload Drop

None

Copies the payload to the installation destination. This operation is not modifiable.

Postinstall

postinstall

Cleanup or system setup for an installed payload.

Postupgrade

postupgrade

Cleanup or system setup for an upgraded payload.

Postflight

postflight

Install postprocessing; for example, setting up cron(8) jobs or launching the installed application.

The first three install operations, Preflight, Preinstall, and Preupgrade, can stop an install. When one of the corresponding executables returns anything other than 0, Installer cancels the install.

Important: For install operations to work, operation executables must have their executable bit set. PackageMaker does this automatically when it builds a package. Also, install operation executables must not have a user interface of any kind or affect the installation process by any means other than through return values.



< Previous PageNext Page > Hide TOC


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.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice