FallingSandSurvival icon indicating copy to clipboard operation
FallingSandSurvival copied to clipboard

Create CmakeList.txt for compilation with cmake

Open DonFlymoor opened this issue 4 years ago • 6 comments

Describe the feature you'd like I'd like this to be able to use Cmake for development on linux. It should be pretty straightforward to create one from what I can find. It requires is creating a CmakeList.txt make-file in a few directories, and as all of the libraries used seem to be platform independent, it should work well on linux.

Is your feature request related to a problem? Please describe. Developing Software on Linux is typically easier then on Windows for many reasons, and I just can't get it to work on windows due to firewalls and the general slowness of Visual Studios. I'm able to get all the dependencies on linux, but not being familiar with the code I'm having trouble creating a cmake makefile for FSS. Also, running FSS (from github actions) on linux with WINE yields only white.

DonFlymoor avatar Nov 18 '20 19:11 DonFlymoor

Yeah I've been meaning to do this but I keep forgetting. I'll probably start working on getting Linux building over the weekend. All the libraries should be platform independent like you said and I'm pretty sure my code should be too.

PieKing1215 avatar Nov 19 '20 23:11 PieKing1215

Commit 7476e11 fixes the white screen problem on WINE for me (though there still seems to be problems with world loading). I'm still working on an actual linux cmake though

PieKing1215 avatar Nov 22 '20 06:11 PieKing1215

I'm attempting to build FSS on linux with cmake, I've already run into a dependency issue with conan, but I fixed that and submitted a pr.

DonFlymoor avatar Dec 08 '20 19:12 DonFlymoor

Yeah sorry I haven't pushed anything for linux yet, I did work on it a couple weeks ago and got it building but there were still some compatibility problems and I've been busy with classes since then. There were a lot of changes I needed to make to the cmake files (and also some code) to get it to actually work, but I haven't pushed anything yet because I never finished.

I might have time tomorrow to clean up and push some stuff but otherwise I'll have much more time to work on it starting next week.

PieKing1215 avatar Dec 08 '20 21:12 PieKing1215

I've been working on linux the last couple days and I've got it autobuilding on GH actions and runnable on my machine.

If you can, try and see if this build runs for you (use the "FallingSandSurvival_linux_x64" artifact) https://github.com/PieKing1215/FallingSandSurvival/actions/runs/439892354

All you should have to do is unzip it, go inside, chmod +x FallingSandSurvival ./FallingSandSurvival and the game should run. It seems to have occasional random segfaults but the windows version crashes randomly too so I get the feeling it's not because of linux

It runs on my random ubuntu 20.04 machine but I haven't tested if it works on anything else. To this extent, I have cmake for linux working on the cmake branch if you want to try building it yourself (see Building for some WIP instructions)

PieKing1215 avatar Dec 23 '20 09:12 PieKing1215

That's great! I'll try building and running it, and yes, it does crash on Windows as well.

DonFlymoor avatar Dec 27 '20 21:12 DonFlymoor