Skip to content

Commit 2cb54cf

Browse files
committed
Merge branch '3.3.5' into heartbeat
2 parents 7c6b160 + cbabaa0 commit 2cb54cf

945 files changed

Lines changed: 39335 additions & 26404 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: 10 additions & 10 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:3.3.5-base-22.04
5+
- image: trinitycore/circle-ci:debian-12-builder
66
auth:
77
username: $DOCKERHUB_USERNAME
88
password: $DOCKERHUB_PASSWORD
@@ -38,7 +38,7 @@ jobs:
3838
cat sql/updates/world/3.3.5/*.sql | mysql -h 127.0.0.1 -uroot world
3939
pch:
4040
docker:
41-
- image: trinitycore/circle-ci:3.3.5-base-22.04
41+
- image: trinitycore/circle-ci:debian-12-builder
4242
auth:
4343
username: $DOCKERHUB_USERNAME
4444
password: $DOCKERHUB_PASSWORD
@@ -53,9 +53,9 @@ jobs:
5353
mkdir bin
5454
cd bin
5555
if [ "$DOCKERHUB_PUSH_IMAGES" == "TRUE" ]; then
56-
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
56+
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_INSTALL_PREFIX=check_install -DCMAKE_INSTALL_RPATH=\$ORIGIN/../lib -DBUILD_TESTING=1
5757
else
58-
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
58+
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DCMAKE_INSTALL_RPATH=\$ORIGIN/../lib -DBUILD_TESTING=1
5959
fi
6060
cd ..
6161
- run:
@@ -75,17 +75,17 @@ jobs:
7575
./authserver --version
7676
./worldserver --version
7777
- setup_remote_docker:
78-
version: 19.03.13
78+
version: default
7979
- run:
8080
name: Create docker images
8181
command: |
82-
cd bin/check_install/bin
83-
cp -r ../../../contrib/Docker/* .
84-
cp -r ../../../sql ./sql
82+
cd bin/check_install
83+
cp -r ../../contrib/Docker/* .
84+
cp -r ../../sql ./sql
8585
image_prefix=$(echo $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME | tr '[:upper:]' '[:lower:]')
8686
echo $image_prefix
8787
docker build --file Dockerfile --force-rm --tag $image_prefix:$CIRCLE_SHA1 --tag $image_prefix:$(echo $CIRCLE_BRANCH | tr '/' '-' | tr '[:upper:]' '[:lower:]') .
88-
docker save $image_prefix | gzip > ../../../docker.tar.gz
88+
docker save $image_prefix | gzip > ../../docker.tar.gz
8989
if [ "$DOCKERHUB_PUSH_IMAGES" == "TRUE" ]; then
9090
if [ "$CIRCLE_BRANCH" == "3.3.5" ] || [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "wotlk_classic" ]; then
9191
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
@@ -97,7 +97,7 @@ jobs:
9797
path: docker.tar.gz
9898
nopch:
9999
docker:
100-
- image: trinitycore/circle-ci:3.3.5-base-22.04
100+
- image: trinitycore/circle-ci:debian-12-builder
101101
auth:
102102
username: $DOCKERHUB_USERNAME
103103
password: $DOCKERHUB_PASSWORD

.github/workflows/gcc-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66

77
jobs:
88
build:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-22.04
1010
steps:
1111
- uses: actions/checkout@v2
1212
- name: Dependencies
1313
run: |
14-
sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-10
15-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
14+
sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-11
15+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11
1616
- name: Setup
1717
run: |
1818
mkdir bin

CMakeLists.txt

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
99
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010

11-
cmake_minimum_required(VERSION 3.11)
11+
cmake_minimum_required(VERSION 3.18)
1212

1313
# add this options before PROJECT keyword
1414
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
@@ -19,32 +19,29 @@ project(TrinityCore)
1919

2020
# CMake policies (can not be handled elsewhere)
2121
cmake_policy(SET CMP0005 NEW)
22-
if(CMAKE_VERSION VERSION_LESS "3.16.0")
23-
cmake_policy(SET CMP0043 OLD) # Disable 'Ignore COMPILE_DEFINITIONS_<Config> properties'
24-
else()
25-
cmake_policy(SET CMP0043 NEW) # Cotire isn't used so set to NEW
26-
endif()
22+
cmake_policy(SET CMP0043 NEW) # Ignore COMPILE_DEFINITIONS_<Config> properties
2723
cmake_policy(SET CMP0054 NEW) # Only interpret if() arguments as variables or keywords when unquoted - prevents intepreting if(SOME_STRING_VARIABLE MATCHES "MSVC") as if(SOME_STRING_VARIABLE MATCHES "1")
24+
cmake_policy(SET CMP0067 NEW) # Honor language standard in try_compile() source-file signature
25+
cmake_policy(SET CMP0074 NEW) # find_package() uses <PackageName>_ROOT variables
26+
27+
if(POLICY CMP0144)
28+
cmake_policy(SET CMP0144 NEW) # find_package() uses upper-case <PACKAGENAME>_ROOT variables
29+
endif()
2830

29-
if(POLICY CMP0074)
30-
cmake_policy(SET CMP0074 NEW) # find_package() uses <PackageName>_ROOT variables
31+
if(POLICY CMP0153)
32+
cmake_policy(SET CMP0153 NEW) # The exec_program() command should not be called
3133
endif()
3234

3335
# Set RPATH-handing (CMake parameters)
3436
set(CMAKE_SKIP_BUILD_RPATH 0)
3537
set(CMAKE_BUILD_WITH_INSTALL_RPATH 0)
36-
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
38+
list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
3739
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH 1)
3840

3941
# set macro-directory
4042
list(APPEND CMAKE_MODULE_PATH
4143
"${CMAKE_SOURCE_DIR}/cmake/macros")
4244

43-
if(CMAKE_VERSION VERSION_LESS "3.16.0")
44-
list(APPEND CMAKE_MODULE_PATH
45-
"${CMAKE_SOURCE_DIR}/dep/cotire/CMake")
46-
endif()
47-
4845
# build in Release-mode by default if not explicitly set
4946
if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
5047
set(CMAKE_DEFAULT_BUILD_TYPE "RelWithDebInfo" CACHE INTERNAL "")
@@ -73,12 +70,14 @@ include(GroupSources)
7370
include(AutoCollect)
7471

7572
find_package(PCHSupport)
76-
find_package(MySQL)
7773

7874
if(NOT WITHOUT_GIT)
7975
find_package(Git 1.7)
8076
endif()
8177

78+
# find mysql client binary (needed by genrev)
79+
find_package(MySQL OPTIONAL_COMPONENTS binary)
80+
8281
# Find revision ID and hash of the sourcetree
8382
include(cmake/genrev.cmake)
8483

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919

2020
## Build Status
2121

22-
master | 3.3.5 | wotlk_classic
22+
master | 3.3.5 | cata_classic
2323
:------------: | :------------: | :------------:
24-
[![master Build Status](https://circleci.com/gh/TrinityCore/TrinityCore/tree/master.svg?style=shield)](https://circleci.com/gh/TrinityCore/TrinityCore/tree/master) | [![3.3.5 Build Status](https://circleci.com/gh/TrinityCore/TrinityCore/tree/3.3.5.svg?style=shield)](https://circleci.com/gh/TrinityCore/TrinityCore/tree/3.3.5) | [![wotlk_classic Build Status](https://circleci.com/gh/TrinityCore/TrinityCore/tree/wotlk_classic.svg?style=shield)](https://circleci.com/gh/TrinityCore/TrinityCore/tree/wotlk_classic)
25-
[![master Build status](https://ci.appveyor.com/api/projects/status/54d0u1fxe50ad80o/branch/master?svg=true)](https://ci.appveyor.com/project/DDuarte/trinitycore/branch/master) | [![Build status](https://ci.appveyor.com/api/projects/status/54d0u1fxe50ad80o/branch/3.3.5?svg=true)](https://ci.appveyor.com/project/DDuarte/trinitycore/branch/3.3.5) | [![Build status](https://ci.appveyor.com/api/projects/status/54d0u1fxe50ad80o/branch/wotlk_classic?svg=true)](https://ci.appveyor.com/project/DDuarte/trinitycore/branch/wotlk_classic)
26-
[![master GCC Build status](https://github.com/TrinityCore/TrinityCore/actions/workflows/gcc-build.yml/badge.svg?branch=master&event=push)](https://github.com/TrinityCore/TrinityCore/actions?query=workflow%3AGCC+branch%3Amaster+event%3Apush) | [![3.3.5 GCC Build status](https://github.com/TrinityCore/TrinityCore/actions/workflows/gcc-build.yml/badge.svg?branch=3.3.5&event=push)](https://github.com/TrinityCore/TrinityCore/actions?query=workflow%3AGCC+branch%3A3.3.5+event%3Apush) | [![wotlk_classic GCC Build status](https://github.com/TrinityCore/TrinityCore/actions/workflows/gcc-build.yml/badge.svg?branch=wotlk_classic&event=push)](https://github.com/TrinityCore/TrinityCore/actions?query=workflow%3AGCC+branch%3Awotlk_classic+event%3Apush)
24+
[![master Build Status](https://circleci.com/gh/TrinityCore/TrinityCore/tree/master.svg?style=shield)](https://circleci.com/gh/TrinityCore/TrinityCore/tree/master) | [![3.3.5 Build Status](https://circleci.com/gh/TrinityCore/TrinityCore/tree/3.3.5.svg?style=shield)](https://circleci.com/gh/TrinityCore/TrinityCore/tree/3.3.5) | [![cata_classic Build Status](https://circleci.com/gh/TrinityCore/TrinityCore/tree/cata_classic.svg?style=shield)](https://circleci.com/gh/TrinityCore/TrinityCore/tree/cata_classic)
25+
[![master Build status](https://ci.appveyor.com/api/projects/status/54d0u1fxe50ad80o/branch/master?svg=true)](https://ci.appveyor.com/project/DDuarte/trinitycore/branch/master) | [![Build status](https://ci.appveyor.com/api/projects/status/54d0u1fxe50ad80o/branch/3.3.5?svg=true)](https://ci.appveyor.com/project/DDuarte/trinitycore/branch/3.3.5) | [![Build status](https://ci.appveyor.com/api/projects/status/54d0u1fxe50ad80o/branch/cata_classic?svg=true)](https://ci.appveyor.com/project/DDuarte/trinitycore/branch/cata_classic)
26+
[![master GCC Build status](https://github.com/TrinityCore/TrinityCore/actions/workflows/gcc-build.yml/badge.svg?branch=master&event=push)](https://github.com/TrinityCore/TrinityCore/actions?query=workflow%3AGCC+branch%3Amaster+event%3Apush) | [![3.3.5 GCC Build status](https://github.com/TrinityCore/TrinityCore/actions/workflows/gcc-build.yml/badge.svg?branch=3.3.5&event=push)](https://github.com/TrinityCore/TrinityCore/actions?query=workflow%3AGCC+branch%3A3.3.5+event%3Apush) | [![cata_classic GCC Build status](https://github.com/TrinityCore/TrinityCore/actions/workflows/gcc-build.yml/badge.svg?branch=cata_classic&event=push)](https://github.com/TrinityCore/TrinityCore/actions?query=workflow%3AGCC+branch%3Acata_classic+event%3Apush)
27+
[![master macOS arm64 Build status](https://github.com/TrinityCore/TrinityCore/actions/workflows/macos-arm-build.yml/badge.svg?branch=master&event=push)](https://github.com/TrinityCore/TrinityCore/actions?query=workflow%3AGCC+branch%3Amaster+event%3Apush) | | [![cata_classic macOS arm64 Build status](https://github.com/TrinityCore/TrinityCore/actions/workflows/macos-arm-build.yml/badge.svg?branch=cata_classic&event=push)](https://github.com/TrinityCore/TrinityCore/actions?query=workflow%3AGCC+branch%3Acata_classic+event%3Apush)
2728
[![Coverity Scan Build Status](https://scan.coverity.com/projects/435/badge.svg)](https://scan.coverity.com/projects/435) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/4656/badge.svg)](https://scan.coverity.com/projects/4656) |
2829

2930
## Introduction

appveyor.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,8 @@ init:
55
- ps: ''
66
environment:
77
BOOST_ROOT: C:\Libraries\boost_1_83_0
8-
MYSQL_ROOT_DIR: C:\mysql-8.1.0-winx64
9-
OPENSSL_ROOT_DIR: C:\OpenSSL-v30-Win64
10-
install:
11-
- ps: >-
12-
Write-Host "Installing MySQL Server 8.1" -ForegroundColor Cyan
13-
14-
Write-Host "Downloading MySQL..."
15-
16-
$zipPath = "$($env:temp)\mysql-8.1.0-winx64.zip"
17-
18-
(New-Object Net.WebClient).DownloadFile('https://cdn.mysql.com//Downloads/MySQL-8.1/mysql-8.1.0-winx64.zip', $zipPath)
19-
20-
Write-Host "Unpacking..."
21-
22-
7z x $zipPath -o"C:\" | Out-Null
23-
24-
Write-Host "MySQL Server 8.1 installed" -ForegroundColor Cyan
25-
8+
MYSQL_ROOT_DIR: C:\Program Files\MySQL\MySQL Server 8.0
9+
OPENSSL_ROOT_DIR: C:\OpenSSL-v32-Win64
2610
build_script:
2711
- cmd: >-
2812
git config user.email "appveyor@build.bot" && git config user.name "AppVeyor"

cmake/compiler/clang/settings.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Set build-directive (used in core to tell which buildtype we used)
2-
target_compile_definitions(trinity-compile-option-interface
3-
INTERFACE
4-
-D_BUILD_DIRECTIVE="$<CONFIG>")
5-
61
set(CLANG_EXPECTED_VERSION 11.0.0)
2+
if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
3+
# apple doesnt like to do the sane thing which would be to use the same version numbering as regular clang
4+
# version number pulled from https://en.wikipedia.org/wiki/Xcode#Toolchain_versions for row matching LLVM 11
5+
set(CLANG_EXPECTED_VERSION 12.0.5)
6+
endif()
77

88
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_EXPECTED_VERSION)
99
message(FATAL_ERROR "Clang: TrinityCore requires version ${CLANG_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}")
@@ -33,7 +33,7 @@ if (NOT CLANG_HAVE_PROPER_CHARCONV)
3333
message(STATUS "Clang: Detected from_chars bug for 64-bit integers, workaround enabled")
3434
target_compile_definitions(trinity-compile-option-interface
3535
INTERFACE
36-
-DTRINITY_NEED_CHARCONV_WORKAROUND)
36+
TRINITY_NEED_CHARCONV_WORKAROUND)
3737
endif()
3838

3939
if(WITH_WARNINGS)

cmake/compiler/gcc/settings.cmake

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
# Set build-directive (used in core to tell which buildtype we used)
2-
target_compile_definitions(trinity-compile-option-interface
3-
INTERFACE
4-
-D_BUILD_DIRECTIVE="$<CONFIG>")
5-
6-
set(GCC_EXPECTED_VERSION 10.0.0)
1+
set(GCC_EXPECTED_VERSION 11.1.0)
72

83
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
94
message(FATAL_ERROR "GCC: TrinityCore requires version ${GCC_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}")
105
else()
116
message(STATUS "GCC: Minimum version required is ${GCC_EXPECTED_VERSION}, found ${CMAKE_CXX_COMPILER_VERSION} - ok!")
127
endif()
138

9+
target_compile_options(trinity-compile-option-interface
10+
INTERFACE
11+
-fno-delete-null-pointer-checks)
12+
1413
if(PLATFORM EQUAL 32)
1514
# Required on 32-bit systems to enable SSE2 (standard on x64)
1615
target_compile_options(trinity-compile-option-interface
1716
INTERFACE
1817
-msse2
1918
-mfpmath=sse)
2019
endif()
21-
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
20+
if(TRINITY_SYSTEM_PROCESSOR MATCHES "x86|amd64")
2221
target_compile_definitions(trinity-compile-option-interface
2322
INTERFACE
24-
-DHAVE_SSE2
25-
-D__SSE2__)
23+
HAVE_SSE2
24+
__SSE2__)
2625
message(STATUS "GCC: SFMT enabled, SSE2 flags forced")
2726
endif()
2827

@@ -35,7 +34,9 @@ if(WITH_WARNINGS)
3534
-Winit-self
3635
-Winvalid-pch
3736
-Wfatal-errors
38-
-Woverloaded-virtual)
37+
-Woverloaded-virtual
38+
-Wno-missing-field-initializers # this warning is useless when combined with structure members that have default initializers
39+
-Wno-maybe-uninitialized) # this warning causes many false positives with std::optional
3940

4041
message(STATUS "GCC: All warnings enabled")
4142
endif()

cmake/compiler/icc/settings.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
target_compile_definitions(trinity-compile-option-interface
2-
INTERFACE
3-
-D_BUILD_DIRECTIVE="$<CONFIG>")
4-
51
if(PLATFORM EQUAL 32)
62
target_compile_options(trinity-compile-option-interface
73
INTERFACE

cmake/compiler/mingw/settings.cmake

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

0 commit comments

Comments
 (0)