Javascript: Missing information about OS version checking
Javascript: Missing information about OS version checking
- Subject: Javascript: Missing information about OS version checking
- From: Iceberg-Dev <email@hidden>
- Date: Sat, 11 Oct 2008 23:20:50 +0200
The "Installer Javascript Reference" documentation is not providing
some useful information when it comes to OS version checks.
(1) To check the OS version, you need to compare your minimum,
maximum version number against system.version.ProductVersion or
my.target.systemVersion.ProductVersion.
The documentation only talks about the ProductVersion key for
system.version and it only vaguely points to the man page of sw_vers.
(Bug ID#6286814)
(2) If you check the system version from a volume-check script for
from a choice, you definitely need to be aware that if no OS is
installed on a partition, an exception is raised if you use:
my.target.systemVersion.ProductVersion
A solution I found is to check that my.target.systemVersion is not
undefined (this is a Javascript constant) before trying to compare an
OS version. As a matter of fact this allows you to check whether a
Mac OS X distribution is installed or not on a partition.
As was said in previous posts, PackageMaker 3 generates buggy OS
version requirements because it does not use the compareVersions
method. But it apparently uses a trick to deal with this raised
exception.
Now, what happens if this exception is raised in your volume-check
script and you do not deal with it?
Well, in the "Select Destination" step, you get that:
1. The partitions with no OS can't be selected (that's OK in most
cases).
2. Installer.app displays incorrect inversion regarding the volume-
check processing status:
- The circular progress indicator keeps on spinning indefinitely
- The UI displays indefinitely "Examining additional volumes..."
(Bug ID#6286834)
_______________________________________________
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