Menu

Dev_Env_Install

benblan

[Project Guidelines and Rules]

Installing the Development Environment


Requirements

In order to develop code for the game, you will need several elements on your computer :

A git client

Choose what you want.
Don't forget to set your user name and email if you want to commit.

 $ git config user.name="username"
 $ git config user.email="youremail"

A C++ compiler

Freesynd is developed using C++20.
Please consult [Guiding principles and decisions] for the list of supported compilers.

Ninja vs Makefile

You can use one of them but using Ninja is really faster than Makefile

CMake

Look at the [CMake cheatsheet]

Conan 2

We use Conan to manage our dependencies. Currently not all dependencies are managed by Conan either because they do not exist in Conan Center or it was simpler to keep them out of Conan management.
You can install Conan 2 directly or through a virtual environment (https://docs.conan.io/2/installation.html)

Then run the following command to define a default profile for Conan:

$ conan profile detect --force

Check that this profile (~/.conan2/profiles/default) defines the right c++ version:

compiler.cppstd=gnu20

Required libraries

The following libraries are needed in their development version :
* SLD 2
* SDL2_Mixer
* SDL2_Image

Linux

You can install the different libraries using the following commands :

# Install SDL 2
sudo apt-get -y install libsdl2-dev
# Install SDL_Mixer
sudo apt-get -y install libsdl-mixer2-dev
# Install SDL_Image
sudo apt-get -y install libsdl-image2-dev

Windows

You don't need to download anything. All libraries needed for developing and running the game are availing in the source reposition in /extern/.

Mac

For SDL2, you can use Homebrew :

# Install SDL 2
brew install sdl2
# Install SDL_Mixer
brew install sdl2_mixer
# Install SDL_Image
brew install sdl2_image

Dev Environments

Linux

Visual Studio code

  1. First install Visual Studio Code (https://code.visualstudio.com/)
  2. Install the C++ extension and CMake Tools extension
  3. From the root directory, run code .
  4. In VS Code chose the preset ninja-linux-x86-debug.

Windows

Visual Studio code

  1. First install Visual Studio code: choco install vscode
  2. Install the C++ extension and CMake Tools extension
  3. In the freesynd directory, type code .. This will open VS Code.
  4. In VS Code chose the preset ninja-msvc-x86-debug. You may need to scan for compilers first in VS Code if you use VS Build Tools
  5. Then build the application

Mac

Visual studio code

  1. First install Visual Studio code using homebrew
  2. Install the C++ extension and CMake Tools extension
  3. In the freesynd directory, type code .. This will open VS Code.
  4. In VS Code chose the preset ninja-clang-arm64-debug
  5. Then build the application

Related

Wiki: CMake cheatsheet
Wiki: Guiding principles and decisions
Wiki: Project Guidelines and Rules

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.