Know what system is used ?

BlitzMax Forums/BlitzMax Programming/Know what system is used ?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi :)

I'm working on the next IGlass release, but i have a problem :

It's not very easy to update each version for each os ! Exemple
for file requester structur, keyboard, or mouse (one button on mac)

I want only one version... But in the source code a method
to know what os used.example :

If Mac then
XXXX
Endif

If Linux then
XXXX
endif

etc... I have see in the module code some thing like :

?MacOS
Import "-framework AGL"
Import "-framework OpenGL"
?Win32
Import "-lglu32"
Import "-lopengl32"
?Linux
Import "-lGL"
Import "-lGLU"
?

It is the good way to know the used OS ?? can i do :

?Mac
Call something like function
?Linux
Call something like function
?

I have try

Test()

Function Test()
?MacOS
Print "MacOS"
?Linux
Print "Linux"
?Win32
Print "Window"
?
End Function

Seem to work but it is the good way ?

Please help !