Get System Info vs PLATFORM PROPERTIES

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Get System Info vs PLATFORM PROPERTIES

4D Tech mailing list
So PLATFORM PROPERTIES has been deprecated in favor of Get System Info. Get System Info is far ore informative,  but am I the only one finding the text values of some of the properties near impossible to work with in a consistent manner across multiple platforms? Specifically osVersion and processor.

For example. If you need, for whatever reason, to know what OS version 4D is running in, osVersion might return…

        Microsoft Windows 10 Professionnel 10.0.14393
                OR
        macOS 10.13.6 (17G7024)

Unless I am not seeing a way, how can one parse the returned value to get a usable value across multiple platforms now and going forward? PLATFORM PPROPERTIES returned a Long Integer that you could work with.

For osVersion, I think it would help if there was a property that just returned the long int value of the os, ie. osVersioinNumber -> 10.0.14393  

Not sure what could be done for processor.

John


John Baughman
Kailua, Hawaii
(808) 262-0328
[hidden email]

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

RE: Get System Info vs PLATFORM PROPERTIES

4D Tech mailing list
John,


C_OBJECT(System_Info_ob)
System_Info_ob:=Get system info

vPlatformOS:=System_Info_ob.osVersion

David Ringsmuth
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Get System Info vs PLATFORM PROPERTIES

4D Tech mailing list
In reply to this post by 4D Tech mailing list
You can use the 4D function *Is macOs* or *Is Windows* instead of the longint returned by PLATFORM PROPERTIES


Alberto



> El 14-07-2019, a las 19:19, JOHN BAUGHMAN via 4D_Tech <[hidden email]> escribió:
>
> So PLATFORM PROPERTIES has been deprecated in favor of Get System Info. Get System Info is far ore informative,  but am I the only one finding the text values of some of the properties near impossible to work with in a consistent manner across multiple platforms? Specifically osVersion and processor.
>
> For example. If you need, for whatever reason, to know what OS version 4D is running in, osVersion might return…
>
> Microsoft Windows 10 Professionnel 10.0.14393
> OR
> macOS 10.13.6 (17G7024)
>
> Unless I am not seeing a way, how can one parse the returned value to get a usable value across multiple platforms now and going forward? PLATFORM PPROPERTIES returned a Long Integer that you could work with.
>
> For osVersion, I think it would help if there was a property that just returned the long int value of the os, ie. osVersioinNumber -> 10.0.14393  
>
> Not sure what could be done for processor.
>
> John
>
>
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> [hidden email]
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Get System Info vs PLATFORM PROPERTIES

4D Tech mailing list
Hello,

I think the verbose version string is for human consumption,
for example, to help the end user or support contact identify the running platform.

I can't think of any situation where the internal build number would be needed in 4D code.

For osVersion, I think it would help if there was a property that just returned the long int value of the os, ie. osVersioinNumber -> 10.0.14393



**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Get System Info vs PLATFORM PROPERTIES

4D Tech mailing list
probably just the major version info
Windows : XP, 7, 8, or 10
Mac : 10.9, 10.10, 10.11 ...


so far, for me, I only need to differentiate between platforms, not OSes
so when I need

if (Folder separator = ":") `this is a mac
  do mac stuff
else
  do windows stuff
end if

Chip

On Thu, 18 Jul 2019 15:46:26 +0000, Keisuke Miyako via 4D_Tech wrote:

> Hello,
>
> I think the verbose version string is for human consumption,
> for example, to help the end user or support contact identify the
> running platform.
>
> I can't think of any situation where the internal build number would
> be needed in 4D code.
>
> For osVersion, I think it would help if there was a property that
> just returned the long int value of the os, ie. osVersioinNumber ->
> 10.0.14393
>
>
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************