Skip to content

Commit 6cf531b

Browse files
H0zenclaude
authored andcommitted
ACE removed. New network engine. OpenSSL 3.x mandatory. New mangosd UI.
Also include the float/limits headers (<cfloat>/<climits>) that ACE used to pull in transitively: PathFinder, PetAI, bot item use, the crash reporter, and the Movemap-Generator (via game/vmap/MapTree.h, so the extractor submodule is untouched). GCC/Ubuntu 24.04 and MSVC verified: full build, 0 errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ef7f5a4 commit 6cf531b

178 files changed

Lines changed: 8981 additions & 6833 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
name: Codestyle Checks
2+
23
permissions:
34
contents: read
5+
46
on:
57
push:
6-
branches: [ master ]
8+
branches: [master, devel]
79
pull_request:
8-
branches: [ master ]
10+
branches: [master]
11+
12+
concurrency:
13+
group: codestyle-${{ github.ref }}
14+
cancel-in-progress: true
915

1016
jobs:
1117
check-codestyle:
@@ -15,7 +21,8 @@ jobs:
1521
runs-on: ubuntu-latest
1622
name: Check Codestyling
1723
steps:
18-
- uses: actions/checkout@v2
24+
# v2 runs on a long-deprecated Node runtime.
25+
- uses: actions/checkout@v4
1926

2027
- name: Check Codestyling
2128
run: source ./apps/ci/ci-codestyle.sh

.github/workflows/core_linux_build.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ name: Linux Build (GCC + Clang)
22

33
on:
44
push:
5-
branches: [ master, devel ]
5+
branches: [master, devel]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
permissions:
1010
contents: read
1111

12+
# A second push to the same branch makes the first run's result worthless.
13+
concurrency:
14+
group: linux-build-${{ github.ref }}
15+
cancel-in-progress: true
16+
1217
jobs:
1318
build:
1419
runs-on: ubuntu-latest
@@ -34,21 +39,25 @@ jobs:
3439
submodules: recursive
3540
fetch-depth: 1
3641

37-
- name: Cache CMake build
42+
# ccache, not a cached build directory: actions/checkout rewrites every source file,
43+
# so restored objects are always older than their sources and make rebuilds everything.
44+
# ccache keys on translation-unit content instead. github.sha keeps the key unique so
45+
# the cache is always re-saved; restore-keys seeds it from the newest previous run.
46+
- name: Cache ccache
3847
uses: actions/cache@v4
3948
with:
40-
path: _build
41-
key: ${{ runner.os }}-${{ matrix.name }}-cmake-${{ hashFiles('**/CMakeLists.txt') }}
49+
path: ~/.cache/ccache
50+
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.sha }}
4251
restore-keys: |
43-
${{ runner.os }}-${{ matrix.name }}-cmake-
52+
${{ runner.os }}-${{ matrix.name }}-ccache-
4453
4554
- name: Install build dependencies
4655
run: |
4756
sudo apt-get update -qq
4857
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \
49-
git cmake make build-essential \
58+
git cmake make build-essential ccache \
5059
libssl-dev libbz2-dev default-libmysqlclient-dev \
51-
libace-dev libreadline-dev \
60+
libreadline-dev \
5261
${{ matrix.pkg }}
5362
5463
- name: Configure project
@@ -60,16 +69,19 @@ jobs:
6069
-DCMAKE_INSTALL_PREFIX=../_install \
6170
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
6271
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
72+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
73+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
6374
-DBUILD_TOOLS=1 \
6475
-DBUILD_MANGOSD=1 \
6576
-DBUILD_REALMD=1 \
6677
-DSOAP=1 \
6778
-DSCRIPT_LIB_ELUNA=1 \
68-
-DSCRIPT_LIB_SD3_GATE=1 \
79+
-DSCRIPT_LIB_SD3=1 \
6980
-DPLAYERBOTS=1 \
7081
-DUSE_STORMLIB=1 \
7182
-DBUILD_AH_SERVICE=1 \
72-
-DPCH=0
83+
-DPCH=0 \
84+
--warn-uninitialized
7385
7486
- name: Build and install
7587
run: |
@@ -86,3 +98,7 @@ jobs:
8698
echo "$out"
8799
echo "$out" | grep -q "intent codec selftest OK" || { echo "MISSING: intent codec selftest OK"; exit 1; }
88100
echo "$out" | grep -q "ipc selftest OK" || { echo "MISSING: ipc selftest OK"; exit 1; }
101+
102+
- name: ccache statistics
103+
if: always()
104+
run: ccache -s

.github/workflows/core_windows_build.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ permissions:
55

66
on:
77
push:
8-
branches: [ master , devel ]
8+
branches: [master, devel]
99
pull_request:
10-
branches: [ master ]
10+
branches: [master]
11+
12+
# Supersede an in-flight run when the branch moves on: its result is already stale.
13+
concurrency:
14+
group: windows-build-${{ github.ref }}
15+
cancel-in-progress: true
1116

1217
jobs:
1318
build:
@@ -24,14 +29,15 @@ jobs:
2429
fetch-depth: 1
2530

2631

32+
# Bump the -vN suffix to force a re-install of OpenSSL.
2733
- name: Cache OpenSSL
2834
id: cache-openssl
2935
uses: actions/cache@v4
3036
with:
3137
path: |
3238
C:\Program Files\OpenSSL
3339
C:\Program Files\OpenSSL-Win64
34-
key: ${{ runner.os }}-openssl-full
40+
key: ${{ runner.os }}-openssl-v1
3541

3642

3743
- name: Install full OpenSSL (developer)
@@ -63,18 +69,12 @@ jobs:
6369
echo "OPENSSL_INCLUDE_DIR=C:/Program Files/OpenSSL-Win64/include" >> $GITHUB_ENV
6470
echo "OPENSSL_CRYPTO_LIBRARY=C:/Program Files/OpenSSL-Win64/lib/VC/libcrypto64MT.lib" >> $GITHUB_ENV
6571
echo "OPENSSL_SSL_LIBRARY=C:/Program Files/OpenSSL-Win64/lib/VC/libssl64MT.lib" >> $GITHUB_ENV
72+
else
73+
echo "::error::OpenSSL not found in either expected location"
74+
exit 1
6675
fi
6776
6877
69-
- name: Cache CMake build
70-
uses: actions/cache@v4
71-
with:
72-
path: build
73-
key: ${{ runner.os }}-cmake-${{ hashFiles('**/CMakeLists.txt') }}
74-
restore-keys: |
75-
${{ runner.os }}-cmake-
76-
77-
7878
- name: Configure CMake project
7979
shell: bash
8080
run: |

.github/workflows/docker_build.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,51 @@
11
name: Docker Build
2+
3+
# Only builds images and pushes nothing, so read is all the token ever needs.
4+
permissions:
5+
contents: read
6+
27
on:
38
push:
4-
branches: [ master , devel ]
9+
branches: [master, devel]
510
pull_request:
6-
branches: [ master ]
11+
branches: [master]
12+
13+
concurrency:
14+
group: docker-build-${{ github.ref }}
15+
cancel-in-progress: true
716

817
jobs:
918
build:
1019
runs-on: ubuntu-latest
1120

1221
steps:
13-
- uses: actions/checkout@v2
22+
# v2 runs on a deprecated Node runtime.
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
1425
with:
15-
token: ${{ secrets.GITHUB_TOKEN }}
16-
17-
- name: Checkout Submodules
18-
shell: bash
19-
run: |
20-
git submodule init && git submodule update
26+
submodules: recursive
27+
fetch-depth: 1
2128

2229
- name: Set up Docker Buildx
23-
uses: docker/setup-buildx-action@v2
30+
uses: docker/setup-buildx-action@v3
2431

32+
# Layer caching across runs.
2533
- name: Build Mangosd Docker image
26-
run: |
27-
docker build -t mangosd:latest -f dockercontainer/DockerFile-mangosd .
34+
uses: docker/build-push-action@v6
35+
with:
36+
context: .
37+
file: dockercontainer/DockerFile-mangosd
38+
tags: mangosd:latest
39+
push: false
40+
cache-from: type=gha,scope=mangosd
41+
cache-to: type=gha,mode=max,scope=mangosd
2842

2943
- name: Build Realmd Docker image
30-
run: |
31-
docker build -t realmd:latest -f dockercontainer/DockerFile-realmd .
44+
uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
file: dockercontainer/DockerFile-realmd
48+
tags: realmd:latest
49+
push: false
50+
cache-from: type=gha,scope=realmd
51+
cache-to: type=gha,mode=max,scope=realmd

.gitignore

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ Thumbs.db
6464
_build
6565
build
6666
/dep/libmpq/autom4te.cache/
67-
/ACE_wrappers/*
68-
/ACE*.tar.bz2
6967

7068
# Generated files
7169
*.ncb
@@ -84,31 +82,7 @@ ipch
8482
cmake.cmd
8583
msbuild.cmd
8684

87-
# cmake generated files in sources
88-
/dep/ACE_wrappers/ace/ACE_vc8.vcxproj*
89-
/dep/ACE_wrappers/ace/Backup*
90-
/dep/ACE_wrappers/ace/Debug*
91-
/dep/ACE_wrappers/ace/ETCL/ACE_ETCL_Parser_vc8.vcxproj*
92-
/dep/ACE_wrappers/ace/ETCL/ACE_ETCL_vc8.vcxproj*
93-
/dep/ACE_wrappers/ace/ETCL/Debug*
94-
/dep/ACE_wrappers/ace/ETCL/Release*
95-
/dep/ACE_wrappers/ace/Monitor_Control/Debug*
96-
/dep/ACE_wrappers/ace/Monitor_Control/Monitor_Control_vc8.vcxproj*
97-
/dep/ACE_wrappers/ace/Monitor_Control/Release*
98-
/dep/ACE_wrappers/ace/QoS/Debug*
99-
/dep/ACE_wrappers/ace/QoS/QoS_vc8.vcxproj*
100-
/dep/ACE_wrappers/ace/QoS/Release*
101-
/dep/ACE_wrappers/ace/UpgradeLog*
102-
/dep/ACE_wrappers/ace/Release*
103-
/dep/ACE_wrappers/ace/_UpgradeReport_Files*
104-
/dep/ACE_wrappers/lib/*
105-
/dep/ACE_wrappers/ace/config.h
106-
10785
# ned files from excluded dirs
108-
!/dep/ACE_wrappers/ace/ace_message_table.bin
109-
!/dep/ACE_wrappers/bin/GNUmakefile.bin
110-
!/dep/ACE_wrappers/configure.ac~
111-
!/dep/ACE_wrappers/lib/.empty
11286
!/dep/tbb/src/Makefile
11387

11488
# recastnavigation directory needs exception

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ this repo. Humans: also read [`doc/CodingStandard.md`](doc/CodingStandard.md).
2323
```sh
2424
git clone --recursive https://github.com/mangoszero/server.git && cd server
2525
sudo apt-get install -y git cmake make build-essential \
26-
libssl-dev libbz2-dev default-libmysqlclient-dev libace-dev libreadline-dev # Debian/Ubuntu deps
26+
libssl-dev libbz2-dev default-libmysqlclient-dev libreadline-dev # Debian/Ubuntu deps
2727
mkdir -p _build _install && cd _build
2828
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../_install \
2929
-DBUILD_TOOLS=1 -DBUILD_MANGOSD=1 -DBUILD_REALMD=1 -DSOAP=1 \
30-
-DSCRIPT_LIB_ELUNA=1 -DSCRIPT_LIB_SD3_GATE=1 -DPLAYERBOTS=1 \
30+
-DSCRIPT_LIB_ELUNA=1 -DSCRIPT_LIB_SD3=1 -DPLAYERBOTS=1 \
3131
-DUSE_STORMLIB=1 -DBUILD_AH_SERVICE=1 -DPCH=0
3232
make -j"$(nproc)" && make install -j"$(nproc)"
3333
```

CMakeLists.txt

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,17 @@ else()
120120
set(CONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
121121
endif()
122122

123+
# =============================================================================
124+
# Runtime library search path (RPATH)
125+
# =============================================================================
126+
if(APPLE)
127+
set(CMAKE_INSTALL_RPATH "@loader_path/../lib")
128+
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
129+
elseif(UNIX)
130+
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
131+
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
132+
endif()
133+
123134
# =============================================================================
124135
# Dependencies
125136
# =============================================================================
@@ -134,12 +145,56 @@ if(NOT WITHOUT_GIT)
134145
endif()
135146

136147
find_package(Threads REQUIRED)
137-
find_package(OpenSSL REQUIRED)
148+
find_package(OpenSSL 3.0 REQUIRED)
138149
find_package(MySQL REQUIRED)
139150

151+
# =============================================================================
152+
# OpenSSL policy
153+
#
154+
# OpenSSL 3.x is the baseline: there are no version conditionals left in src/.
155+
# Every OpenSSL decision lives here, in two interface targets:
156+
#
157+
# mangos_openssl - what to link against and where the headers live.
158+
# Linked PUBLIC by anything exposing OpenSSL types in
159+
# its own headers (`shared`), so consumers inherit it.
160+
#
161+
# mangos_openssl_strict - the API level we hold ourselves to. Together these
162+
# two definitions delete the *declarations* of
163+
# everything OpenSSL deprecated up to 3.0 -- the
164+
# low-level MD5_*, SHA1_*, HMAC_CTX and SSLeay_*
165+
# families. Reaching for the old API is then a
166+
# compile error rather than a warning nobody reads.
167+
#
168+
# Link it PRIVATE, always: it must not leak into the
169+
# vendored code under dep/, which still uses the old API.
170+
# =============================================================================
171+
add_library(mangos_openssl INTERFACE)
172+
target_link_libraries(mangos_openssl
173+
INTERFACE
174+
OpenSSL::SSL
175+
OpenSSL::Crypto
176+
)
177+
178+
add_library(mangos_openssl_strict INTERFACE)
179+
target_compile_definitions(mangos_openssl_strict
180+
INTERFACE
181+
OPENSSL_API_COMPAT=0x30000000L
182+
OPENSSL_NO_DEPRECATED
183+
)
184+
140185
find_package(ZLIB QUIET)
141186
find_package(BZip2 QUIET)
142187

188+
# dep/lualib (the Lua build used by Eluna) links against readline by its bare
189+
# library name and is not itself touched here; find_package(Readline) below
190+
# declares a GLOBAL IMPORTED target literally named `readline` (see
191+
# cmake/FindReadline.cmake) before that subdirectory is added, so its
192+
# existing bare-name references resolve to a properly-detected library
193+
# instead of an unqualified linker search. Readline has no Windows build and
194+
# is only needed when Eluna is being built.
195+
if(NOT WIN32 AND SCRIPT_LIB_ELUNA)
196+
find_package(Readline REQUIRED)
197+
endif()
143198

144199
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/GenRevision.cmake)
145200
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/EnsureVersion.cmake)

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,14 @@ their systems package management instead of source packages.**
7373

7474
* **[Git][34] / [Github for Windows][35]**: This version control software allows you to get the source files in the first place.
7575
* **[MySQL][40]** / **[MariaDB][41]**: These databases are used to store content and user data.
76-
* **[ACE][43]**: aka Adaptive Communication Environment, provides us with a solid cross-platform framework for abstracting operating system specific details.
7776
* **[Recast][44]**: In order to create navigation data from the client's map files, Recast is used to do the dirty work. It provides functions for rendering, pathing, etc.
7877
* **[G3D][45]**: This engine provides the basic framework for handling 3D data and is used to handle basic map data.
7978
* **[Stormlib][46]**: Provides an abstraction layer for reading from the client's data files.
8079
* **[Zlib][53]/[Zlib for Windows][51]** provides compression algorithms used in both MPQ archive handling and the client/server protocol.
8180
* **[Bzip2][54]/[Bzip2 for Windows][52]** provides compression algorithms used in MPQ archives.
8281
* **[OpenSSL][48]/[OpenSSL for Windows][55]** provides encryption algorithms used when authenticating clients.
8382

84-
**ACE**, **Recast**, **G3D**, **Stormlib**, **Zlib** and **Bzip2** are included in the standard distribution as
83+
**Recast**, **G3D**, **Stormlib**, **Zlib** and **Bzip2** are included in the standard distribution as
8584
we rely on specific versions.
8685

8786
Optional dependencies
@@ -199,7 +198,6 @@ World of Warcraft, and all related art, images, and lore are copyright [Blizzard
199198
[35]: http://windows.github.com/ "github - windows client"
200199
[40]: https://dev.mysql.com/downloads/ "MySQL - The world's most popular open source database"
201200
[41]: https://mariadb.org/download/ "MariaDB - An enhanced, drop-in replacement for MySQL"
202-
[43]: http://www.dre.vanderbilt.edu/~schmidt/ACE.html "ACE - The ADAPTIVE Communication Environment"
203201
[44]: http://github.com/memononen/recastnavigation "Recast - Navigation-mesh Toolset for Games"
204202
[45]: http://sourceforge.net/projects/g3d/ "G3D - G3D Innovation Engine"
205203
[46]: http://zezula.net/en/mpq/stormlib.html "Stormlib - A library for reading data from MPQ archives"

0 commit comments

Comments
 (0)