Distribution XML Reference
allowed-os-versions
Defines OS version requirements. These consist of one or more version ranges, specified as os-version
elements. The version of the operating system on the target volume must fall into one of these ranges to allow installation.
Attributes
None.
Availability
Available in OS X v10.6.6 and later.
Content
This element can contain the following element:
os-version (one or more): The supported OS versions.
app
Identifies an application that must be closed before the package is installed.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Required. The bundle identifier of the application. |
Content
None.
auxinfo
Reserved.
background
Defines a background image for the Installer.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Optional. The alignment used to render the background image. Values: Only used by the Installer. |
| String | Required. The filename of an image in the distribution package—for example, |
| String | The standard MIME type of the image. |
| String | Optional. The scaling used to render the background image. Values: |
| String | The UTI type of the image. This attribute is provided because some file types don’t have a MIME type. |
Content
None.
bundle
Defines a single bundle. The meaning of this element differs considerably depending on its parent element; see the parent element’s documentation for details.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Optional. The short version string of the bundle, as defined in its |
| String | Optional. The bundle’s version, as defined in its |
| String | Required. The identifier of the bundle—that is, the value of |
| String | Required. The path at which the bundle is installed, relative to where the package is installed. For example, |
| Boolean | Optional. Indicates whether to search for the bundle by its identifier if it is not found at the given path. Values: Only valid when this element is a child of a |
| - | Reserved. |
| - | Reserved. |
Content
None.
bundle-version
Defines the version of the bundles delivered by the parent element. You do not typically specify this element; productbuild
inserts it from the actual package data when the product archive is created.
Attributes
None.
Availability
Available in OS X v10.6.6 and later.
Content
This element can contain the following elements:
bundle (one or more): The package-relative path and version strings of the bundles installed.
choice
Defines an installation choice of a distribution package.
Attributes
Attribute name | Type | Description |
---|---|---|
| Absolute file path | Optional. Specifies the default installation location, within the installation volume, for this choice. Implies that the user can choose a different installation location. If unspecified, the user cannot choose the installation location for this choice. |
| Boolean | Optional if |
| String, localization key | Required for packages that use the Installer; otherwise, optional. Specifies the description of the installation choice. Localizable. |
| String | Optional. The MIME type of the text data in the |
| Boolean JavaScript expression | Optional. Specifies whether the user can select or deselect this option in the Installer customization pane. If |
| String | Required. Unique identifier of the installation choice, used to bind this element to the Must match the |
| Boolean JavaScript expression | Optional. Specifies whether this option is selected or deselected for installation. If |
| Boolean | Optional. Specifies whether this option is initially enabled in the Installer customization pane. Values: |
| Boolean | Optional. Specifies whether this option is initially selected or deselected for installation. Values: |
| Boolean | Optional. Specifies whether this option is initially visible in the Installer customization pane. Values: |
| String, localization key | Required. Specifies the title of the installation choice. Localizable. |
| Boolean JavaScript expression | Optional. Specifies whether this option is visible in the Installer customization pane. If Avoid making choices appear and disappear while the user is interacting with the installation process. This provides a poor user experience. |
| - | Reserved. |
| - | Reserved. |
| - | Reserved. |
| - | Reserved. |
Content
This element can contain the following element:
pkg-ref (zero or more): The choice’s packages. You should only associate packages with a choice that has no subchoices (as defined by the hierarchy of
line
elements).
choices-outline
Defines the installation-choice hierarchy of a distribution package.
Attributes
Attribute name | Type | Description |
---|---|---|
| - | Reserved. |
Content
This element can contain the following element:
line (one or more): The top-level installation choices.
conclusion
Specifies text that is displayed by Installer at the end of the installation process.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Required. The filename of the conclusion file in the distribution package—for example, |
| String | The MIME-type specifier for the data contained in the file. |
| String | The UTI-type specifier for the data contained in the file. |
| - | Reserved. |
Content
None.
domains
Indicates what domains the package may be installed into. If this element is not present, enable_anywhere
is true
, enable_currentUserHome
is false
, and enable_localSystem
is true
.
Attributes
Attribute name | Type | Description |
---|---|---|
| Boolean JavaScript expression | Required. If |
| Boolean JavaScript expression | Required. If A home directory installation is done as the current user (not as |
| Boolean JavaScript expression | Required. If |
Content
None.
installation-check
Specifies whether the installation host meets the distribution’s system requirements. The installation check passes if the script returns true
, any RAM requirements are met, and any graphics requirements are met.
Attributes
Attribute name | Type | Description |
---|---|---|
| Boolean JavaScript expression | Optional. Specifies whether the requirements are met. If If the script evaluates to |
Content
This element can contain the following elements:
ram (zero or one): The required RAM.
required-graphics (zero or one): The GPU requirements.
installer-gui-script
The root element of the distribution definition. All other elements in the distribution definition file are children of this element.
Attributes
Attribute name | Type | Description |
---|---|---|
| Integer | Required. The schema version of a distribution file. Use |
| - | Reserved. |
| - | Reserved. |
Content
This element can contain the following elements:
background (zero or one)
choice (one or more)
choices-outline (exactly one)
conclusion (zero or one)
domains (zero or one)
installation-check (zero or one)
license (zero or one)
locator (zero or more)
options (zero or one)
pkg-ref (one or more)
product (zero or one)
readme (zero or one)
script (zero or one)
title (exactly one)
volume-check (zero or one)
welcome (zero or one)
license
Specifies text that is displayed by Installer during the installation process.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Required. The filename of the welcome file in the distribution package—for example, |
| String | The MIME-type specifier for the data contained in the file. |
| String | The UTI-type specifier for the data contained in the file. |
| - | Reserved. |
| - | Reserved. |
| - | Reserved. |
Content
None.
line
Defines where a choice fits into the installation-choice hierarchy of a distribution package.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Required. Identifies the installation choice associated with this node of the installation-choice hierarchy of a distribution package. The value must match the ID of a Do not reference the same ID from more than one line element, not even from different |
Content
This element can contain the following element:
line (zero or more): The subchoices of this choice.
localization
Reserved.
locator
Defines a search rule for finding software that is already installed on the system.
Attributes
None.
Content
This element can contain the following element:
search (one or more): The search rule.
must-close
Identifies applications that must be closed before the package is installed.
Applications are considered only if the package that contains this element has been selected for installation.
Attributes
None.
Content
This element can contain the following element:
app (one or more): The applications.
options
Specifies the installation properties of a package within the distribution.
Attributes
Attribute name | Type | Description |
---|---|---|
| Boolean | Optional. Specifies whether the |
| String | Optional. Specifies whether the user can customize the installation by selecting or deselecting installation choices. Values:
|
| String | Optional. A comma-separated list of supported architecture codes. Valid codes are |
| String | Optional. Identifies a package ( Deprecated. |
| Boolean | Optional. Indicates whether the distribution uses JavaScript code. Values: Available in OS X v10.6.6 and later. |
| Boolean | Optional. Specifies whether the user can choose an installation volume other than the boot volume. Values: Deprecated. Use domains instead. |
| - | Reserved. |
| - | Reserved. |
Content
None.
os-version
Defines a range of supported OS versions.
This element is designed for you to use a specific OS version number for the min
attribute, and a major OS version number for the before
attribute. The expectation is that you will know an exact minimum version but not an exact major version. This keeps you from having to guess the last minor revision before the next major revision, as you would have to do if the before
attribute were inclusive.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Optional. The maximum allowed version (exclusive). If the OS version is greater than or equal to this version, installation will be disallowed (unless the OS falls in the range of another |
| String | Required. The minimum allowed version (inclusive). If the OS is less than this version, installation will be disallowed (unless the OS falls in the range of another |
Content
None.
pkg-ref
References a component package that can be installed.
Attributes
Attribute name | Type | Description |
---|---|---|
| Boolean JavaScript expression | Optional. Indicates whether the package is installed. Values: If This provides an additional way to activate and deactivate packages. It overrides the setting on the parent element. |
| String | Defines the authorization level needed to install this package. Values: Deprecated. The installation domain determines the necessary authorization level. |
| String | Required. Uniquely identifies a component package within a distribution package—for example, If there are multiple |
| Integer | Optional. Specifies the size of the package’s payload in kilobytes. You typically omit this attribute because |
| String | Optional. Specifies the action to take after the installation has finished. Values, from lowest to highest: The Installer takes the highest value from all enabled packages and requires the associated action. |
| String | Optional. A JavaScript expression that evaluates to one of the string values expected for Available in OS X v10.7 and later. |
| String | Required. Specifies the version of the package’s payload. You typically omit this attribute because |
| - | Reserved. |
| - | Reserved. |
Content
Required. A URL specifying the location of the installation package to which this element refers. Typically, you specify a simple filename and productbuild
adjusts the URL as needed when the product archive is created. If you define multiple pkg-ref
elements with the same ID, exactly one of them should have text content.
This element can contain the following elements:
must-close (zero or one): The application(s) to be closed before installing this package.
bundle-version (zero or one): The bundle version.
relocate (zero or more): The information to support relocatable bundles.
To provide a must-close
element, add a separate pkg-ref
element with the same ID to contain the must-close
element. For example:
<pkg-ref id="abc">x.pkg</pkg-ref> |
<pkg-ref id="abc"> |
<must-close> |
<app id="com.example.MyApp"/> |
</must-close> |
</pkg-ref> |
product
Defines a top-level product identifier and version. Used for distributing via the App Store.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Required. The top-level product identifier. The value should be the same as the bundle identifier of the contained application. |
| String | Required. The version string for the top-level product. The value should be the same as the short version string of the contained application. |
Availability
Available in OS X v10.6.6 and later.
Content
None.
ram
Specifies the minimum amount of RAM that the system must have.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Required. The minimum required RAM in gigabytes. (Consistent with how sizes are displayed in OS X v10.6 and later, a gigabyte is defined as 109 bytes, not 230 bytes.) |
Availability
Available in OS X v10.6.6 and later.
Content
None.
readme
Specifies text that is displayed by Installer during the installation process.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Required. The filename of the readme file in the distribution package. For example, |
| String | The MIME-type specifier for the data contained in the file. |
| String | The UTI-type specifier for the data contained in the file. |
| - | Reserved. |
Content
None.
relocate
Describes a relocatable bundle. Relocatable bundles allow the user to install an upgrade in the same path as the current version. The path is located by the search
element whose ID is specified by the search-id
attribute. The bundle is specified by the child bundle
element. For example, application bundles are typically relocatable.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Required. Specifies the ID of the If the search returns |
Content
This element can contain the following element:
bundle (exactly one): The bundle (within the package) that will be installed at the path. The only required attribute for this
bundle
element is its ID.
required-bundles
Specifies bundles that must be already installed on the system.
If the child bundle
element has a version specified, this is interpreted as the minimum supported version for that bundle. It may also have its search
attribute set to true
, indicating that the bundle should be located by its identifier if it doesn’t exist at the specified path.
Attributes
Attribute name | Type | Description |
---|---|---|
| Boolean | Optional. Values: |
| String, localization key | Optional. A description of the required bundles, displayed to the user if the requirement is not met. |
Content
This element can contain the following element:
bundle (one or more): The required bundles.
required-cl-device
Specifies requirements that must be met by at least one OpenCL device.
Attributes
None.
Availability
Available in OS X v10.7 and later.
Content
The predicate, as a string. For details about the predicate format, see the productbuild
man page.
To prevent characters in the predicate from being interpreted by the XML parser, mark it as CDATA content.
required-gl-renderer
Specifies requirements that must be met by at least one OpenGL hardware renderer.
Attributes
None.
Availability
Available in OS X v10.6.8 and later.
Content
The predicate, as a string. For details about the predicate format, see Specifying required OpenGL capabilities for the Mac App Store and the productbuild
man page.
To prevent characters in the predicate from being interpreted by the XML parser, mark it as CDATA content.
required-graphics
Specifies GPU requirements.
Attributes
Attribute name | Type | Description |
---|---|---|
| String, localization key | Optional. A description of the graphics requirement. Localizable. If no description is specified, a generic message is used. It is generally best to use the generic message unless the requirements are very straightforward. |
| Boolean | Optional. Values: |
Content
This element can contain the following elements:
required-cl-device (zero or one): The OpenCL requirements.
required-gl-renderer (zero or one): The OpenGL requirements.
script
Defines a set of JavaScript functions.
Attributes
Attribute name | Type | Description |
---|---|---|
| - | Reserved. |
Content
JavaScript code, typically the definition of functions called from attributes of other elements.
To prevent characters in the script from being interpreted by the XML parser, mark it as CDATA content:
<script> |
<![CDATA[ |
// ... JavaScript ... |
]]> |
</script> |
If you choose not to mark your script as CDATA content, you must take great care to properly escape all characters that have special meaning in XML markup.
search
Defines a search rule for finding installed software. The result should be used by another search rule or bound to a bundle via a relocate
element.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Required. Uniquely identifies the search; used in the |
| String | Required if A JavaScript expression that evaluates to This expression can be a function call, but the called function must be defined in the child |
| String | Optional if The ID of another search. The other search is performed, and its results further filtered by removing those results that don’t match the version strings given by the child |
| String | Optional if A path to a bundle. If there is a bundle at this path that matches the version string of this element’s child |
| String | Required. Indicates the type of the search. Valid values are:
|
Content
This element must contain exactly one of the following elements:
strings
Reserved.
tag
Reserved.
tags
Reserved.
title
Defines the title of the product.
Attributes
None.
Content
The title or a localization key used to look up the title.
volume-check
Specifies whether a particular volume meets the distribution’s volume requirements. All of the tests in the script
attribute and the child elements must pass.
Attributes
Attribute name | Type | Description |
---|---|---|
| Boolean JavaScript expression | Required. Specifies whether the requirements for installing on a particular volume are met. If the script evaluates to The property |
Content
This element can contain the following elements:
allowed-os-versions (zero or one): The versions of the OS to accept on the target volume.
required-bundles (zero or one): The bundles that must already be present.
welcome
Specifies text that is displayed by Installer at the beginning of the installation process.
Attributes
Attribute name | Type | Description |
---|---|---|
| String | Required. The filename of the welcome file in the distribution package—for example, |
| String | The MIME-type specifier for the data contained in the file. |
| String | The UTI-type specifier for the data contained in the file. |
| - | Reserved. |
Content
None.
Copyright © 2012 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2012-12-13