This came up originally on Cocoa-dev. The manual pages for
gestaltSystemVersion apparently recommend against its use:
file:///Developer/ADC%20Reference%20Library/documentation/Carbon/
Reference/Gestalt_Manager/gestalt_refchap/chapter_1.4_section_181.html
A better way to obtain version information in Mac OS X is to read
the system version information from the following file:
/System/Library/CoreServices/SystemVersion.plist
Why is this? Gestalt seems like a simpler solution, compared to
parsing a plist. I also thought that early OS X Server versions
lacked this plist entirely.
Here's a comment from a CarbonCore engineer:
Maybe gestaltSystemVersion itself should be deprecated, but we
added a bunch of new selectors to deal with the major, minor, and
bug fix releases in three seperate selectors ( to deal with the
problem that minor and bugfix rev couldn't be > 10 since it's
defined as BCD ).
Those selectors are:
gestaltSystemVersionMajor = 'sys1', /* The major system
version number; in 10.4.17 this would be the decimal value 10 */
gestaltSystemVersionMinor = 'sys2', /* The minor system
version number; in 10.4.17 this would be the decimal value 4 */
gestaltSystemVersionBugFix = 'sys3' /* The bug fix system
version number; in 10.4.17 this would be the decimal value 17 */
In general, I wouldn't recommend reading the SystemVersion.plist.
-eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden