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

后端 未结 2 555
暖寄归人
暖寄归人 2021-01-13 23:40

I\'m making an installer for an OS X application, but have trouble understanding PackageMaker\'s UI. My version of PackageMaker is 3.0.4, running along Lion and Xcode 4.1.

2条回答
  •  抹茶落季
    2021-01-13 23:47

    Given the case where the payload (i.e. source item to be installed) is Confused.app (which presumably contains a Contents subfolder with Info.plist, MacOS, Resources, etc inside that), and the install destination is /Applications:

    • If you check the "Include root in package" option, it does what you probably expect, namely installs Confused.app into /Applications.
    • If you don't check the "Include root in package" option, it installs the contents of Confused.app into /Applications -- i.e. you wind up with a /Applications/Contents folder. This is probably what your test without the option did.

    The intended usage with "Include root.." disabled is that you'd create a proxy Applications folder on your build machine, designate that as the payload source, and place the app into that folder. This is more useful if you're installing multiple apps at once, or installing to places other than /Applications (i.e. make a proxy root folder, create Applications and Library/Application Support subfolders, and set the install destination as "/").

提交回复
热议问题