I know and the code will be changed. But I need to trace some very mysterious problems in an already shipped product. The above code could be one possible source unless it returns true on mac (which I think it does)…
That expression still works as of Catalina (I haven’t moved to BigSur yet because I am addicted to the Space Navigator and don’t want to rely on the beta driver before it is released). Long term it is at risk, though, because the ‘darwin’ embedded in it is from the underlying build of the BSD kernel from which OS X was derived. Apple has hinted that some day they may start over with the kernel, at which point darwin may drop out.
I’ve managed, and also compiled SU om Mac , but I agree it was not very obvious. I don’t know why I’m not asked for what OS ton use on each startup, with a customizable timeout before the default option is selected.
It would be cool to have testing environments (e.g. VM or docker image or remote desktop in the cloud, which is both unfortunately not a natural thing with proprietary OS) accessible to developers, who after all provide software for either platform. Only commercial developers have an incentive to invest into owning every possible system/hardware.
Or have an extension API in SketchUp for Web, where all such extensions are guaranteed to behave exactly the same way over the whole SketchUp platform (web, desktop, mobile). Yes, it’s less an issue with pure SketchUp API extensions than rather with any further system integration (binaries, file system access, calling other apps/processes), but web APIs are moving there and hiding OS differences behind a perfectly cross-platform API.