Skip to content

eressea/server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d639310 · Sep 9, 2023
Mar 11, 2023
Aug 26, 2023
Dec 3, 2022
Jan 29, 2023
Jul 20, 2022
Sep 3, 2017
Oct 16, 2022
Jul 27, 2023
Sep 9, 2023
Sep 1, 2023
Sep 4, 2023
Aug 26, 2023
Oct 11, 2017
Sep 9, 2023
Dec 18, 2022
Feb 7, 2014
Jul 16, 2023
Jul 19, 2023
Apr 12, 2022
Mar 16, 2014
Jul 24, 2023
Mar 16, 2021
Jun 22, 2021
Jul 23, 2023
Jul 16, 2023
Feb 27, 2022
Feb 1, 2022
Feb 20, 2021
Nov 27, 2021
Aug 7, 2014
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

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 git://github.com/eressea/server.git source
cd source
git submodule update --init
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