Skip to content

eressea/server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f137d5e · Mar 17, 2025
Mar 3, 2024
Jan 12, 2025
Apr 24, 2024
Dec 16, 2024
Feb 16, 2025
Dec 8, 2024
Jul 20, 2022
Sep 3, 2017
Jun 15, 2024
May 19, 2024
Mar 17, 2025
Jan 12, 2025
Mar 12, 2025
Aug 26, 2023
Oct 11, 2017
Mar 16, 2025
Jan 12, 2025
Feb 7, 2014
Jan 3, 2025
Nov 27, 2023
Apr 12, 2022
Mar 16, 2014
Dec 7, 2024
Jan 5, 2025
Jun 22, 2021
Feb 26, 2025
Jan 5, 2025
Dec 16, 2024
Feb 1, 2022
Feb 20, 2021
Dec 16, 2024
Dec 16, 2024
Aug 14, 2014
Mar 7, 2014

Repository files navigation

Eressea PBEM Server

This repository contains the source code for the Play-by-Mail strategy game Eressea.

Prerequisites

Eressea depends on a number of external libraries. On a recent Debian-based Linux system, this is the apt-get command to install all of them:

sudo apt-get install git cmake gcc make luarocks \
    liblua5.2-dev libtolua-dev libncurses5-dev libsqlite3-dev \
    libcjson-dev libiniparser-dev libexpat1-dev libutf8proc-dev

If your system for some reason doesn't have Lua or the tolua library, you can run configure with the --no-lua option to build the code without Lua extensions. This is very much untested, and it breaks any items or spells that have their actions implemented as Lua scripts, as well as the Lua integration tests.

How to check out and build the Eressea server

This repository relies heavily on the use of submodules, and it pulls in most of the code from those. The build system being used is CMake. Here's how you clone and build the source on Linux or macOS:

git clone --recursive https://github.com/eressea/server.git source
cd source
git submodule update --init
./configure
s/build

If you got this far and all went well, you have built the server, and it will have passed some basic functionality tests.

  • Static Analysis
  • Build Status
  • License: CC BY-NC-SA 4.0

Building on Windows

To build on Windows, first install Visual Studio and VCPKG: https://github.com/microsoft/vcpkg#quick-start-windows Set an environment variable named VCPKG_ROOT to the directory where you installed VCPKG globally, e.g. C:\VCPKG Now, install the required packages:

VCPKG.EXE install sqlite3 expat pdcurses cjson iniparser tolua
VCPKG.EXE integrate install

Using luarocks, install the lunitx module (this can be complicated).

In Visual Studio, clone the reportitory from github, or if you've already done that, choose File -> Open -> CMake and pick the CMakeLists.txt file in the root of the repository. Build the project.

Select eressea.exe as the Stratup Item, then open the launch.vs.json file by choosing Debug -> "Debug and Launch Settings for eressea.exe".

Here, add your data the directory in "currentDir", and command line arguments in "args". On my own computer, the configuration looks like this:

{
  "version": "0.2.1",
  "defaults": {},
  "configurations": [
    {
      "type": "default",
      "project": "CMakeLists.txt",
      "projectTarget": "eressea.exe",
      "args": [
        "-w0",
        "-t1242",
        "-v1",
        "-D",
        "${workspaceRoot}\\scripts\\run-turn.lua"
      ],
      "currentDir": "${env.ERESSEA_ROOT}",
      "env": {
        "ERESSEA_ROOT": "${workspaceRoot}",
        "LUA_PATH": "${workspaceRoot}\\scripts\\?.lua;${env.LUA_PATH}"
      },
      "name": "eressea.exe"
    },
    {
      "type": "default",
      "project": "CMakeLists.txt",
      "projectTarget": "test_eressea.exe",
      "name": "test_eressea.exe"
    }
  ]
}

Note that I have an environment variable for my game directory called ERESSEA_ROOT. My LUA_PATH also contains the luarocks installation.

LUA_PATH=C:\Users\Enno\AppData\Roaming\Luarocks\share\lua\5.4\?.lua
ERESSEA_ROOT C:\Users\Enno\Documents\Eressea\test