Bithack / principia

Open source physics-based sandbox game.
https://principia-web.se
Other
259 stars 25 forks source link

macOS support #144

Open rollerozxa opened 6 months ago

rollerozxa commented 6 months ago

This sounds like a great idea, doesn't it?

Most of the porting should be fairly easy to do thanks to SDL. Get a development environment set up, obtain the necessary dependencies, add a new TMS backend and build. Then write a GitHub workflows action so that macOS builds will be made for each commit (as well as testing that compilation still works).

OpenGL is deprecated on macOS but still not removed, so we can still use it. (Minetest on macOS reports the OpenGL version as 2.1 which should be enough)

Porting would need someone on Mac hardware to do so, along with someone to test that the builds still work from time to time. If anyone were willing to help me get ahold of some Mac hardware (nothing fancy, I'd be fine with some old MacBook with a busted screen) then that would be nice. Hackintosh appears to still be a thing, and XCode seems to work under Darling now, but being on actual hardware would be the only way to properly test that the builds are functional.

rollerozxa commented 1 month ago

I managed to get a macOS VM set up and did some initial work on a macOS port, see fcbbfc261df7cddbd48ac5e1178c61635744d040. It now compiles for macOS, but I have no idea if it runs yet since the VM I'm using doesn't have OpenGL support, so I can't go much further than this.

image

rollerozxa commented 1 month ago

Bit late, but I did some more work when I figured out how to do OpenGL in a VM, and now the game works on macOS.

I would still need assistance from someone who owns some Apple hardware to do more testing and bring the port to a usable state. I've set up CI for macOS that generates app bundle artifacts, and compilation instructions are here if the builds don't work.

image

image