Know what system is used ?
BlitzMax Forums/BlitzMax Programming/Know what system is used ?
| ||
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 ! |
| ||
Yes. Those compiler directives will help you.?MAC Print "I'm ruuning on a Mac" ?WIN Print "Windows version" ?LINUX Print "You'll see me in Linux only" ? Print "I'll show up on all of the systems." |
| ||
Ok thanks !! Jb :) |
| ||
Which is it then? ?WIN or ?Win32 Big difference, and I can't find documentation on this... |