How to determine cross-platform OS architecture?
How to determine cross-platform OS architecture?
I know how to do it on Windows OS, but not on Linux and MacOS.
Re: How to determine cross-platform OS architecture?
Purebasic uses the respective OS libraries to create programs.
It must be compiled on the respective operating system.
If you use OS specific API, you can only customise it in the source code.
It must be compiled on the respective operating system.
If you use OS specific API, you can only customise it in the source code.
Code: Select all
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
;
CompilerCase #PB_OS_Linux
;
CompilerCase #PB_OS_MacOS
;
CompilerEndSelect
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: How to determine cross-platform OS architecture?
I know how separate code for each platform with compiler conditions. But I need a methods for linux and mac. This is problem for me.
Re: How to determine cross-platform OS architecture?
Your question is not clear. Can you ask it in another way?
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: How to determine cross-platform OS architecture?
Linux system information includes a classic textmode shell version. The source is included too, so you can rip what you needdamn wrote: Sun Aug 06, 2023 11:32 am I know how to do it on Windows OS, but not on Linux and MacOS.

I hope i understood your question correctly, it is a bit vague.
Re: How to determine cross-platform OS architecture?
Sorry for my English =(.
For example:
This code work fine for Windows OS, but I need some code like this for other OS.
For example:
Code: Select all
Procedure.a is64()
Protected Info.SYSTEM_INFO
GetNativeSystemInfo(Info)
If info\wProcessorArchitecture
ProcedureReturn #True
EndIf
ProcedureReturn #False
EndProcedure