Another possible solution (if we assume that the application is in one package and the supporting files in another one): - Always install the supporting files to A and be sure to follow symbolic links. - Add 2 invisible packages with empty payloads. This would like this: --+-- distribution --+-- Application Package | +-- Invisible Package P1 | +-- Supporting Files Package | +-- Invisible Package P2 P1 would have a pre or post installation script whose sole purpose in life is to check for the existence of folder A: - if A exists, it just exit. - if B exists: it creates a symbolic link to B at location A, set a cookie in /tmp and exit. - if C exists: it creates a symbolic link to C at location A, set a cookie in /tmp and exit. - if none of these case, it exits with 1. P2 would check for the presence of the cookie and remove the appropriate symbolic link. ------------ Another way to do it is to use only 1 invisible package P1 and have the supporting package always install to a fixed location in /tmp (such as /tmp/mypackageidentifier). P1 would check which folder is to be the final target and then create a symbolic link from /tmp/mypackageidentifier to the appropriate folder. ------------ Basically the idea here is to avoid a copy or a move from the post install script. On Tue, Mar 18, 2014 at 7:16 PM, Matthias Schroeder <Matthias.Schroder@cern.ch> wrote:
Hi Edward,
On 03/18/2014 06:05 PM, Edward Spiegel wrote:
Hi,
One of the installers that I have to build installs an app plus a folder of supporting files.
There are 3 possible destinations for the folder of supporting files and it is easy for me to detect the correct destination by checking for the location of a couple of folders in well-defined places. Since the payload is pretty large (a few hundred megabytes of audio files), I'd like to have only a single instance of the payload in the installer and to be able to have the installer put it in the right place.
What I want to do is test for the presence of target folder A and if it is there deliver the payload there and go on to potential targets B and C if A is not present.
Any suggestions about the best way to accomplish this?
If you don't have any user-selectable options you can just put your payload somewhere in /tmp, and check in a post-install script whether A, B or C exist. Then you do a command line install of the package in /tmp into A, B or C in that same post-install script.
But this does not work if the user is supposed to select or deselect part of the payload.
Maybe somebody has a nicer solution that allows true interaction with the user.
Hope this helps,
Matthias
Best,
Edward
_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/installer-dev/matthias.schroder%40ce...
This email sent to matthias.schroder@cern.ch
_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/installer-dev/dev.iceberg%40gmail.co...
This email sent to dev.iceberg@gmail.com
-- Packaging Resources - http://s.sudre.free.fr/Packaging.html _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com