Open electronstudio opened 2 years ago
Why should we want to upgrade?
Packaging. Java 8 has a packaging tool but it's not been great (was quite buggy on Linux, doesn't remove unnecessary stuff from packaged JDK). It was removed in Java 9, and then a new better one was added in Java... 17, I think.
Desktop integration for stuff like opening files. Java 11 has more/better desktop integration, and MacOS is particularly tricky so probably better in new versions.
What are the problems with upgrading?
LWJGL2 doesn't work on any Java after 8. So we have to switch to LWJGL3.
Problems with LWJGL3 on Linux: resolution / aspect ratio is messed up. Crashes when attempting to open file dialog.
There's also problems I dont recall with LWJGL3 on Mac.
These problems might be fixed by using a newer version of LWJGL3... but that means using a newer version of LibGDX. And that didn't work due to weird JSON errors.
What can we do?
Upgrade to latest LibGDX. Fix incompatibilities with other libs and JSON errors etc.
Switch to LWJGL3. Debug any remaining issues with resolution and file dialogs.
Upgrade to Java 17.
Produce packages using the new Java packager.
OR
Drop LibGDX entirely and port to a more modern graphics library.
OR
Rewrite entire project to use a more app-friendly non-game library like QT.
For now:
Stick with Java 8 and investigate best integration we can get with it on Linux and Windows. Mac is always more hassle for fewer users so don't bother unless I happen to be using my old MacOS, and even then don't worry about the signing required to get anything to work on latest MacOS.
What are the problems with upgrading?
LWJGL2 doesn't work on any Java after 8. So we have to switch to LWJGL3.
This isn't true, LWJGL2 is working on Linux with Java 17 for me now. So why did I think it wasn't before?!? Don't want to be in a situation where it works on some systems and not others.... OK I just experienced a hardlock of the entire system while testing Java 17 + LWJGL2. Not just the X server but the whole kernel. That's quite impressive but may perhaps be why I said "doesn't work" before.
What is not working at all is LWJGL2 + flatpak, and that includes using a flatpaked IntelliJ to test.
The hardlock has not repeated so hopefully was a fluke caused by the flatpak tool exhausting the system memory or something.
Upgrading to LWJGL3 has been done. Resolution issue fixed, and the file dialog issue has not appeared on Linux. Need to test on Windows.
CRU was originally written using what is now quite old tech: Java 8, LWJGL2, etc.
As usual with LibGDX projects, upgrading is not easy, because every part depends on every other part so you have to upgrade them all at once, and chances are one part with have a show stopper bug on at least one OS. So I created this issue to track attempts so I don't keep repeating same stuff!