Which OS

tim Rowledge tim at rowledge.org
Fri Dec 23 21:40:09 UTC 2005


On 23-Dec-05, at 1:34 PM, Cowdery, Bob [UK] wrote:

> I am sure this must be obvious but I can’t find it. How do I  
> determine programmatically which OS I am running on.
Oh, easy.
If it keeps crashing then it must be windows.
If it rarely crashes but the GUI is horrible it must be *nix
If it rarely crashes and the UI is ok but insists on a single button  
mouse it must OSX
If it rarely crashes - but when it does it really pisses you off -  
and the GUI is ok with a three button mouse but the machine seems a  
bit slow by modern standards then it must be RISC OS.

Or you can be really boring and use
SmalltalkImage current platformName
and look at other methods in SmalltalkImage for further messages to  
get more or less detail.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
My Go this  amn keyboar  oesn't have any  's.





More information about the Squeak-dev mailing list