1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
# HG changeset patch
# User Vekhir
# Date 1707679995 -3600
# Node ID e42d1819b1504b562cb3f0a303ec6a0f093ad28d
# Parent bb847fe6d51c488352de7a0c7de5af22584cfdb1
Revive cabal build of the game server
diff -r bb847fe6d51c -r e42d1819b150 INSTALL.md
--- a/INSTALL.md Thu Jan 25 22:22:00 2024 +0300
+++ b/INSTALL.md Sun Feb 11 20:33:15 2024 +0100
@@ -81,6 +81,11 @@
- `regex-tdfa`
- `binary` >= 0.8.5.1
+If you use the `Cabal` based build process:
+ - `zlib` is not needed.
+ - `network` >= 3.0
+ - `network-bsd` >= 2.8.1
+
Building
--------
@@ -140,6 +145,16 @@
That's all! Enjoy!
+### Building the Hedgewars Server only
+
+The Hedgewars Server can also be built separately using `Cabal`. All necessary
+files, including the `hedgewars-server.cabal`, are in the `gameServer`
+subdirectory.
+For most users, the server isn't needed, and this possibility is targeted
+primarily at packagers. If you don't know how to build Haskell projects with
+`Cabal`, this option is likely not for you. Instead use the `cmake` based
+instructions above.
+
Troubleshooting
---------------
diff -r bb847fe6d51c -r e42d1819b150 gameServer/hedgewars-server.cabal
--- a/gameServer/hedgewars-server.cabal Thu Jan 25 22:22:00 2024 +0300
+++ b/gameServer/hedgewars-server.cabal Sun Feb 11 20:33:15 2024 +0100
@@ -1,5 +1,5 @@
Name: hedgewars-server
-Version: 0.1
+Version: 1.1.0
Synopsis: hedgewars server
Description: hedgewars server
Homepage: https://www.hedgewars.org/
@@ -11,37 +11,71 @@
Cabal-version: >=1.10
+flag officialServer
+ description: Build for official server
+ default: False
+ manual: True
+
Executable hedgewars-server
main-is: hedgewars-server.hs
+ other-modules:
+ Actions
+ ClientIO
+ CommandHelp
+ ConfigFile
+ Consts
+ CoreTypes
+ Data.TConfig
+ EngineInteraction
+ FloodDetection
+ HWProtoChecker
+ HWProtoCore
+ HWProtoInRoomState
+ HWProtoLobbyState
+ HWProtoNEState
+ HandlerUtils
+ JoinsMonitor
+ NetRoutines
+ OfficialServer.DBInteraction
+ Opts
+ RoomsAndClients
+ ServerCore
+ ServerState
+ Store
+ Utils
+ Votes
default-language: Haskell2010
-- Don't forget to update INSTALL.md and .travis.yml when you change these dependencies!
Build-depends:
base >= 4.8,
- containers,
- vector,
+ binary >= 0.8.5.1,
bytestring,
- network >= 2.3 && < 3.2,
+ containers,
+ deepseq,
+ entropy,
+ hslogger,
+ mtl >= 2,
+ network >= 3.0 && < 3.2,
network-bsd >= 2.8.1 && < 2.9,
+ process,
random,
- time,
- mtl >= 2,
+ regex-tdfa,
sandi,
- hslogger,
- process,
- deepseq,
+ SHA,
+ time,
utf8-string,
- SHA,
- entropy,
- zlib >= 0.5.3 && < 0.7,
- regex-tdfa,
- binary >= 0.8.5.1,
+ vector
-- These dependencies are for OFFICIAL_SERVER only and do not need to be mentioned in docs
- yaml >= 0.8.30,
- aeson,
- text >= 1.2
+ if flag(officialServer)
+ build-depends:
+ aeson,
+ text >= 1.2,
+ yaml >= 0.8.30,
+ zlib >= 0.5.3 && < 0.7
+ cpp-options: -DOFFICIAL_SERVER
if !os(windows)
build-depends: unix
|