Creating MAC OSX packages for distribution:
By: Chris Roberts chris@osxgnu.org
The PackageMaker.app is installed with the Mac OS X Developer tools disk in
/Developer/Applications.
The system is quite easy if you know what NOT to do.
It is a 21 step process.
- Create a package directory structure as follows:
Note: you will not need to make directories below Package_root that your package does not need.
- Copy
the files and applications into the package root structure to match the
installed system.
- IMPORTANT!
Do not make an etc folder at the root of the package root in MAC OSX the
/etc directory is actually a sim-link to /private/etc. The OSX package installer does not
do well following sim-links it will dutifully replace /etc with your
package contents this will make the system un usable after a reboot or
logout.
- Place
any Pre-install shell or Perl scripts in PreFlight in the resources
directory.
- Place
any Post-install shell or Perl scripts in PostFlight in the resources
directory.
- chmod
a+rx * in the resources directory so the scripts will execute.
- Place
your welcome message file limited to 20 lines in Welcome.rtf in the
resources directory.
- Place
the ReadMe file if any in the resources directory ad ReadMe.rtf this file
is not limited in size.
- Place
the License for your product in the resources directory in the file
License.rtf
- Make
sure all the permissions and ownerships are set correctly (owned by you
permissions set as they will be when installed).
- Start
the package maker application.
- Click
on the change root button and select package_root.
- Click
on SET under the resources directory and select Resources.
- Type
the title of the package in the package title field. Always Omit any version numbers in
the title field.
- Put
the Version number in the version field.
- Put a
short description of the package in the description field.
- Click
needs authorization if this package has to be installed as root.
- Click relocatable
if you wan the user to designate install location (not a good idea if it
is to be installed as root)
- Click
Requires a reboot if the package installed a Startup script.
- LEAVE
THE DEFAULT LOCATION AS / unless you have a good reason!
- Click
Create Package and provide a name-version.pkg filename and the package
maker will make your package DO NOT make the package in your distribution
folder.
That is all ( that is quite a lot but it goes fast ).
Chris Roberts