Skip to content

Ubuntu Build Instructions

Justin Jacobs edited this page Sep 20, 2018 · 12 revisions

Simplified instructions for building Flare from source on Ubuntu.

You need sudo permissions to build Flare.

Step 1: Download the code and data

This is the easiest way to get the latest code and data. It skips using git. So this is useful if you want to build the game once to try the latest version, but not if you want to stay up to date. (See the Optional section below on using git instead.)

Then uncompress both of these files somewhere temporary and easy to get back to. Like maybe your home folder. You should end up with one folder called "flare-engine" and one called "flare-game".

Step 2: Install the requirements

You're on Ubuntu so you want to run these commands on the terminal.

sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl-ttf2.0-dev
sudo apt-get install cmake make g++

The first line installs SDL, an open-source C++ library for games. The second line installs tools to compile C++ projects, if they aren't already installed.

Step 3: Build

In a terminal, navigate to wherever you've uncompressed the flare-engine folder. Run these commands inside the flare-engine folder. Notice that the cmake command is followed by a space and a period!

cmake .
make

Now hopefully you have a flare executable file. Copy and paste this flare executable inside the flare-game folder. Now Flare is ready to run.

Optional: Stay up to date with git

Step 1 above is the easiest way to build flare because you don't have to install or learn git. But if you want to stay up to date with the latest builds, here's how to do it.

Install the git tool in Ubuntu:

sudo apt-get install git

Next, use git to clone flare. This makes a full copy of the project on your local machine. These commands will create the flare-engine and flare-game folders in your current working directory and download the data. So make sure to run these in the parent folder where you want flare-engine and flare-game to stay.

git clone https://github.com/flareteam/flare-engine.git
git clone https://github.com/flareteam/flare-game.git

Warning: this is a larger download than step 1 above because it's getting the history of the project, not just the latest snapshot.

Now you have flare-engine and flare-game folders just as in step 1. Steps 2 and 3 above are the same.

After you've cloned flare, you can update to the latest dev version by using git again. Navigate to inside the flare-engine folder and use this command:

git pull

Do the same inside the flare-game folder. This command grabs just the changes since your last update. Now repeat step 3 above to rebuild the engine.


See the INSTALL.engine file for general build instructions.

https://github.com/flareteam/flare-engine/blob/master/INSTALL.engine