Package Source Scripts

Composer allows you to manage scripts for PKGs. The following default scripts are available in shell and perl:
  • InstallationCheck

  • Postflight

  • Postinstall

  • Postupgrade

  • Preflight

  • Preinstall

  • Preupgrade

  • VolumeCheck

Note: Flat PKGs support Preinstall and Postinstall scripts only. To build a PKG that contains other scripts, you can deselect the Build flat PKGs option in Composer preferences, or you can disable this preference for a single package. For information on how to disable this preference for a single package, see Building a PKG. For more information on flat PKGs, see Composer Preferences.
These scripts read in the available parameters that are received from the installer and give descriptions for the supported exit codes.

Composer also attempts to verify that the script syntax is valid. If a script appears to have invalid syntax, a warning icon appears.

To view the error that occurred while Composer was verifying the script, Control-click (or right-click) the script and choose Compile Script.
Note: InstallationCheck and VolumeCheck scripts have warning and failure messages that can be localized according to the needs of the user. To localize these messages, the corresponding .strings file (InstallationCheck.strings or VolumeCheck.strings) must be created for each localization.