packagemaker

What is the proper way to set modifiable install path in PackageMaker?


First of all, I'm talking about PackageMaker, a GUI application; not packagemaker, a command-line program.

I'm trying to make a install package that has three components, installed in different locations:

And I want to allow users to change target directories of each compnent during installation.

I noticed there are two layers in PackageMaker: choice and package. When you drag an app/bundle/directory into PackageMaker, it will create a new choice and a new package. However, both choice and package layer contains Destination, which greatly confused me. In addition, in Components page for packages that is derived from an app or bundle, there is a check box labelled "Allow Relocation", which introduced further confusion.

I failed to find detailed information on those options. And after many attempts, I'm using the following layout and combination of options, that are very close to my target:

However, it still has a very weird behavior: the app is copied twice, to both its own directory, and overwriting the directory of the plugin bundle. If you "show content" on the installed bundle, it will look something like this:

/Library/Audio/Plug-Ins/VST/Xxxx.vst
  |
  +contents
    |
    +-info.plist: after looking on its content, it is actually the app's plist, not the bundle's
    |
    +-MacOS
    |  |
    |  +-Xxxx: the bundle's dynamic library, which is expected to be here
    |  |
    |  +-XxxxBin: the app's executable, which is NOT expected to be here
    |
    +-Resources
       |
       +-Xxxx.xml: some config info for the bundle, which is expected to be here
       |
       +-icon.icns: the app's icon, which is NOT expected to be here

I am quite exhausted on this stuff, but still not reaching my target that looks pretty simple: user-changeable install directory for multiple components. It's really appreciate for someone who can drag me out of this quagmire. Thanks for a lot!


Solution

  • Finally I found the actual cause is not in PackageMaker stuffs, but is inside the bundles being packaged. The bundle identifier of both the app and the plugin is empty. After I assign them with distinct values, everything just work fine.