Page 1 of 1

A more up to date OSVersion.

Posted: Sun Apr 21, 2019 8:22 pm
by DoubleDutch
It would be nice if OSVersion() was updated (the docs only list up to mac osx 10.11), possibly with a new command OSVersionString().

Re: A more up to date OSVersion.

Posted: Tue Jun 11, 2019 6:08 pm
by MacDefender
I would like to see this updates too. I noticed that in 5.71 beta 1 there also #PB_OS_MacOSX_10_12 available but nothing for 10.13-10.15

If I look at the return paramater of OSVersion unter macOS the value returned is just 11200 so it should be possible to already include values for 10.16 and 10.17 in advance. Or maybe just add functions like OSVersionMajor() and OSversionMinor() that passes the OS version as an integer?
I know that it is possible to use processInfo operatingSystemVersion (really quick and dirty) but it would be nice to have a native functions for this:

Code: Select all

NSProcessInfo = CocoaMessage( 0, 0, "NSProcessInfo processInfo" )
If NSProcessInfo
  NSVersion = CocoaMessage( 0, NSProcessInfo, "operatingSystemVersion" )
  vMajor = PeekI( NSVersion )
  vMinor = PeekI( NSVersion + 8 )
  vPatch = PeekI( NSVersion + 16 )
  Debug( "Version: " + Str( vMajor ) + "." + Str( vMinor ) + "."+ Str( vPatch ) )
EndIf