Skip to content

Installation

Gwilherm Baudic edited this page Aug 6, 2020 · 4 revisions

How to install

How to get linbound

As of today, no releases have been produced, so the code is on the repository. Simply clone the git repository.

The code is being developed with eclipse CDT under Linux, VS 2019 Community on Windows and with Linux as primary target, but is meant to be as cross-platform as possible. In order to compile it, simply use the cmake-based compilation chain. CMake >= 3.9 (ideally 3.10 or above) is required, because previous versions lack proper support for the Google Test library.

cmake .
make
make install (although you may have surprises when installing, please report them or even better, suggest a fix).

The cmake script has some variables that you can set before compilation:

  • ENABLE_TESTS (default: ON) to build the test suite
  • ENABLE_SERVER (default: OFF) to build the server
  • RESOURCE_PREFIX to tell the program where to look for the images, sounds and fonts. Default on Windows is ./res, which makes sense both on an install and when debugging; on Linux, it will default to the standard install location in /usr/local, so you may have to override it when debugging.

How to compile

Please refer to the page Libraries for a list of required dependencies. As usual, you will require the development packets (suffixed devel or dev depending on your distribution). The case of guisan is a little bit more special though. The eclipse project file assumes that the static library and the header files have been installed (copied) at a place where g++ can find them without specifying extra options. The configure script uses pkg-config to check for the library presence, so make sure that in addition to the static libary and the header files, the guisan.pc file can also be found by pkg-config.

A successful compilation will produce 3 binaries:

  • linbound, the client software
  • linbound_server, the server part which you need if you want to host games from your computer
  • linbound_test, which contains the unit tests. Of course, only useful for development, and only produced if testing was enabled when compiling.

All three will require the res/ subdirectory of the repo to be in the same directory as them so they can run. On Windows, the DLLs from SDL and other dynamic dependencies will be required too.

How to translate

The application is not translatable at this time.

How to create an installer

Linux

There is a build pipeline in place to create snaps, but due to an issue with permissions, they are not released. A spec file for RPMs is also offered at the root of the repository, but is untested.
I also started a Dockerfile, which is currently untested too, but may be a good starting point.

Windows

Inno Setup has been chosen to make the setup script. There is already a .iss file at the root of the repository. This file expects to find the necessary DLL files in a subfolder called dll, which is not pushed on GitHub. Depending on your compilation toolchain (MSVC or MSYS), the list of DLLs will slightly vary; the MSYS one is longer and heavier. Most of the SDL libraries can be found prebuilt except SDL2_gfx. For the others (tinyxml2, sqlite, box2d), you may have to build them yourself (for MSVC) or copy them from your MSYS installation. Guisan is a static library and will not cause any problems here.
For Visual Studio, you should copy the setup files for the redistributables from your installation to the root of the repository so they can be run when installing the program. For MSYS, several gcc-related DLLs have to be copied (libpthread, ...). Use a tool like Dependency Walker on the linbound.exe file to find out the full list.

Clone this wiki locally