Mac installer - optionally install in multiple locations

I am trying to create a Mac installer package with pkgbuild and productbuild , which can install one package in 4 locations, depending on the result of the installer settings described in the distribution definition XML file.

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

The only alternative that I see is a combination of 4 identical packages, but with separate installation locations; however, this is undesirable as it will make my installer unnecessarily large.

Is there any other way to achieve this user behavior?

+6
source share
1 answer

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

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

  /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 useful when creating the PackageInfo file

+2
source

Source: https://habr.com/ru/post/945252/


All Articles