Skip to content

Building

Matthew Hopson edited this page Jan 18, 2020 · 6 revisions

Windows [Visual Studio]

Please use the links below:

Build With Visual Studio

Running the Unit Tests With Visual Studio

Linux

Libraries

These are required for the project, and usually can be downloaded via your distributions

sudo apt install libsfml-dev

If not, then you can download them from the website:

SFML Download

Building

First clone the project and cd:

git clone https://github.com/Hopson97/open-builder.git
cd open-builder

To build, at the root of the project:

sh scripts/build.sh

To run, at the root of the project:

sh scripts/run.sh               # Launches both client and server  
sh scripts/run.sh -server 8     # Launches server only, allowing upto 8 connections
sh scripts/run.sh -client xyz   # Launches client, with player name xyz

To build and run in release mode, simply add the release suffix:

sh scripts/build.sh release
sh scripts/run.sh release <args>

Unit Tests

The unit tests can be ran using

sh scripts/tests.sh