# 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