Re: Testing for downgrade in Distribution Scripts
Re: Testing for downgrade in Distribution Scripts
- Subject: Re: Testing for downgrade in Distribution Scripts
- From: Bill Coderre <email@hidden>
- Date: Thu, 21 Sep 2006 09:14:45 -0700
On Sep 21, 2006, at 7:18 AM, Sean P. Kane wrote: Can you show me an example of the _javascript_ you use for this? Also, How do you make sure they are only installing on the Startup Disk?
This option in the distribution enforces the root volume only. <options rootVolumeOnly = "true" />
Here's a script snippet that returns true if QuickTime version is < 7.1.3. <script> function NeedsQuickTime() { var path = "/System/Library/Frameworks/QuickTime.framework"; var bundle = system.files.bundleAtPath(path); if (bundle == null) return true; var installedVersion = bundle.CFBundleShortVersionString; if (installedVersion == null) return true; return ((system.compareVersions(installedVersion,"7.1.3") < 0)); } </script>
It also returns true if QuickTime is not installed (which would be very unfortunate for Mac OS X) or if the QuickTime.framework didn't have a property called CFBundleShortVersionString in its Info.plist.
Here's a choice using that code: <choice id="QuickTime" title="QuickTime" enabled = 'isNotDowngrade()' selected = 'isNotDowngrade() && NeedsQuickTime()' visible="false" > <pkg-ref id='com.apple.pkg.QuickTime713' /> </choice>
I marked it as not visible because I didn't want the user to have an option to turn it off.
This stuff is documented in the following URL on your drive, assuming Developer.mpkg is installed: |
_______________________________________________
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