Fix for systemversion... and other things
Posted: Sun Aug 18, 2024 7:29 pm
This comes under the "Demos" part of this topic. It's not fun, or games
(although it does open up a whole new avenue of "fun and games").
As anyone reading this may or may not know, the systemversion function is broken under MacOS 11+
(it returns the wrong value).
In OXT Lite, I already have a built in function you can run:
That works for all platforms, but I'd ideally like to fix the systemversion function C++ code in the engine.
So, that brings me to the point of this post: How to test C++ code in the OXT IDE without having to do a full recompile, test the result, and keep going backwards and forwards to the compiler.
Well, it's actually quite simple - and I thought I'd upload a proof of concept of running C++ code in the IDE. This uses the shell function to run the compiled code. (You'll have to compile your own if you are running windows - instructions included).
But my thinking was - this way we could externalise all functions as needed - by building up a list of compiled binary functions. If anything needs changing in future, you just recompile the one single file as you are referencing it through the IDE.
(although it does open up a whole new avenue of "fun and games").
As anyone reading this may or may not know, the systemversion function is broken under MacOS 11+
(it returns the wrong value).
In OXT Lite, I already have a built in function you can run:
Code: Select all
put osversion()
So, that brings me to the point of this post: How to test C++ code in the OXT IDE without having to do a full recompile, test the result, and keep going backwards and forwards to the compiler.
Well, it's actually quite simple - and I thought I'd upload a proof of concept of running C++ code in the IDE. This uses the shell function to run the compiled code. (You'll have to compile your own if you are running windows - instructions included).
But my thinking was - this way we could externalise all functions as needed - by building up a list of compiled binary functions. If anything needs changing in future, you just recompile the one single file as you are referencing it through the IDE.