Skip to content

Commit da2b513

Browse files
committed
Merge TrinityCore master to multivendor_master
2 parents 9aaaf91 + a41ed0e commit da2b513

2,842 files changed

Lines changed: 2546979 additions & 189353 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.

.circleci/config.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
codestyle_and_sql:
44
docker:
5-
- image: trinitycore/circle-ci:master-base-22.04
5+
- image: trinitycore/circle-ci:debian-13-builder
66
auth:
77
username: $DOCKERHUB_USERNAME
88
password: $DOCKERHUB_PASSWORD
@@ -44,7 +44,7 @@ jobs:
4444
cat sql/updates/hotfixes/master/*.sql | mysql -h 127.0.0.1 -uroot hotfixes
4545
pch:
4646
docker:
47-
- image: trinitycore/circle-ci:master-base-22.04
47+
- image: trinitycore/circle-ci:debian-13-builder
4848
auth:
4949
username: $DOCKERHUB_USERNAME
5050
password: $DOCKERHUB_PASSWORD
@@ -91,7 +91,7 @@ jobs:
9191
docker build --file Dockerfile --force-rm --tag $image_prefix:$CIRCLE_SHA1 --tag $image_prefix:$(echo $CIRCLE_BRANCH | tr '/' '-' | tr '[:upper:]' '[:lower:]') .
9292
docker save $image_prefix | gzip > ../../docker.tar.gz
9393
if [ "$DOCKERHUB_PUSH_IMAGES" == "TRUE" ]; then
94-
if [ "$CIRCLE_BRANCH" == "3.3.5" ] || [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "wotlk_classic" ]; then
94+
if [ "$CIRCLE_BRANCH" == "3.3.5" ] || [ "$CIRCLE_BRANCH" == "master" ]; then
9595
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
9696
echo "Pushing docker image to dockerhub"
9797
docker push --all-tags $image_prefix
@@ -101,7 +101,7 @@ jobs:
101101
path: docker.tar.gz
102102
nopch:
103103
docker:
104-
- image: trinitycore/circle-ci:master-base-22.04
104+
- image: trinitycore/circle-ci:debian-13-builder
105105
auth:
106106
username: $DOCKERHUB_USERNAME
107107
password: $DOCKERHUB_PASSWORD
@@ -135,7 +135,7 @@ jobs:
135135
ccache -s
136136
git config user.email "circleci@build.bot" && git config user.name "Circle CI"
137137
$CXX --version
138-
cmake -S . -B ./bin -DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=0 -DUSE_SCRIPTPCH=0 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=bin/check_install
138+
cmake -S . -B ./bin -DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=0 -DUSE_SCRIPTPCH=0 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG -g0" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG -g0" -DCMAKE_INSTALL_PREFIX=bin/check_install
139139
- run:
140140
name: Build
141141
command: |
@@ -155,4 +155,3 @@ workflows:
155155
jobs:
156156
- codestyle_and_sql
157157
- pch
158-
- nopch

.github/ISSUE_TEMPLATE/sql_fix.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ body:
3636
id: fix
3737
attributes:
3838
label: SQL fix
39-
description: This field will be formatted automatically as SQL code block, no need to include \`\`\`sql
39+
description: |
40+
This field will be formatted automatically as SQL code block, no need to include \`\`\`sql
41+
42+
For large sql fixes please use https://gist.github.com/ then just paste the provided link in the following field.
4043
placeholder: |
4144
--
4245
render: sql

.github/workflows/gcc-build.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/linux-build.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Ubuntu x64
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-24.04
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
include:
14+
- cc: gcc-13
15+
cxx: g++-13
16+
pch: 1
17+
launcher:
18+
- cc: clang-17
19+
cxx: clang++-17
20+
pch: 1
21+
launcher:
22+
- cc: clang-17
23+
cxx: clang++-17
24+
pch: 0
25+
launcher: ccache
26+
steps:
27+
- uses: actions/checkout@v5
28+
- name: Set reusable strings
29+
id: strings
30+
shell: bash
31+
run: |
32+
echo "build-start=$EPOCHSECONDS" >> "$GITHUB_OUTPUT"
33+
echo "build-output-dir=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT"
34+
echo "ccache-key-prefix=ubuntu-${{ matrix.cc }}-${{ github.base_ref || github.ref_name }}" >> "$GITHUB_OUTPUT"
35+
- name: Dependencies
36+
run: |
37+
sudo apt-get update && sudo apt-get install -yq ccache libboost-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-thread-dev libssl-dev libreadline-dev zlib1g-dev libbz2-dev
38+
- name: Restore nopch cache
39+
id: ccache-restore
40+
if: ${{ matrix.pch == '0' }}
41+
uses: actions/cache@v4
42+
with:
43+
path: ${{ github.workspace }}/.ccache
44+
key: ${{ steps.strings.outputs.ccache-key-prefix }}-${{ github.ref_name }}-${{ github.sha }}
45+
restore-keys: |
46+
${{ steps.strings.outputs.ccache-key-prefix }}-${{ github.ref_name }}-
47+
${{ steps.strings.outputs.ccache-key-prefix }}-
48+
- name: Setup
49+
env:
50+
CMAKE_BUILD_TYPE: Debug
51+
CMAKE_C_COMPILER_LAUNCHER: ${{ matrix.launcher }}
52+
CMAKE_CXX_COMPILER_LAUNCHER: ${{ matrix.launcher }}
53+
CC: /usr/bin/${{ matrix.cc }}
54+
CXX: /usr/bin/${{ matrix.cxx }}
55+
run: >
56+
cmake -GNinja -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }}
57+
-DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=${{ matrix.pch }} -DUSE_SCRIPTPCH=${{ matrix.pch }} -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0
58+
-DCMAKE_C_FLAGS_DEBUG="-DNDEBUG -g0" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG -g0"
59+
-DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
60+
- name: Build
61+
env:
62+
CCACHE_BASEDIR: ${{ github.workspace }}
63+
CCACHE_DIR: ${{ github.workspace }}/.ccache
64+
CCACHE_CPP2: 1
65+
run: |
66+
ccache -z
67+
cmake --build ${{ steps.strings.outputs.build-output-dir }}
68+
ccache -s
69+
ccache --evict-older-than $(($EPOCHSECONDS - ${{ steps.strings.outputs.build-start }}))s
70+
- name: Unit tests
71+
run: |
72+
cmake --build ${{ steps.strings.outputs.build-output-dir }} --target test
73+
- name: Check executables
74+
run: |
75+
cmake --install ${{ steps.strings.outputs.build-output-dir }}
76+
cd ${{ github.workspace }}/check_install/bin
77+
./bnetserver --version
78+
./worldserver --version

.github/workflows/macos-arm-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: macos-14
1010

1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313

1414
- name: Set reusable strings
1515
id: strings
@@ -23,7 +23,9 @@ jobs:
2323
run: |
2424
brew update
2525
brew uninstall openssl@1.1
26-
brew install mysql openssl readline cmake boost coreutils ninja
26+
for pkg in mysql openssl readline cmake boost coreutils ninja; do
27+
brew ls --versions $pkg || brew install $pkg
28+
done
2729
brew config
2830
2931
- name: Check some deps

.github/workflows/win-x64-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
MYSQL_ROOT_DIR: C:/Program Files/MySQL/MySQL Server 8.0
1313
OPENSSL_ROOT_DIR: C:/libs/openssl
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616

1717
- name: Set reusable strings
1818
id: strings
@@ -56,7 +56,7 @@ jobs:
5656
& ${{ env.OPENSSL_ROOT_DIR }}/bin/openssl.exe version
5757
5858
- name: Download and install Boost
59-
uses: MarkusJx/install-boost@v2.4.5
59+
uses: MarkusJx/install-boost@v2
6060
id: install-boost
6161
with:
6262
boost_version: 1.84.0
@@ -84,10 +84,10 @@ jobs:
8484
run: |
8585
cd ${{ steps.strings.outputs.build-output-dir }}/bin/${{ env.CMAKE_BUILD_TYPE }}
8686
copy "${{ env.MYSQL_ROOT_DIR }}/lib/libmysql.dll" libmysql.dll
87-
copy "${{ env.OPENSSL_ROOT_DIR }}/bin/libssl-3-x64.dll" libssl-3-x64.dll
88-
copy "${{ env.OPENSSL_ROOT_DIR }}/bin/libcrypto-3-x64.dll" libcrypto-3-x64.dll
89-
copy "${{ env.OPENSSL_ROOT_DIR }}/bin/legacy.dll" legacy.dll
90-
87+
# mysql may depend on a different version of openssl so copy its dlls first (override later with openssl's own if same version)
88+
Copy-Item -Path "${{ env.MYSQL_ROOT_DIR }}/bin/*" -Include libcrypto*,libssl* -Destination .
89+
Copy-Item -Path "${{ env.OPENSSL_ROOT_DIR }}/bin/*" -Include libcrypto*,libssl*,legacy* -Destination .
90+
9191
- name: Check binaries
9292
run: |
9393
cd ${{ steps.strings.outputs.build-output-dir }}/bin/${{ env.CMAKE_BUILD_TYPE }}

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ clone_depth: 1
44
init:
55
- ps: ''
66
environment:
7-
BOOST_ROOT: C:\Libraries\boost_1_83_0
7+
BOOST_ROOT: C:\Libraries\boost_1_85_0
88
MYSQL_ROOT_DIR: C:\Program Files\MySQL\MySQL Server 8.0
99
OPENSSL_ROOT_DIR: C:\OpenSSL-v32-Win64
1010
build_script:

cmake/compiler/clang/settings.cmake

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
55
# apple doesnt like to do the sane thing which would be to use the same version numbering as regular clang
66
# version number pulled from https://en.wikipedia.org/wiki/Xcode#Toolchain_versions for row matching LLVM 11
77
set(CLANG_EXPECTED_VERSION 12.0.5)
8+
# enable -fpch-instantiate-templates for AppleClang (by default it is active only for regular clang)
9+
set(CMAKE_C_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates)
10+
set(CMAKE_CXX_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates)
811
endif()
912

1013
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_EXPECTED_VERSION)
@@ -57,9 +60,9 @@ endif()
5760
if(WITH_COREDEBUG)
5861
target_compile_options(trinity-compile-option-interface
5962
INTERFACE
60-
-g3)
63+
-g3 -glldb)
6164

62-
message(STATUS "Clang: Debug-flags set (-g3)")
65+
message(STATUS "Clang: Debug-flags set (-g3 -glldb)")
6366
endif()
6467

6568
if(ASAN)
@@ -160,13 +163,3 @@ if(BUILD_SHARED_LIBS)
160163

161164
message(STATUS "Clang: Disallow undefined symbols")
162165
endif()
163-
164-
# speedup PCH builds by forcing template instantiations during PCH generation
165-
set(CMAKE_REQUIRED_FLAGS "-fpch-instantiate-templates")
166-
check_cxx_source_compiles("int main() { return 0; }" CLANG_HAS_PCH_INSTANTIATE_TEMPLATES)
167-
unset(CMAKE_REQUIRED_FLAGS)
168-
if(CLANG_HAS_PCH_INSTANTIATE_TEMPLATES)
169-
target_compile_options(trinity-compile-option-interface
170-
INTERFACE
171-
-fpch-instantiate-templates)
172-
endif()

cmake/compiler/gcc/settings.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ endif()
4444
if(WITH_COREDEBUG)
4545
target_compile_options(trinity-compile-option-interface
4646
INTERFACE
47-
-g3)
47+
-ggdb3)
4848

49-
message(STATUS "GCC: Debug-flags set (-g3)")
49+
message(STATUS "GCC: Debug-flags set (-ggdb3)")
5050
endif()
5151

5252
if(ASAN)

cmake/compiler/msvc/settings.cmake

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ target_compile_options(trinity-warning-interface
2626
# disable permissive mode to make msvc more eager to reject code that other compilers don't already accept
2727
target_compile_options(trinity-compile-option-interface
2828
INTERFACE
29-
/permissive-)
29+
/permissive-
30+
/utf-8)
3031

3132
if(PLATFORM EQUAL 32)
3233
# mark 32 bit executables large address aware so they can use > 2GB address space
@@ -47,7 +48,7 @@ if("${CMAKE_MAKE_PROGRAM}" MATCHES "MSBuild")
4748
target_compile_options(trinity-compile-option-interface
4849
INTERFACE
4950
/MP)
50-
else()
51+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
5152
# Forces writes to the PDB file to be serialized through mspdbsrv.exe (/FS)
5253
# Enable faster PDB generation in parallel builds by minimizing RPC calls to mspdbsrv.exe (/Zf)
5354
target_compile_options(trinity-compile-option-interface
@@ -65,14 +66,12 @@ if((PLATFORM EQUAL 64) OR (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.2302
6566
endif()
6667

6768
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
68-
# /Zc:throwingNew.
69-
# When you specify Zc:throwingNew on the command line, it instructs the compiler to assume
70-
# that the program will eventually be linked with a conforming operator new implementation,
71-
# and can omit all of these extra null checks from your program.
72-
# http://blogs.msdn.com/b/vcblog/archive/2015/08/06/new-in-vs-2015-zc-throwingnew.aspx
7369
target_compile_options(trinity-compile-option-interface
7470
INTERFACE
75-
/Zc:throwingNew)
71+
/Zc:__cplusplus # Enable updated __cplusplus macro value
72+
/Zc:preprocessor # Enable preprocessor conformance mode
73+
/Zc:templateScope # Check template parameter shadowing
74+
/Zc:throwingNew) # Assume operator new throws
7675
endif()
7776

7877
# Define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES - eliminates the warning by changing the strcpy call to strcpy_s, which prevents buffer overruns
@@ -127,14 +126,15 @@ if(BUILD_SHARED_LIBS)
127126
message(STATUS "MSVC: Enabled shared linking")
128127
endif()
129128

130-
# Move some warnings that are enabled for other compilers from level 4 to level 3
129+
# Move some warnings that are enabled for other compilers from level 4 to level 3 and enable some warnings which are off by default
131130
target_compile_options(trinity-compile-option-interface
132131
INTERFACE
133-
/w34100 # C4100 'identifier' : unreferenced formal parameter
132+
/w15038 # C5038: data member 'member1' will be initialized after data member 'member2'
133+
/w34100 # C4100: 'identifier' : unreferenced formal parameter
134134
/w34101 # C4101: 'identifier' : unreferenced local variable
135135
/w34189 # C4189: 'identifier' : local variable is initialized but not referenced
136136
/w34389 # C4389: 'equality-operator' : signed/unsigned mismatch
137-
/w35054) # C5054: 'operator 'operator-name': deprecated between enumerations of different types'
137+
/w35054) # C5054: 'operator 'operator-name': deprecated between enumerations of different types'
138138

139139
# Enable and treat as errors the following warnings to easily detect virtual function signature failures:
140140
# 'function' : member function does not override any base class virtual member function

0 commit comments

Comments
 (0)