I'm putting together an installer package for OS X, and I can't figure out how to disable the screen that asks the user which volume to install to. I want it to install to /
without prompting.
Here's how I'm building the package:
pkgbuild--root build/staging/ --identifier xxxx --scripts InstallerOSX/resources/ --scripts InstallerOSX/scripts/ ${OBJROOT}/AgentPayload.pkg
productbuild--distribution InstallerOSX/distribution.dist --package-path ${OBJROOT} --resources InstallerOSX/resources/ ${BUILT_PRODUCTS_DIR}/AgentInstaller.pkg
and here's my distribution file:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<title>xxxx</title>
<background file="background.png" mime-type="image/png" scaling="tofit"/>
<pkg-ref id="xxxx"/>
<options customize="never" require-scripts="false"/>
<choices-outline>
<line choice="xxxx"/>
</choices-outline>
<choice id="xxxx" title="title" description="desc">
<pkg-ref id="xxxx"/>
</choice>
<domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
<pkg-ref id="xxxx" version="0" onConclusion="none">AgentPayload.pkg</pkg-ref>
</installer-gui-script>
The <domains>
element doesn't seem to do the trick...
I ended up adding the following to the distribution definition:
<options rootVolumeOnly="true"/>
rootVolumeOnly
is deprecated, but it works for now, while domains
doesn't seem to.