Search code examples
macospackagemaker

How to run packagemaker from a build script?


I have an Ant script which turns my Java application into a nice Mac Bundle using the JarBundler task. The problem is how do I now turn that into a .pkg file for distribution?

I'm looking at using the packagemaker command line tool (located in /Developer/usr/bin/packagemaker) but it has a number of drawbacks:

  1. If I use the '--doc' option to point it to a .pmdoc file (built using the PackageMaker GUI) then I will have to manually change the .pmdoc contents whenever I add files to my project
  2. If I use the '--root' option to build the package based on the app bundle then it seems I don't get many of the features of the GUI (such as including the licence text).

How do other people produce a .pkg file with their build script?

Thanks


Solution

  • I use scripts to automatically update parts of the PackageMaker file. I found it more convenient to keep the old format .pmproj files rather than to switch to the more recent bundle format.