What does PackageMaker's “Include root in package” really do?

I am making an installer for an OS X application, but have problems understanding the PackageMaker interface. My version is PackageMaker 3.0.4, working on Lion and Xcode 4.1.

One option, in particular, bothers me. Check the "Include root in package" box when editing the contents of the package. Depending on whether it is checked, some of my package contents are never installed anywhere.

For example, let's say that my content is a single package .app, Confused.app . I want to install it in /Applications (Destination). What exactly does “Include Root in Package” mean in this case? As far as I understand, the installer does nothing.

Is there a better example that would clarify the meaning of the option?

+4
source share
2 answers

In the case where the payload (that is, the source of the source that must be installed) is Confused.app (which supposedly contains a subfolder "Content" with Info.plist, MacOS, Resources, etc. inside it), and the installation goal is / Applications:

  • If you select the "Include root in the package" checkbox, it does what you probably expect, namely it sets Confused.app to / Applications.
  • If you do not check the box "Include root in the package", it sets the contents of Confused.app to / Applications - that is, you end the folder / Applications / Contents. This is probably your test without opportunity.

The intended use with disabling "Enable root .." is that you create a proxy application folder on your build machine, designate this as the payload source, and place the application in this folder. This is more useful if you install several applications at once or install in other places (for example, create the root folder of the proxy server, create subfolders of applications and libraries / application support) and specify the installation location as "/".

+6
source

Or ... (the same answer as above, but formulated in different ways that can make it clearer):

Include root in a package (IRIP) applies only to directories or things that are directories under ie application packages and packages.

When you install a simple file, the IRIP flag is set, but inactive: you have no choice, the named file will be installed at the destination.

When you install a directory, the IRIP flag is not grayed out, but is edited: - when installed: the directory and its contents are set at the destination - when it is clear: only the directory contents are set at the destination

+1
source

All Articles