Re: How to skip the installation when install a lower version. (PackageMaker3.02)
Re: How to skip the installation when install a lower version. (PackageMaker3.02)
- Subject: Re: How to skip the installation when install a lower version. (PackageMaker3.02)
- From: Iceberg-Dev <email@hidden>
- Date: Wed, 26 Nov 2008 20:30:54 +0100
On Nov 26, 2008, at 4:29 AM, Gu, Kevin wrote:
Hi all,
I know this might be a very simple question, but I tried and failed
many times and have to write this mail.
What I want is very simple:
1. Installation runs when install an initial version or install a
higher version.
2. Installation skips when install an lower version.
I have tried the "Package Version", but it doesn't work.
I use PackageMaker 3.02 on Leopard.
Any help will be highly appreciated.
Thanks in advance.
If you use a distribution script, it might be worth giving a look at
the following target task:
my.target.receiptForIdentifier()
As far as I can tell, you can:
- get the version of your package installed on the target disk
var tInstalledPackageVersion;
tInstalledPackageVersion=my.target.receiptForIdentifier
('com.apple.MacOSX.lang.no'); /* Example */
system.log(tInstalledPackageVersion.version);
- get the version of a package in your distribution script using the
choices > packages > version.
- finally you can compare both values with system.compareVersions
You will need to check that the different values exist or use try/catch,
My $0.02
_______________________________________________
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