The package Settings tab lets you change settings related to authentication requirements, relative location of a package to its distribution and installation behaviors.
To access the Settings tab of a package of a distribution project:
1 | Select the package in the source list |
2 | Click the Settings tab. |
▪ | Click the Settings tab. |
To access the Scripts tab of a package of a distribution project:
1 | Select the package in the source list |
2 | Click the Scripts tab. |
To access the Scripts tab of a raw package project:
▪ | Click the Scripts tab. |
The name of the package defines the name that will be used for the package on disk or in the flat distribution archive. This is also the name that will displayed in the customized mode of the Installation Type step if no localized names are defined.
Notes and recommendations:
|
To change the name of a package:
1 | Select the package in the source list of the project. |
2 | Click the name of the package. |
3 | Type the new name of the package. |
4 | Validate with Return. |
The identifier of a package is a string that is used to uniquely identify the package.
The version of a package is a version string. It is the version of the package, not of the applications or components inside the package.
Together, the identifier and version are used by the Installer
database to check if a previous version or a newer version of a package has already been installed.
Notes and naming convention:
|
When you create a new package, default values are set for the identifier and version. The identifier string is built from the default package identifier prefix and the name of the package. The default version is set to 1.0.
To change the identifier:
▪ | Type the new identifier in the Identifier text field. |
To change the version:
▪ | Type the new version in the Version text field. |
The default package identifier prefix is created the first time you use Packages. Packages will look for your email address in Address Book
and, if it does not look to be an address from a well known ISP or mail service, the identifier prefix will be built from the domain name of your email address. If Packages is unable to create the identifier prefix from your email address, a generic identifier prefix will be set.
To change the default package identifier prefix:
1 | Choose Packages > Preferences |
2 | Click the Templates button. |
3 | Select the row for the Default Package Identifier Prefix key. |
4 | Click in the Value column of this row. |
5 | Type the new identifier prefix. |
6 | Validate with Return. |
During your tests, you may need to make the Installer database forget that a previous version of your package has been installed. To achieve this:
1 | Open the Terminal application. | ||
2 | Type the following command:
| ||
3 | Validate with Return and type your admin password. |
The post installation behavior determines the behavior of the installer once the installation is completed and successful.
Here is a list of available behaviors:
Name | Behavior |
---|---|
Do Nothing | Upon a successful installation, you can just quit Installer. This is the default behavior. |
Require Restart | Upon a successful installation, Installer will invite you to restart your Mac. You can run other installations but can not quit Installer. |
Require Shutdown | Upon a successful installation, Installer will invite you to shut down your Mac. You can run other installations but can not quit Installer. |
Require Logout | Upon a successful installation, Installer will invite you to log out. You can run other installations but can not quit Installer. |
Notes:
|
To change the post installation behavior:
▪ | Choose the behavior from the On Success popup button. |
By default, when you create a package for a distribution, it will be embedded in the distribution bundle or file. You may wish to put a package outside of the distribution so that you can replace it with a newer version without having to rebuild the entire distribution. If you're distributing your application on a DVD, maybe there is not enough space on one DVD to contain your entire distribution and you need to split it on 2 DVDs.
Packages lets you decide what the location of a raw package should be. Here is the list of the possible type of locations:
Name | Description |
---|---|
Embedded (1) | The package will be embedded inside the distribution bundle or file. |
Custom Path (1) | The package will be put at the absolute or relative path you choose. |
HTTP URL | The package will be hosted on a web server at the URL you choose. |
Removable Media | The package will be put on a removable media such as a CD or DVD at the path you choose. |
To change the location type of a package:
1 | Choose the location type from the Type popup button. |
2 | If needed, type the URL where the package is expected to be found. |
Notes:
|
A few options are available to change the default behavior of the installation process for the package.
Here is what these options do:
Name | Description |
---|---|
Require admin password for installation | Only a user with administrative privileges can install the package. An administrator password will be requested during the installation process. If you install anything in /Applications or /Library , this option should be enabled. |
Relocatable (1) | For a raw package, this option means that the user can change the default destination for the payload. |
Overwrite directory permissions (1) | If a directory from the package payload already exists on disk, when this option is enabled, the permissions of the directory on disk will be changed to match those of the directory in the payload. |
Follow symbolic links (1) | If a symbolic link is encountered during the installation of the package payload, the link will be resolved instead of being replaced by a real file or folder. |
Notes:
|
To enable or disable an option:
▪ | Click the checkbox of the option you want to enable or disable. |
When a package is to be installed, it is possible to run a script before the installation is performed and a script after the installation is completed. The "script" can either be a shell (or python or perl) script or a binary. You can call secondary scripts or binaries from these scripts.
To set a pre- or post-installation script:
1 | Click the appropriate Set button. |
2 | Select the script you want to use. |
3 | Click Set. |
To remove a pre- or post-installation script:
1 | Click the appropriate Remove button. |
2 | Click Remove. |
Notes:
|
Here are some environment variables that are available to the pre- and post-installation scripts and that may be of some interest:
Name | Description |
---|---|
INSTALL_PKG_SESSION_ID | The identifier of the package being installed. |
USER | The account name of the current login user. |
HOME | The home folder of the current login user. |
COMMAND_LINE_INSTALL | When this variable is set, the installation is being performed by the installer tool. |
DSTVOLUME | The absolute path to the volume chosen as the target of the installation. (Mac OS X 10.6 only) |
DSTROOT | The absolute path to the folder where the package payload will be installed. (Mac OS X 10.6 only) |
If you need to use additional resources such as secondary scripts or binaries, you can add them to the Additional Resources hierarchy.
The Additional Resources hierarchy looks like the "View as List" mode of the Finder
and it works the same way. You can add items, arrange them, rename some of them, etc.
Type | Description |
---|---|
File system item | A reference to a real file or folder on disk. A file system item can be moved and removed. It can not be renamed. |
Custom folder | A folder that does not exist on disk. A custom folder can be moved, removed and renamed. |
To add a file system item to the hierarchy:
1 | Select the folder in which you want to insert a new item. |
2 | Click the + button of the file hierarchy or choose Hierarchy > Add Files |
3 | Select the file or folder you want to add. |
4 | Click Add |
5 | If requested, choose the reference style from the Reference Style popup button and click Add. |
To add a custom folder to the hierarchy:
1 | Select the folder in which you want to insert a new item. |
2 | Choose Hierarchy > New Folder. |
3 | Type the name of the folder and validate with Return. |
To remove items from a file hierarchy:
1 | Select the items in the hierarchy. |
2 | Click the - button of the hierarchy or choose Edit > Delete. |
3 | Click Remove. |
Note: The item will only be removed from the hierarchy, it will not be removed from disk. |
By default, when you add a reference to a real folder in the file hierarchy, its contents is not disclosed in the hierarchy.
To reveal the contents of a referenced folder:
1 | Select the referenced folder in the file hierarchy. |
2 | Choose Hierarchy > Expand > Fully. |
Notes:
|
To reorder the items in the hierarchy:
1 | Select the items in the hierarchy. |
2 | Drag and drop them to the new location in the hierarchy. |
On the right of the hierarchy view, the inspector pane displays information related to the current selection in the hierarchy.
The inspector can display the following information for a single or multiple selection:
Value | Description |
---|---|
Icon | The icon for the file or folder as displayed in the Finder . |
Name | The name of the file or folder. |
Modification Date | The date of the last modification for the file or folder. |
Architectures | Architectures supported by the executable if an executable is selected. |
Type | The type of the item: a file, folder or custom folder. |
Reference | The reference style for the item. |
Source | The relative or absolute path of the item on disk. |
To rename a custom folder:
1 | Select the custom folder in the hierarchy. |
2 | Type the new name of the folder in the Name text field of the inspector. |
3 | Validate with Return. |
To change the reference style of an item:
1 | Select the item in the file hierarchy. |
2 | Choose the new style from the Reference popup button. |
Revision History | ||||||
|