I want to create a pkg file to install the bundle in the user directory (/Users//Applications/).
How can I do it?
I used the product build with the transfer of the file to the product:
productbuild --component ./Bundle.app --product ./file.plist
file.plist contains
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>home</key>
<true/>
</dict>
</plist>
But it does not work...
Is it possible to achieve this behavior with
pkgbuild
or
productbuild
?
I figured out how to do it.
pkgbuild --root <path to app> --identifier <identifier> --scripts <path to scripts>--install-location Applications/Name.app Package.pkg
productbuild --synthesize --package ./Package.pkg Distribution.xml
Editing a file Distribution.xml by adding a tag in installer-gui-script
:
<domains enable_anywhere="false" enable_currentUserHome="true" enable_localSystem="false"/>
productbuild --distribution ./Distribution.xml --package-path ./Package.pkg Product.pkg