Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Specifying System and Volume Requirements in Pre-Tiger Systems
You specify system and volume requirements using executables named
VolumeCheck, respectively. These executables can be binary files or text-based scripts.
This chapter shows how to define executable-based installation requirements.
Overview of Executable-Based Installation Requirements
During the installation process, the Installer application invokes
VolumeCheck when it needs to check system and volume requirements, respectively. See The Installation Process for details.
InstallationCheck executable can use any criteria to allow or disallow an install. It returns a value that tells Installer whether to continue the installation process.
VolumeCheck can use any criteria to accept or reject a volume as a potential installation volume. The return value of
VolumeCheck tells Installer whether to allow the user to choose a particular volume as an installation destination.
In addition to stopping the installation process and disallowing volumes to be chosen as installation volumes, the return values of these executables tell Installer which informational message to display to the user. You use strings files to define these informational messages.
Strings Files for InstallationCheck and VolumeCheck Denials
InstallationCheck cancels an install or when
VolumeCheck disallows a volume to be chosen as the installation volume, the Installer application displays a default message or the message specified by the executable’s return value. To specify your own messages, place the files
VolumeCheck.strings (for system requirement and volume requirement failure messages, respectively) in a localized directory inside the package’s scripts directory. Table A-1 shows the directory names for the languages Installer recognizes.
A strings file defines messages in the following format:
"<message_ID>" = "<message_string>";
<message_ID>: Integer between 16 and 31.
<message_string>: Informational message string.
Listing A-1 and Listing A-2 show sample
VolumeCheck.strings files, respectively.
Listing A-1 A sample
"16" = "Can't install unless you have a Super Drive.";
"17" = "Can’t install unless you have more than 128MB of RAM.";
Listing A-2 A sample
"16" = "Can't install on volumes named Panther.";
"17" = "Can’t install on volumes named Jaguar.";
InstallationCheck executable returns an integer that the Installer application uses to determine whether to proceed with the installation process or which informational message to display as the reason for canceling the install. To allow the install, return
0. To cancel the process, return an integer that specifies the message ID of the localized message to display. This integer, however, must also have bits 5 and 6 set to
For example, to instruct Installer to display message 16, return
112. You can use the Calculator application to determine the correct return value for a specific message ID, or compute it in your executable.
Table A-2 lists the message IDs of the default messages for
InstallationCheck failures. If you use these messages, you don’t need to create an
VolumeCheck executable returns an integer that the Installer application uses to determine whether to allow the user to choose a volume as the installation volume and which informational message to display when the user selects a disallowed volume. Returning
0 allows the user to identify a volume as the installation volume. When a volume doesn’t meet the volume requirements, the
VolumeCheck return value specifies the message ID of the localized message to display when the user selects the volume. This integer, however, must also have bit 5 set to
For example, to disallow a volume and set the message ID of the appropriate message to
49. You can use the Calculator application to determine the correct return value for a specific message ID, or compute it in your executable.
Table A-3 lists the message IDs of the default messages for volumes that fail
VolumeCheck. If you use these messages, you don’t need to create a