On Thu, Oct 11, 2012 at 1:24 AM, Andrew Keller <andrew@kellerfarm.com> wrote:
Hello all,
Is it possible to conditionally require a restart for an install?
Yes.
Here's my situation:
Version 2 of my app cannot be properly unloaded without a shutdown, but version 3 can.
So, for a fresh install, nothing exists, so just install the software without a restart. If you are installing 3.0.1 and 3.0.0 is installed, a restart still is not required. But, if you are installing 3.x (or even any version) and 2.x is installed, a restart is required.
Here is how this can be done: - make a distribution with 2 packages: one for the the payload, one of the restart action - in the payload package, do everything as usual. Do not require a restart upon a successful installation. - in the restart package: o require a restart upon a successful installation o do not install anything - in the distribution: o set a requirement for the choice corresponding to the restart package: unselect the choice when a requirement is not met (for instance a file specific to your 2.0 version is installed or you can call a shell script to do more advanced stuff that you would not be able to do via JavaScript). I don't know which minimum OS version it requires as I always thought it was not possible to prevent a restart when one of the choices required a restart whether it was selected or not. I tested this on Mac OS X 10.7. -- 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