Mac installer package - how to optionally install to multiple locations
Asked Answered
I

1

6

I am trying to create a Mac installer package with pkgbuild and productbuild that installs 1 package to 4 locations optionally, depending on the result of the installer options laid out in the distribution definition xml file.

Unfortunately, I cannot find a way of customising the Distribution.xml to install a package more than once.

The only alternative I can see is bundling 4 identical packages, but with separate install locations; however this is undesirable as it would make my installer unnecessarily large.

Is there another way of achieving this custom behaviour?

Impedimenta answered 17/5, 2013 at 9:53 Comment(0)
F
2

Instead of --component "/Applications/SomeApp.app"

use --root ./basefolder and have root-like structure (example: 'Applications','Library' folders)

 /usr/bin/pkgbuild --scripts ./scripts --info PackageInfo --identifier com.app.installer --root ./basefolder "Installer.pkg"

http://s.sudre.free.fr/Stuff/Ivanhoe/FLAT.html is helpful in creating PackageInfo file

Failure answered 5/7, 2013 at 20:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.