PackageMaker(1) BSD General Commands Manual PackageMaker(1)
NAME
Packageaker, packagemaker -- Installation-package creation tool
SYNOPSIS
Packageaker -build -p destination-path -f root-path [-b build-dir] [-s]
[-ds] [-v] [-u] [-r resources-path] [-i info-file]
[-d description-file]
Packageaker -build -mi -ms -mc pkg-dir -p destination-path [-v]
[-r resources-path] [-i info-file] [-d description-file]
Packageaker -build -proj project-path -p destination-path [-v]
Packageaker -build -snapshot snapshot-path [-b build-dir] [-s] [-ds]
[-v] [-u] [-r resources-path] [-i info-file]
[-d description-file] [-v]
Packageaker --snapshot root-path destination-path
Packageaker -help
DESCRIPTION
Packageaker allows you to package files in a way that makes it easy for
end users to install them on their computers.
Packageaker -build can create the installation package (.pkg), metapack-
age (.mpkg), or distribution (.mpkg) file specified by destination-path.
For a package, the payload is the contents of root-path. For a metapack-
age, the contained packages are specified by pkg-dir. Distributions can
currently only be built from PackageMaker project files (.pmproj).
An installation package contains everything the Installer application
needs to install a group of files (the package's payload), which can
include application bundles, documentation files, scripts, and so on. In
general, a package contains the following:
A bill of materials file:
A binary file that describes the contents of the package.
An information property list:
An XML file that contains the information about the package,
such as default location and version.
An archive file:
The set of files to be installed, also known as the payload.
With Packageaker, this archive is always compressed.
Resources directory:
This directory contains files Installer uses during an installa-
tion but doesn't install on the target computer. They include
Read Me files, license-agreement files, and scripts.
Unless the root-path is specified (see below), the working directory must
be the one containing the package's payload.
A metapackage is a file that includes a list of packages (and possibly
other metapackages) and any additional information needed to install
them. The actual packages can be stored in the metapackage (-mi), on the
same level as the metapackage (-ms), or at a custom location (-mc). In
general, a metapackage contains the following:
An information property list:
An XML file that contains the information about the metapackage,
such as version and package list.
Packages directory:
Contains any packages stored within the metapackage.
Resources directory:
This directory contains files Installer uses during an installa-
tion but doesn't install on the target computer. They include
Read Me files, license-agreement files, and scripts.
A distribution is similar to a metapackage, except that it contains a
distribution.dist file, which contains XML and JavaScript which specify
the UI for the Install. In general, a distribution contains the follow-
ing:
An distribution script:
An XML file specifying the UI for the install. May also contain
JavaScript.
Packages directory:
Contains any packages stored within the distribution.
Resources directory:
This directory contains files Installer uses during an installa-
tion but doesn't install on the target computer. They include
Read Me files, license-agreement files, and scripts.
See http:/developer.apple.com/documentation/DeveloperTools/Concep-
tual/SoftwareDistribution/ as well as the help integrated into Package-
Maker for information on the keys of the property-list files as well as a
detailed explanation of package creation, format, and use.
OPTIONS
-build Create an installation package, metapackage, or distribution.
-p The path, including the package name and extension (.pkg) where
the package is created.
-f Directory containing the contents of the package.
-b Directory used to temporarily copy and modify the root if split-
ting resource forks (suggestion: /tmp). Overrides default
behavior that builds off (and temporarily modifies) the original
root.
-s Split files with resource forks (Installer will reassemble
them). Overrides default behavior that discards resource forks.
-ds Filter .DStore files out of the creation process.
-v Verbose output during archiving.
-u Create uncompressed archive.
-r Directory containing installation resources, such as scripts and
Read Me files.
-i Path to property list file (.plist) that is copied to the pack-
age's Contents directory as Info.plist, the only modification
being the insertion of the package's installed size (IFPkgFla-
gInstalledSize). This option must be specified and the
Info.plist must contain a CFBundleIdentifier key. This
CFBundleIdentifier should uniquely identify your package.
-d Path to property list file (.plist) that is copied to the pack-
age's Resources directory as Description.plist. If this option
is unspecified a skeletal Description.plist is generated for the
package. You should add the title and description entries to the
Description.plist file after creating the package.
-mi Path to directory of packages/metapackages to be included in the
metapackage. The packages will be stored within the created
metapackage.
-ms Path to directory of packages/metapackages to be included in the
metapackage. The packages will not be stored within the created
metapackage, rather, they should be on the same level as the
.mpkg file.
-mc Path to directory of packages/metapackages to be included in the
metapackage. The packages will not be stored within the created
metapackage, rather, they should remain at the location speci-
fied.
-proj Path to a .pmproj created with the Packageaker GUI client.
Packageaker will build the package/metapackage/distribution
specified by the .pmproj file. This flag overrides most other
flags.
-snapshot
Path to a .snapshot directory created with Packageaker
--snapshot. Will build a package containing files added to the
directory that was snapshotted since the snapshot was taken.
--snapshot
Creates a snapshot directory of root-path at destination-path.
The directory contains an Info.plist and a bill-of-materials
file describing the root. Packageaker -build -snapshot can
then be used to build a package with files added to the root
since the snapshot.
-help Display help information.
SCRIPTS
You define scripts when you need to test certain conditions before
installation or when you need to perform special tasks as the installa-
tion takes place.
To add a script to an installation, place it in the resources directory
(specified with the -r option).
Scripts can be run before and after the package's payload is installed.
There are two types of scripts: environment-test scripts and installation
scripts.
These are the environment-test scripts you can define for an installa-
tion:
InstallationCheck
Installer runs this script to determine whether the installation
should proceed.
VolumeCheck
Installer runs this script to determine whether a particular
volume can receive the package's payload.
If the environment-test scripts allow the installation to proceed,
Installer performs the installation scripts and the installs the payload
in the following order:
preflight
preinstall or preupgrade
Payload installation
postinstall or postupgrade
postflight
EXAMPLES
Creating CoolApp.pkg with existing Info.plist and Description.plist
files:
PackageMaker -build -p /Volumes/Packages/CoolApp/CoolApp.pkg -f
/Volumes/Packages/CoolApp/Packagecontents -i
/Volumes/Packages/CoolApp/Info.plist -d
/Volumes/Packages/CoolApp/Description.plist
SEE ALSO
installer(8)
Mac OS August 3, 2005 Mac OS
|