I'm trying to automate Mac OS X package building via command line interface of PackageMaker. So far i managed to build package and run postinstall script. Tell me is there a way to add choices while building via command line? Because I want user to have an option to run or not to run postinstall script. P.S.: I don't want to use ".pmdoc". This option is awful.
As i have said in comment, PackageMaker makes a list of files i added to project and writes it into it's project. So, if i want to add one single file i need to open project, remove choice containing that file and, finally, add all files again with new file included. OR edit project's XML files directly. It's unbearable to automate building my project's package using PackageMaker. So i've changed a tool. some googling helped me to fing Packages. This tool is not ideal too, but it's so much better than Apple's. Mojca described approximately what i've done so far with PackageMaker. While using Packages i also had to use project file. But this software doesn't collect info about all files you add into project unless you explicitly tell it to do so:
You can see on picture that i have choice at what depth files shoUld be included to project. All folders beneath .app folder were expanded manually to be sure that folder which can contain new files was not expanded as well. In this case it's Java folder. Next and final step is assembling package using Ant:
<exec executable="/usr/local/bin/packagesbuild">
<arg value="-v"/>
<arg value="${basedir}/Installer/MyProject.pkgproj"/>
</exec>