Re: Version control in Installer Packages
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com On Sep 22, 2008, at 11:00 PM, Ulf Dunkel wrote: So we have set up the "Requirements" as follows: Required: required Pass if: true Description: Target OS Version: is greater than or equal to '10.4.5' This works fine when I test it on my Leopard machine (of course). if(!(my.target.systemVersion.ProductVersion >= '10.4.5')) { Scott Thank you in advance, UlfDunkel _______________________________________________ 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: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... Our iCalamus installer for CD shipment has been set up in a way that it should check the customer's Mac OS X version first. But now a customer complained that it didn't work on his Tiger machine with 10.4.11. How the heck are values compared in "Requirements"? I guess they are compared as strings (where "10.4.11" is lower than "10.4.5"). Can someone confirm this as a bug - or did we something wrong? Hi Ulf, I'm sorry to say that I think that this is a bug in PackageMaker. I set up a test as you described and looked at the distribution file that it created. The check that it sets up looks like this: On the surface that might look correct but it isn't. In a situation when comparing this to 10.4.10 or higher it's going to give the incorrect answer. To be correct it would have to look something like this: if(-1 == system.compareVersions(my.target.systemVersion.ProductVersion, '10.4.5')) { Called this way it should properly compare the versions. The return code of the compareVersions function is -1 for less than 0 for equal and 1 for greater than. In your situation I would suggest you manually change the distribution after creating it through PM. And please file a bug for this. _______________________________________________ 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: http://lists.apple.com/mailman/options/installer-dev/samory %40apple.com This email sent to samory@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Scott Amory