OfficialServer.wiki
author Wuzzy
Wed, 28 Jun 2023 22:10:10 +0000
changeset 2258 a473c84c33ff
parent 1863 7e1766cf164d
permissions -rw-r--r--
StringIDs: Add newline after summary
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1861
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     1
#summary How to build the official server (WIP)
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     2
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     3
NOTE: This guide is a work in progress!
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     4
1862
5da940c0285a OfficialServer: Syntax fix
Wuzzy
parents: 1861
diff changeset
     5
== The official server ==
1861
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     6
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     7
The "official" server has some additional features over "normal" servers. Most notably, the "official" server saves replays and the `/watch` command in the lobby.
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     8
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     9
Internally, this is just a `#define` that can be triggered on. It is possible to build a clone of the official server, but it is tricky (and not really documented yet).
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    10
1862
5da940c0285a OfficialServer: Syntax fix
Wuzzy
parents: 1861
diff changeset
    11
== How to build the official server ==
1861
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    12
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    13
*NOTE*: This guide is INCOMPLETE and UNTESTED!
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    14
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    15
First, make sure to define the symbol `OFFICIAL_SERVER` before building the server. 
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    16
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    17
For the official server, you need the normal dependencies for the Hedgewars server plus a couple of additional Haskell dependencies. See `gameServer/hedgewars-server.cabal` in the source code repository for a list.
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    18
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    19
As soon you built the official server, you need to set it up.
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    20
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    21
In the same directory with `hedgewars-server`, create a file named `hedgewars-server.ini`. Add the following dummy contents:
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    22
1863
7e1766cf164d OfficialServer: Fix syntax again?
Wuzzy
parents: 1862
diff changeset
    23
{{{
1861
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    24
bans = []
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    25
dbHost = localhost
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    26
dbLogin = hedgewars
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    27
dbName = hedgewars
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    28
dbPassword = password
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    29
sv_latestProto = 51
7bbfe9e35cdf First poor attempt to document the official server
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    30
sv_message = Hi
1863
7e1766cf164d OfficialServer: Fix syntax again?
Wuzzy
parents: 1862
diff changeset
    31
}}}