Reputation: 4935
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:
How do other people produce a .pkg file with their build script?
Thanks
Upvotes: 3
Views: 3069
Reputation: 125708
You can use packagemaker's --resources
options to add a resources folder to the package. If you're building an older-style package (10.3 and maybe 10.4 target), all you need to do is put files with appropriate names (e.g. (License,ReadMe,Welcome).(rtf|html) and Background.(jpg|gif|pdf|tif)) optionally organized into .lproj subfolders, and they'll included & used by the package. This doesn't seem to work with distribution packages (10.5-style flat packages and some 10.4 packages), as the resource file names have to be listed in the distribution file, and I'm not sure how to put them there with packagemaker.
Upvotes: 0
Reputation: 107754
I use the following to build a package from a pmdoc
and the the DMG containing the package on OS X 10.6:
/Developer/usr/bin/packagemaker --verbose --doc [project].pmdoc --out [project].pkg
mkdir -p dmg
cp -pR [project].pkg dmg
hdiutil create dmg/[Project]-r$SVN_REVISION.dmg -volname "[Project]" -fs HFS+ -srcfolder dmg
Upvotes: 2
Reputation: 12298
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.
Upvotes: 1