Skip to content

Commit 12b1fd2

Browse files
committed
Merge remote-tracking branch 'cmangos/master'
2 parents 52e9efc + 45b8912 commit 12b1fd2

File tree

126 files changed

+2086
-5688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+2086
-5688
lines changed

.clang-format

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@
22
Language: Cpp
33
# BasedOnStyle: Microsoft
44
AccessModifierOffset: -4
5-
AlignAfterOpenBracket: Align
5+
AlignAfterOpenBracket: false
66
AlignArrayOfStructures: Left
77
AlignConsecutiveMacros: None
88
AlignConsecutiveAssignments: None
99
AlignConsecutiveBitFields: None
1010
AlignConsecutiveDeclarations: None
1111
AlignEscapedNewlines: Right
12-
AlignOperands: Align
12+
AlignOperands: false
1313
AlignTrailingComments: true
1414
AllowAllArgumentsOnNextLine: true
15-
AllowAllConstructorInitializersOnNextLine: true
1615
AllowAllParametersOfDeclarationOnNextLine: true
1716
AllowShortEnumsOnASingleLine: false
1817
AllowShortBlocksOnASingleLine: Always
1918
AllowShortCaseLabelsOnASingleLine: true
20-
AllowShortFunctionsOnASingleLine: Inline
19+
AllowShortFunctionsOnASingleLine: true
2120
AllowShortLambdasOnASingleLine: All
2221
AllowShortIfStatementsOnASingleLine: Never
2322
AllowShortLoopsOnASingleLine: false
@@ -27,8 +26,8 @@ AlwaysBreakBeforeMultilineStrings: true
2726
AlwaysBreakTemplateDeclarations: MultiLine
2827
AttributeMacros:
2928
- __capability
30-
BinPackArguments: true
31-
BinPackParameters: true
29+
BinPackArguments: false
30+
BinPackParameters: false
3231
BraceWrapping:
3332
AfterCaseLabel: false
3433
AfterClass: true
@@ -55,10 +54,9 @@ BreakBeforeInheritanceComma: false
5554
BreakInheritanceList: AfterComma
5655
BreakBeforeTernaryOperators: false
5756
BreakConstructorInitializersBeforeComma: false
58-
BreakConstructorInitializers: AfterColon
5957
BreakAfterJavaFieldAnnotations: false
6058
BreakStringLiterals: true
61-
ColumnLimit: 180
59+
ColumnLimit: 0
6260
CommentPragmas: '^ IWYU pragma:'
6361
CompactNamespaces: false
6462
ConstructorInitializerAllOnOneLineOrOnePerLine: false

.github/workflows/macos.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,35 @@ env:
77
BUILD_TYPE: Release
88
REPO_DIR : ${{github.workspace}}
99
BUILD_DIR: ${{github.workspace}}/bin/builddir
10-
BOOST_VERSION: "1.83.0"
11-
BOOST_PLATFORM_VERSION: "13"
1210

1311
permissions:
1412
contents: read
1513

1614
jobs:
1715
build:
18-
runs-on: macos-13
16+
runs-on: macos-14
1917
permissions:
2018
contents: read
2119

2220
steps:
2321
- name: Checkout
24-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2523
with:
2624
path: ${{env.REPO_DIR}}
2725

2826
- name: Install Dependencies
2927
run: |
30-
brew install mysql-client
28+
brew install mysql-client@8.4
3129
brew install openssl
30+
brew install boost@1.85
31+
brew link boost@1.85
3232
echo "OPENSSL_ROOT_DIR=$(brew --prefix --installed openssl)" >> $GITHUB_ENV
3333
34-
- name: Install Boost
35-
uses: MarkusJx/install-boost@v2.5.0
36-
id: install-boost
37-
with:
38-
# REQUIRED: Specify the required boost version
39-
# A list of supported versions can be found here:
40-
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
41-
boost_version: ${{env.BOOST_VERSION}}
42-
# OPTIONAL: Specify a platform version
43-
platform_version: ${{env.BOOST_PLATFORM_VERSION}}
44-
# OPTIONAL: Specify a toolset
45-
toolset: clang
46-
# NOTE: If a boost version matching all requirements cannot be found,
47-
# this build step will fail
48-
4934
- name: Configure
5035
env:
51-
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
52-
run: cmake -B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}} -DBoost_ARCHITECTURE=-x64
36+
BOOST_ROOT: /opt/homebrew/opt/boost
37+
CMAKE_PREFIX_PATH: /opt/homebrew
38+
run: cmake -B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}} -DBoost_ARCHITECTURE=-arm64 -DCMAKE_POLICY_VERSION_MINIMUM=3.5
5339

5440
- name: Build
5541
env:
@@ -60,7 +46,7 @@ jobs:
6046
permissions:
6147
contents: none
6248
name: Send Notification to Discord on Failure
63-
runs-on: ubuntu-20.04
49+
runs-on: ubuntu-latest
6450
needs: # make sure the notification is sent AFTER the jobs you want included have completed
6551
- build
6652
if: failure()

.github/workflows/ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
steps:
4141
- name: Checkout
42-
uses: actions/checkout@v4
42+
uses: actions/checkout@v6
4343
with:
4444
path: ${{env.REPO_DIR}}
4545

@@ -85,7 +85,7 @@ jobs:
8585
8686
notify:
8787
name: Send Notification to Discord on Failure
88-
runs-on: ubuntu-22.04
88+
runs-on: ubuntu-latest
8989
permissions:
9090
contents: none
9191
needs: # make sure the notification is sent AFTER the jobs you want included have completed

.github/workflows/windows-release.yml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Windows Release Build
22

3-
#
43
on:
54
schedule:
65
# every day at 6am
@@ -11,9 +10,6 @@ env:
1110
BUILD_TYPE: RelWithDebInfo
1211
REPO_DIR : ${{github.workspace}}
1312
BUILD_DIR: ${{github.workspace}}/bin/builddir
14-
BOOST_TOOLSET: "msvc"
15-
BOOST_VERSION: "1.83.0"
16-
BOOST_PLATFORM_VERSION: "2022"
1713

1814
jobs:
1915
build:
@@ -41,7 +37,7 @@ jobs:
4137

4238
steps:
4339
- name: Checkout
44-
uses: actions/checkout@v4
40+
uses: actions/checkout@v6
4541
with:
4642
path: ${{env.REPO_DIR}}
4743

@@ -50,26 +46,9 @@ jobs:
5046
run: |
5147
echo "ARCHIVE_FILENAME=$env:CI_REPOSITORY_NAME-${{matrix.TYPE}}-$env:CI_SHA_SHORT.zip" >> $env:GITHUB_ENV
5248
cmake -E make_directory ${{ env.BUILD_DIR }}
53-
54-
# install dependencies
55-
- name: Install Boost
56-
uses: MarkusJx/install-boost@v2.5.0
57-
id: install-boost
58-
with:
59-
# REQUIRED: Specify the required boost version
60-
# A list of supported versions can be found here:
61-
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
62-
boost_version: ${{env.BOOST_VERSION}}
63-
# OPTIONAL: Specify a platform version
64-
platform_version: ${{env.BOOST_PLATFORM_VERSION}}
65-
# OPTIONAL: Specify a toolset
66-
toolset: ${{env.BOOST_TOOLSET}}
67-
# NOTE: If a boost version matching all requirements cannot be found,
68-
# this build step will fail
49+
choco install boost-msvc-14.3
6950
7051
- name: Configure
71-
env:
72-
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
7352
run: cmake ${{matrix.OPTIONAL_DEFINES}} -B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}
7453

7554
- name: Build
@@ -136,7 +115,7 @@ jobs:
136115

137116
notify-success:
138117
name: Send Notification to Discord on Success
139-
runs-on: ubuntu-20.04
118+
runs-on: ubuntu-latest
140119
permissions:
141120
contents: none
142121
needs:
@@ -179,7 +158,7 @@ jobs:
179158

180159
notify:
181160
name: Send Notification to Discord on Failure
182-
runs-on: ubuntu-20.04
161+
runs-on: ubuntu-latest
183162
permissions:
184163
contents: none
185164
needs: # make sure the notification is sent AFTER the jobs you want included have completed
@@ -205,4 +184,4 @@ jobs:
205184
- **Commit:** [${{github.repository}}/${{env.GIT_SHORT_SHA}}](${{github.server_url}}/${{ github.repository }}/commit/${{github.sha}})
206185
- **Build Log:** [actions/runs/${{github.run_id}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})
207186
footer: CMaNGOS Developers Notified!
208-
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
187+
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

.github/workflows/windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424
with:
2525
path: ${{env.REPO_DIR}}
2626

@@ -32,7 +32,7 @@ jobs:
3232
3333
# install dependencies
3434
- name: Install Boost
35-
uses: MarkusJx/install-boost@v2.5.0
35+
uses: MarkusJx/install-boost@v2.5.1
3636
id: install-boost
3737
with:
3838
# REQUIRED: Specify the required boost version
@@ -69,7 +69,7 @@ jobs:
6969

7070
notify:
7171
name: Send Notification to Discord on Failure
72-
runs-on: ubuntu-20.04
72+
runs-on: ubuntu-latest
7373
permissions:
7474
contents: none
7575
needs: # make sure the notification is sent AFTER the jobs you want included have completed
@@ -95,4 +95,4 @@ jobs:
9595
- **Commit:** [${{github.repository}}/${{env.GIT_SHORT_SHA}}](${{github.server_url}}/${{ github.repository }}/commit/${{github.sha}})
9696
- **Build Log:** [actions/runs/${{github.run_id}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})
9797
footer: CMaNGOS Developers Notified!
98-
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
98+
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

CMakeLists.txt

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1717

1818
# Minimum required cmake version to run the build
19-
cmake_minimum_required(VERSION 3.12)
19+
cmake_minimum_required(VERSION 3.16)
2020
cmake_policy(SET CMP0069 NEW)
2121

2222
# Will cache object files if ccache is available
@@ -135,11 +135,6 @@ endif()
135135
# find Git: used to get the revision number
136136
find_package(Git)
137137

138-
if(NOT MSVC AND PCH)
139-
# Include cotire to manage PCH support
140-
include(cotire)
141-
endif()
142-
143138
set(BIN_FOLDER_NAME bin)
144139
set(CONF_FOLDER_NAME etc)
145140
set(LIBS_FOLDER_NAME lib)
@@ -196,22 +191,21 @@ set(Boost_USE_STATIC_LIBS ON)
196191
set(Boost_NO_BOOST_CMAKE ON) # should fix build for boost 1.71
197192
#set(Boost_DEBUG ON)
198193

199-
if(MSVC)
200-
# Use at least verion 3.8.1 of FindBoost to fix some issues. Especialy in MSVC with fixed Toolset issues.
201-
# This is a workaround while VisualStudio does not embed higher cmake version than 3.7.2
202-
if(${CMAKE_VERSION} VERSION_LESS "3.11.3")
203-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/macros/FindBoost")
204-
message(STATUS "FindBoost: included version 3.11.3 of FindBoost is used.")
205-
endif()
206-
endif()
207-
208194
# In our case use new way to treat BOOST_ROOT environement variable
209195
if (POLICY CMP0074)
210196
cmake_policy(SET CMP0074 NEW)
211197
endif()
212198

199+
if(POLICY CMP0144)
200+
cmake_policy(SET CMP0144 NEW) # find_package() uses upper-case <PACKAGENAME>_ROOT variables
201+
endif()
202+
203+
if(POLICY CMP0167)
204+
cmake_policy(SET CMP0167 NEW)
205+
endif()
206+
213207
# Find needed packages and if necessery abort if something important is missing
214-
find_package(Boost REQUIRED COMPONENTS system program_options thread regex serialization filesystem)
208+
find_package(Boost 1.70.0 REQUIRED COMPONENTS program_options thread regex serialization filesystem)
215209

216210
if(NOT Boost_FOUND AND (BUILD_GAME_SERVER OR BUILD_LOGIN_SERVER))
217211
message(STATUS "BOOST_ROOT = $ENV{BOOST_ROOT}")

cmake/macros/FindMySQL.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ if( UNIX )
2323
/usr/local/bin/
2424
/usr/bin/
2525
/usr/local/opt/mysql/bin/
26+
/opt/homebrew/opt/mysql-client/bin
27+
/opt/homebrew/opt/mysql-client@8.4/bin
2628
/opt/mysql/mysql/bin/
2729
)
2830

@@ -77,6 +79,10 @@ find_path(MYSQL_INCLUDE_DIR
7779
/usr/local/opt/mysql/include
7880
/usr/local/opt/mysql-client/include
7981
/usr/local/opt/mysql-client/include/mysql
82+
/opt/homebrew/opt/mysql-client
83+
/opt/homebrew/opt/mysql-client/include
84+
/opt/homebrew/opt/mysql-client@8.4
85+
/opt/homebrew/opt/mysql-client@8.4/include
8086
/opt/mysql/mysql/include
8187
/opt/mysql/mysql/include/mysql
8288
"C:/Program Files/MySQL/include"
@@ -107,6 +113,10 @@ foreach(LIB ${MYSQL_ADD_LIBRARIES})
107113
/usr/local/mysql/lib/mysql
108114
/usr/local/opt/mysql/lib
109115
/usr/local/opt/mysql-client/lib
116+
/opt/homebrew/opt/mysql-client
117+
/opt/homebrew/opt/mysql-client/lib
118+
/opt/homebrew/opt/mysql-client@8.4
119+
/opt/homebrew/opt/mysql-client@8.4/lib
110120
/opt/mysql/mysql/lib
111121
/opt/mysql/mysql/lib/mysql
112122
DOC "Specify the location of the mysql library here."

0 commit comments

Comments
 (0)