Add support for component plists in productbuild generator.
From the pkgbuild
man page:
--component-plist plist-path If you specify --root, you can use --component-plist to identity the bundles within that destination root, and control how the OS X Installer handles those bundles. See more at COMPONENT PROPERTY LIST. If you add bundles and need to update your component property list, you can specify the old version with --component-plist when running pkgbuild with --analyze, and the old settings will be propagated to the output for still-extant bundles.
And:
COMPONENT PROPERTY LIST When you package a destination root, you can use a component property list to specify how bundles in that root should be handled by the OS X Installer. This property list should be an array of dictionaries, where each dictionary speci- fies a single bundle. The dictionary keys are as follows:
Key Description RootRelativeBundlePath Path to bundle relative to the destination root (string) BundleIsRelocatable Install bundle over previous version if moved by user? (bool) BundleIsVersionChecked Don't install bundle if newer version on disk? (bool) BundleHasStrictIdentifier Require identical bundle identifiers at install path? (bool) BundleOverwriteAction How to treat existing on-disk version of bundle (string) BundlePreInstallScriptPath Relative path to bundle-specific preinstall script BundlePostInstallScriptPath Relative path to bundle-specific postinstall script ChildBundles Bundles under this bundle (array of dictionaries)
It would be nice if the pkgbuild/productbuild generators supported this. Ideally via something like this:
cpack_add_component(sdk
DISPLAY_NAME "SDK"
DESCRIPTION "Installs the SDK"
PLIST "osx/sdk.plist"
)
Or
set(CPACK_COMPONENT_SDK_PLIST "os/sdk.plist")
As far as I can tell this would require the following changes:
- Edit cpack_add_component to add
PLIST
. - Edit cmCPackGenerator::GetComponent() to add a
plist
option. - Add that as a member variable of the
cmCPackComponent
class - Modify
cmCPackProductBuildGenerator::GenerateComponentPackage()
to use theplist
to (optionally) add--component-plist
to the command line.
If I were to implement this would it be merged?