You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If REX is meant to always be included in code (does it really make sense?), should we port this to macOS, too?
Is there any case where the code breaks because loading REX from resources has been lost?
The text was updated successfully, but these errors were encountered:
MatthiasWM
changed the title
Is REX properly loaded on macOS native UI buid for every scenario?
Is REX properly loaded on macOS native UI build for every scenario?
Jan 9, 2022
Well, here is my reason for implementing it this way. Most Einstein users are not developers, and asking them to add the ROM is already quite a hurdle. Asking them to also add the Rex is yet another unnecessary bump. The proof is in the question "when did we ask users to install a new Rex file?"
Using FLTK's user interface designer in this case has nothing to do with UI creation, but Fluid has a nice option that converts any binary into C++ that generates the binary again when compiled. If dependencies are set correctly, it will do this every time Einstein.rex is newer than app/TFLRexImage.fl, so the newest Rex will compiled into the app.
It is of course possible to check for the existence of an Einstein.rex in the same directory as the ROM, and use that if its creation date is newer than the App's compilation date (which is hardcoded into Einstein via app/Version.h, and updated automatically via CMake (only)).
For the native macOS build, I would recommend to set Einstein.rex as a resource, so it gets added to the bundle. If the Rex in the bundle is older than an external Rex, you could still load the external one. Otherwise use the internal one as a fallback. No need to compile it into the binary.
BTW: I am rewriting the Version.h logic as we speak and will push a functionally equivalent version in a few minutes.
https://github.com/pguyot/Einstein/blob/master/Emulator/ROM/TFlatROMImageWithREX.cpp#L135
Apparently, with FLTK binaries, the REX is included in source code, generated at build time from the file.
https://github.com/pguyot/Einstein/blob/master/app/TFLRexImage.fl
If REX is meant to always be included in code (does it really make sense?), should we port this to macOS, too?
Is there any case where the code breaks because loading REX from resources has been lost?
The text was updated successfully, but these errors were encountered: