lets-all-be-stupid-forever / circuit-artist

Circuit Artist is a digital circuit drawing and simulation game.
https://store.steampowered.com/app/3139580/Circuit_Artist
GNU General Public License v3.0
231 stars 7 forks source link

WIP: Allow more cross-platform build and automation #2

Closed mdaniel closed 1 month ago

mdaniel commented 1 month ago

I wanted to see if I could get this to build on macOS (amd64) and the answer is mostly yes, and it seems to boot up but I haven't hammered on it extensively

I didn't have an OpenMP library handy and it seemed to just be using it to sniff the number of threads so I taught CMake to elide that if necessary. I also put most of the fixes in their own separate commits so they can be used or not

I set up GHA to ensure it wasn't a case of "works on my machine ™" but also because I wanted to ensure I didn't break anything on Windows. It seems I was partially correct, but there's some tomfoolery going on with the LuaJIT in that one can see that it cooks luajit.so under macOS and cooks lua51.dll on Windows but their Makefile is ... opaque

Anyway, I thought others may enjoy running this locally, too, and if you know what's going on with the lua51.lib linkage error, I believe it's safe to merge

lets-all-be-stupid-forever commented 1 month ago

Hi @mdaniel , thanks for looking at it, I managed to compile and run on my mac laptop (mac13.2): image There are some differences from the windows version (camera is dragging for example), ill try to polish it asap so people can use it.

Actually on linux I had an extra problem of conflict between the raylib and the nativedialog where it was crashing when we tried to open/save a file. I think you did a more solid work here on the cmakes, I'll try to port what I did and combine with your part.

Thanks a lot 👍 and I'm sorry you had to go through this thing I should have ported to macos a bit earlier :( .