Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update (passive_anticheat): build fix #109

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/gcc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
- uses: actions/checkout@v2
- name: Dependencies
run: |
sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-8
sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
- name: Setup
run: |
mkdir bin
Expand Down
20 changes: 10 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
version: 1.0.{build}
image: Visual Studio 2019
image: Visual Studio 2022
clone_depth: 1
init:
- ps: ''
environment:
BOOST_ROOT: C:\Libraries\boost_1_77_0
BOOST_ROOT: C:\Libraries\boost_1_73_0
OPENSSL_ROOT_DIR: C:\OpenSSL-v111-Win64
build_script:
- cmd: >-
git config user.email "[email protected]" && git config user.name "AppVeyor"

md build && cd build

cmake -G"Visual Studio 16 2019" -A x64 -DSCRIPTS=dynamic -DTOOLS=True -DCMAKE_CXX_FLAGS=" /DWIN32 /D_WINDOWS /W3 /GR /EHsc /WX" -DCMAKE_C_FLAGS="/DWIN32 /D_WINDOWS /W3 /WX" ..
cmake -G"Visual Studio 17 2022" -A x64 -DSCRIPTS=dynamic -DTOOLS=True -DCMAKE_CXX_FLAGS=" /DWIN32 /D_WINDOWS /W3 /GR /EHsc /WX" -DCMAKE_C_FLAGS="/DWIN32 /D_WINDOWS /W3 /WX" ..

"%programfiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\amd64\MsBuild.exe" /nologo /m:2 /p:Configuration=RelWithDebInfo /p:Platform="X64" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" "TrinityCore.sln"
"C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" /nologo /m:2 /p:Configuration=RelWithDebInfo /p:Platform="X64" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" "TrinityCore.sln"

cd bin\RelWithDebInfo\

Expand All @@ -26,16 +26,16 @@ build_script:

cd ..

7z a TrinityCoreWin64VS2019.zip .\RelWithDebInfo\*
7z a TrinityCoreWin64VS2022.zip .\RelWithDebInfo\*

del /F /Q /S "RelWithDebInfo\*.pdb" > NUL

7z a TrinityCoreWin64VS2019NoSymbols.zip .\RelWithDebInfo\*
7z a TrinityCoreWin64VS2022NoSymbols.zip .\RelWithDebInfo\*

test: off
artifacts:
- path: build\bin\TrinityCoreWin64VS2019.zip
name: TrinityCoreWin64VS2019
- path: build\bin\TrinityCoreWin64VS2022.zip
name: TrinityCoreWin64VS2022

- path: build\bin\TrinityCoreWin64VS2019NoSymbols.zip
name: TrinityCoreWin64VS2019NoSymbols
- path: build\bin\TrinityCoreWin64VS2022NoSymbols.zip
name: TrinityCoreWin64VS2022NoSymbols
2 changes: 1 addition & 1 deletion cmake/compiler/clang/settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ target_compile_definitions(trinity-compile-option-interface
INTERFACE
-D_BUILD_DIRECTIVE="$<CONFIG>")

set(CLANG_EXPECTED_VERSION 7.0.0)
set(CLANG_EXPECTED_VERSION 11.0.0)

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_EXPECTED_VERSION)
message(FATAL_ERROR "Clang: TrinityCore requires version ${CLANG_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/compiler/gcc/settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ target_compile_definitions(trinity-compile-option-interface
INTERFACE
-D_BUILD_DIRECTIVE="$<CONFIG>")

set(GCC_EXPECTED_VERSION 8.3.0)
set(GCC_EXPECTED_VERSION 10.0.0)

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
message(FATAL_ERROR "GCC: TrinityCore requires version ${GCC_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}")
Expand Down
13 changes: 5 additions & 8 deletions cmake/compiler/msvc/settings.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

set(MSVC_EXPECTED_VERSION 19.24)
set(MSVC_EXPECTED_VERSION_STRING "Microsoft Visual Studio 2019 16.4")
set(MSVC_EXPECTED_VERSION 19.30)
set(MSVC_EXPECTED_VERSION_STRING "Microsoft Visual Studio 2022 17")

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS MSVC_EXPECTED_VERSION)
message(FATAL_ERROR "MSVC: TrinityCore requires version ${MSVC_EXPECTED_VERSION} (${MSVC_EXPECTED_VERSION_STRING}) to build but found ${CMAKE_CXX_COMPILER_VERSION}")
Expand Down Expand Up @@ -88,12 +88,9 @@ endif()
# that the program will eventually be linked with a conforming operator new implementation,
# and can omit all of these extra null checks from your program.
# http://blogs.msdn.com/b/vcblog/archive/2015/08/06/new-in-vs-2015-zc-throwingnew.aspx
if(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.23026.0))
# makes this flag a requirement to build TC at all
target_compile_options(trinity-compile-option-interface
INTERFACE
/Zc:throwingNew)
endif()
target_compile_options(trinity-compile-option-interface
INTERFACE
/Zc:throwingNew)

# Define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES - eliminates the warning by changing the strcpy call to strcpy_s, which prevents buffer overruns
target_compile_definitions(trinity-compile-option-interface
Expand Down
4 changes: 2 additions & 2 deletions cmake/macros/ConfigureBaseTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
add_library(trinity-compile-option-interface INTERFACE)

# Use -std=c++11 instead of -std=gnu++11
set(CXX_EXTENSIONS OFF)
set(CMAKE_CXX_EXTENSIONS OFF)

# An interface library to make the target features available to other targets
add_library(trinity-feature-interface INTERFACE)

target_compile_features(trinity-feature-interface
INTERFACE
cxx_std_17)
cxx_std_20)

# An interface library to make the warnings level available to other targets
# This interface taget is set-up through the platform specific script
Expand Down
1 change: 0 additions & 1 deletion cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ else()
endif()
option(WITH_WARNINGS "Show all warnings during compile" 0)
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
option(WITH_STRICT_DATABASE_TYPE_CHECKS "Enable strict checking of database field value accessors" 0)
option(WITHOUT_METRICS "Disable metrics reporting (i.e. InfluxDB and Grafana)" 0)
option(WITH_DETAILED_METRICS "Enable detailed metrics reporting (i.e. time each session takes to update)" 0)
option(COPY_CONF "Copy authserver and worldserver .conf.dist files to the project dir" 1)
Expand Down
10 changes: 0 additions & 10 deletions cmake/showoptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ endif()

if(TOOLS)
message("* Build map/vmap tools : Yes (default)")
add_definitions(-DNO_CORE_FUNCS)
else()
message("* Build map/vmap tools : No")
endif()
Expand Down Expand Up @@ -162,15 +161,6 @@ elseif (WITH_DETAILED_METRICS)
add_definitions(-DWITH_DETAILED_METRICS)
endif()

if(WITH_STRICT_DATABASE_TYPE_CHECKS)
message("")
message(" *** WITH_STRICT_DATABASE_TYPE_CHECKS - WARNING!")
message(" *** Validates uses of database Get***() functions from Field class")
message(" *** invalid calls will result in returning value 0")
message(" *** NOT COMPATIBLE WITH MARIADB!")
add_definitions(-DTRINITY_STRICT_DATABASE_TYPE_CHECKS)
endif()

if(WITH_BOOST_STACKTRACE)
if (BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE)
add_definitions(-DBOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE="${BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE}")
Expand Down
1 change: 1 addition & 0 deletions dep/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ if(SERVERS)
add_subdirectory(readline)
add_subdirectory(gsoap)
add_subdirectory(efsw)
add_subdirectory(short_alloc)
endif()

if(TOOLS)
Expand Down
10 changes: 7 additions & 3 deletions dep/PackageList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ efws (Entropia File System Watcher - crossplatform file system watcher)

fmt (a small, safe and fast formatting library)
https://github.com/fmtlib/fmt
Version: 7.1.3 https://github.com/fmtlib/fmt/releases/tag/7.1.3
Version: 9.1.0 https://github.com/fmtlib/fmt/releases/tag/9.1.0

G3D (a commercial-grade C++ 3D engine available as Open Source (BSD License)
http://g3d.sourceforge.net/
Expand All @@ -49,8 +49,8 @@ SFMT (SIMD-oriented Fast Mersenne Twister)
Version: 73bcba2e483640b8d50c1275514326dd4c1b0ca4

utf8-cpp (UTF-8 with C++ in a Portable Way)
http://utfcpp.sourceforge.net/
Version: 2.3.4
https://github.com/nemtrif/utfcpp
Version: 3.2.3

zlib (A Massively Spiffy Yet Delicately Unobtrusive Compression Library)
http://www.zlib.net/
Expand All @@ -72,3 +72,7 @@ argon2
catch2
https://github.com/catchorg/Catch2
Version: v2.13.0

short_alloc (Stack based allocator) https://howardhinnant.github.io/stack_alloc.html
https://howardhinnant.github.io/short_alloc.h
Version: N/A
25 changes: 4 additions & 21 deletions dep/fmt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,27 @@

include(CheckSymbolExists)

set(strtod_l_headers stdlib.h)

if (APPLE)
set(strtod_l_headers ${strtod_l_headers} xlocale.h)
endif ()

if(WIN32)
check_symbol_exists(_strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
else()
check_symbol_exists(strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
endif()

set(FMT_HEADERS
include/fmt/args.h
include/fmt/chrono.h
include/fmt/color.h
include/fmt/compile.h
include/fmt/core.h
include/fmt/format.h
include/fmt/format-inl.h
include/fmt/locale.h
include/fmt/os.h
include/fmt/ostream.h
include/fmt/posix.h
include/fmt/printf.h
include/fmt/ranges.h)
include/fmt/ranges.h
include/fmt/std.h
include/fmt/xchar.h)

set(FMT_SOURCES
src/format.cc
src/os.cc)

add_library(fmt STATIC ${FMT_SOURCES} ${FMT_HEADERS})

if (HAVE_STRTOD_L)
target_compile_definitions(fmt
PUBLIC
FMT_LOCALE)
endif()

target_include_directories(fmt
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include)
Expand Down
Loading
Loading