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.

  1. Create a package directory structure as follows:

Note: you will not need to make directories below Package_root that your package does not need.

  1. Copy the files and applications into the package root structure to match the installed system.

  2. 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.

  3. Place any Pre-install shell or Perl scripts in PreFlight in the resources directory.

  4. Place any Post-install shell or Perl scripts in PostFlight in the resources directory.

  5. chmod a+rx * in the resources directory so the scripts will execute.

  6. Place your welcome message file limited to 20 lines in Welcome.rtf in the resources directory.

  7. Place the ReadMe file if any in the resources directory ad ReadMe.rtf this file is not limited in size.

  8. Place the License for your product in the resources directory in the file License.rtf

  9. Make sure all the permissions and ownerships are set correctly (owned by you permissions set as they will be when installed).

  10. Start the package maker application.

  11. Click on the change root button and select package_root.

  12. Click on SET under the resources directory and select Resources.

  13. Type the title of the package in the package title field.  Always Omit any version numbers in the title field.

  14. Put the Version number in the version field.

  15. Put a short description of the package in the description field.

  16. Click needs authorization if this package has to be installed as root.

  17. Click relocatable if you wan the user to designate install location (not a good idea if it is to be installed as root)

  18. Click Requires a reboot if the package installed a Startup script.

  19. LEAVE THE DEFAULT LOCATION AS / unless you have a good reason!

  20. 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