22 days ago
- Principia was originally released in 2014 and supported Windows XP, but modern toolchains and dependencies like UCRT have since made this compatibility difficult to guarantee.
- The project aims to bring Principia back to Windows XP using an open-source build, leveraging SDL for cross-platform support and requiring minimal code changes.
- A custom toolchain was built using GCC, binutils, and mingw-w64, targeting i686-w64-mingw32 with MSVCRT and WIN32_WINNT set to 0x0501 for Windows XP compatibility.
- Dependencies like curl, Freetype, libjpeg-turbo, libpng, SDL, and zlib were built with the new toolchain, though GTK3 was replaced with Dear Imgui for dialogs to avoid complexity.
- Building Principia required addressing a compiler error related to __stdcall calling conventions by updating typedefs in pipeline.c to use GLAD function prototypes.
- Testing on a Windows XP virtual machine and real hardware (an old desktop with AMD Phenom II) confirmed the binary runs, despite font corruption issues likely due to OpenGL drivers.
- Post-build improvements included switching curl to use mbedTLS for TLS support on XP and creating an NSIS installer for ease of use, with scripts available on GitHub.