My Question
I want to make my installer copy a config file is placed in same directory as the PKG. The .pkg + config file would be distributed as a DMG.
I need the installer to copy this config file to a particular folder as part of install process. ${PACKAGE_PATH} is an environment variable which is set by the installer and could be used to get the path to config file... But, this doesn't work when the .pkg is run from a mounted dmg (requires user to extract files to file system).
Is there any way around this?
Background info for why I want to do this...
Our application has a config file that organizations customize to their liking and then they would distribute this config file in the same directory as the .pkg.
We got around this issue before by making a simple deploy tool that customer drag and dropped their .pkg and config file on and it'd generate for a customized pkg with it embedded.
Mountain Lion now requires pkg installers to be signed which prevents us from inserting custom files without resigning it.
So, my options are:
- Create a webapp that customers can upload their files to and get a customized signed pkg which is kind of a pain.
- Extend my deploy tool to sign the package. This isn't ideal as it'd basically require us to distribute our private key which is a big no no.
- Hope there is a simpler solution... like the DMG approach i'm asking about.