Feleria: Building on Linux
Okay, so you want to build for Linux?
I expect you already know how to use the package manager on your Linux system and can navigate the terminal. If you try to double-click on things, it will probably break and you won’t know why, because you won’t be able to see the error messages.
If you are like me, you are uneasy running code from some random stranger on the internet. What I do for Ludum Dare is create a separate, non-administrator account for playing other people’s games. This way, bugs in other people’s code won’t wipe out my home directory. This practice strikes a nice balance between paranoia and convenience.
You will need to install a few packages. However, if you can run the configuration script, it may give you helpful output on exactly what you need to install, so you can skip ahead if you like.
- Python 3.x
- A C++ compiler
- SDL 2.0
Get the source code
From a terminal, here is how you get the latest code from GitHub:
$ git clone --recursive https://github.com/depp/feleria.git Cloning into 'feleria'... ... Cloning into 'sglib'... ...
Run the configuration script
The configuration script detects the libraries and compilers installed on your system.
$ ./config.py Platform: linux Target: gnumake ... Checking for FreeType library... yes Checking for FreeType library... yes Configuration failed. LibSDL 2 could not be found To install, run: sudo apt-get install libsdl2-dev Opus codec library could not be found To install, run: sudo apt-get install libopus-dev
As you can see, I forgot to install a couple libraries. The configuration script detected my Linux distro, and told me how to install the missing libraries.
$ sudo apt-get install libsdl2-dev libopus-dev [sudo] password for depp: ... $ ./config.py
Build the game
Now, just run
make, and run the game.
$ make -j4 ... $ ./Legend_of_Feleria_Release ...