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.
Install operation | Operation executable | Description |
|---|---|---|
Preflight |
| Prepares the target system for the install; for example, quitting or stopping specific applications or processes. |
Preinstall |
| Prepares the target system for a payload for which no receipt is found. |
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 |
| Cleanup or system setup for an installed payload. |
Postupgrade |
| Cleanup or system setup for an upgraded payload. |
Postflight |
| Install postprocessing; for example, setting up |
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.
Last updated: 2006-07-24