Re: [installer-dev] Postinstall Script: Where is my Software?
Re: [installer-dev] Postinstall Script: Where is my Software?
- Subject: Re: [installer-dev] Postinstall Script: Where is my Software?
- From: Mario Emmenlauer <email@hidden>
- Date: Tue, 21 Oct 2008 14:04:17 +0200
Hi,
Alexander von Below wrote:
Hello,
I have tried to RTFM and STFW, but to no avail...
Can my post-installation script find out where the user actually
installed the software, i.e. if "Allow custom location" is set?
I would like to allow users to install the software anywhere on their
machine, but I need to run some script on it.
I have searched quite a while for the exact same question. The answer
is hidden (or not hidden, depending how you look at it:-) in Apples
SoftwareDeliveryGuide, page 46:
http://developer.apple.com/DOCUMENTATION/DeveloperTools/Conceptual/SoftwareDistribution/SoftwareDeliveryGuide.pdf
[...]
The following list describes the arguments and environment variables
available to install operation executables. Note that not all environment
variables are available to all executables (see Table 7-2 (page 47)).
$1: Full path to the installation package the Installer application
is processing. For example: /Volumes/Users/michelle/Desktop/Levon.mpkg
$2: Full path to the installation destination. For example: /Applications
$3: Installation volume (or mountpoint) to receive the payload. For example: /
$4: The root directory for the system: /
$SCRIPT_NAME: Filename of the operation executable. For example: preflight
$PACKAGE_PATH: Full path to the installation package. Same as $1.
$INSTALLER_TEMP: Scratch directory used by Installer to place its temporary
work files. Install operations may use this area for their temporary work,
too, but must not overwrite any Installer files. The Installer application
erases this directory at the end of the install. For example:
/private/tmp/.Levon.pkg.897.install
$RECEIPT_PATH: Full path to a temporary directory containing the operation
executable. This is a subdirectory of $INSTALLER_TEMP. This location may
vary between installs. The executable can use this path to locate other files
in the package. For example:
/private/tmp/.Levon.pkg.897.install/Receipts/Levon.pkg/Contents/Resources
[...]
Cheers,
Mario
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden