Chapter 12. Creating and Installing Packages

In Chapter 11 we discussed installing packages with Fink; this chapter shows you how to create packages using tools provided with Mac OS X Panther, as well as with Fink.

The following packaging options are supported on Mac OS X by default:


Found in /Developer/Applications/Utilities , PackageMaker can be used to create packages ( .pkg ), which are bundles consisting of all the items that the Mac OS X Installer ( /Applications/Utilities ) needs to perform an installation. PackageMaker can also create metapackages ( .mpkg ), which can be used to install multiple packages at the same time.

When a package is installed, a "receipt" is placed in the /Library/Receipts folder. These receipts are named with a .pkg extension and appear in the Finder as packages, even though they are not. You cannot use these files to install or update software. Instead, they are used to maintain a record of which packages have been installed on your system. This is how, for example, System Update knows not to install a package (or to update a package) that you've already installed. Disk Utility's Repair Permissions feature also uses the receipt to restore the permissions on installed files to their original state.

gnutar and gzip

The Unix tape archive tool gnutar is used to bundle the directories and resources for distribution. (The tar command is provided as a hard link to gnutar .) GNU Zip ( gzip ) is used to compress the tar archives to make file sizes as small as possible. Using these tools is generally the simplest way to copy a collection of files from one machine to another.

Mac OS X Panther supports archiving files and directories in the .zip format directly from the Finder by Control-clicking on a file or directory and selecting "Create Archive of . . . " from the contextual menu.

Disk Utility

One of the easiest ways to distribute an application is to use the Disk Utility ( /Applications/Utilities ) to create a disk image. You can use the Disk Utility to create a double-clickable archive, which mounts as a disk image on the user's computer. From there, the user can choose to mount the disk image each time the application is run, copy the application to the hard drive (usually to /Applications ), or burn the image to a CD. Disk Utility has a command-line counterpart , hdiutil , which we'll cover in Section 12.3.2.

Each of these tools is discussed separately in the following sections.

Mac OS X Panther for Unix Geeks
Mac OS X Panther for Unix Geeks
ISBN: 0596006071
EAN: 2147483647
Year: 2003
Pages: 212 © 2008-2017.
If you may any questions please contact us: