mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-20 11:59:40 -06:00
Compare commits
32 Commits
v3.1.1
...
windows-cl
| Author | SHA1 | Date | |
|---|---|---|---|
| 80d0cd68f9 | |||
| 8e8d0153c8 | |||
| badde23d1c | |||
| bb9b2597e5 | |||
| 92d086c10b | |||
| a0f2aebb4d | |||
| 9ea616bd9b | |||
| ba2c692565 | |||
| 4133008d9c | |||
| 1f5982ed0e | |||
| 5e73fa5e4c | |||
| fff7bf879f | |||
| c20e1fbcf0 | |||
| 1f8ec6e295 | |||
| 51070d475d | |||
| 5a05622eca | |||
| 3760ffa349 | |||
|
|
9be88b3083 | ||
|
|
0772e563c1 | ||
|
|
4b99b984af | ||
|
|
628f6b4101 | ||
| 0d45403e8c | |||
| fa017b6db9 | |||
| 10e64a5d20 | |||
| 83e08f63bc | |||
| ece0e29577 | |||
| 6eea3f3662 | |||
| 6c8bb743af | |||
|
|
f4082cc538 | ||
|
|
edc7109e19 | ||
|
|
da45152b43 | ||
|
|
8b9a0768a2 |
2
.github/workflows/build-and-push-docker.yml
vendored
2
.github/workflows/build-and-push-docker.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: CI
|
name: Build and Update Docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|||||||
26
.github/workflows/build-and-test.yml
vendored
26
.github/workflows/build-and-test.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: CI
|
name: Build And Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -14,6 +14,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ windows-2022, ubuntu-22.04, macos-13 ]
|
os: [ windows-2022, ubuntu-22.04, macos-13 ]
|
||||||
|
include:
|
||||||
|
- os: windows-2022
|
||||||
|
configureType: windows-msvc
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
configureType: linux-gnu
|
||||||
|
- os: macos-13
|
||||||
|
configureType: macos
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -33,20 +40,13 @@ jobs:
|
|||||||
- name: cmake
|
- name: cmake
|
||||||
uses: lukka/run-cmake@v10
|
uses: lukka/run-cmake@v10
|
||||||
with:
|
with:
|
||||||
workflowPreset: "ci-${{matrix.os}}"
|
configurePreset: "${{matrix.configureType}}"
|
||||||
|
buildPreset: "ci-${{matrix.os}}"
|
||||||
|
testPreset: "ci-${{matrix.os}}"
|
||||||
|
|
||||||
- name: artifacts
|
- name: artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-${{matrix.os}}
|
name: build-${{matrix.os}}
|
||||||
path: |
|
path: |
|
||||||
build/*/*Server*
|
build/*
|
||||||
build/*/*.ini
|
|
||||||
build/*/*.so
|
|
||||||
build/*/*.dll
|
|
||||||
build/*/*.dylib
|
|
||||||
build/*/vanity/
|
|
||||||
build/*/navmeshes/
|
|
||||||
build/*/migrations/
|
|
||||||
build/*/*.dcf
|
|
||||||
!build/*/*.pdb
|
|
||||||
!build/*/d*/
|
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -113,6 +113,8 @@ CMakeFiles/TargetDirectories.txt
|
|||||||
*.sln
|
*.sln
|
||||||
*.recipe
|
*.recipe
|
||||||
|
|
||||||
|
CMakeUserPresets.json
|
||||||
|
|
||||||
# clangd
|
# clangd
|
||||||
.cache
|
.cache
|
||||||
thirdparty/zlib-1.2.11/
|
thirdparty/zlib-1.2.11/
|
||||||
|
|||||||
@@ -19,6 +19,14 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Export the compile commands for debuggi
|
|||||||
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW) # Set CMAKE visibility policy to NEW on project and subprojects
|
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW) # Set CMAKE visibility policy to NEW on project and subprojects
|
||||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) # Set C and C++ symbol visibility to hide inlined functions
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) # Set C and C++ symbol visibility to hide inlined functions
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug, Release, RelWithDebInfo, MinSizeRel")
|
||||||
|
|
||||||
|
if (${CMAKE_BUILD_TYPE} MATCHES "") # CI likes to set CMAKE_BUILD_TYPE to an empty string
|
||||||
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(DLU_CONFIG_DIR ${CMAKE_SOURCE_DIR}/build CACHE PATH "The directory where the server configuration files are stored")
|
||||||
|
|
||||||
# Read variables from file
|
# Read variables from file
|
||||||
FILE(READ "${CMAKE_SOURCE_DIR}/CMakeVariables.txt" variables)
|
FILE(READ "${CMAKE_SOURCE_DIR}/CMakeVariables.txt" variables)
|
||||||
@@ -72,7 +80,7 @@ if(UNIX)
|
|||||||
|
|
||||||
# For all except Clang and Apple Clang
|
# For all except Clang and Apple Clang
|
||||||
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
add_compile_options("-static-libgcc" "-lstdc++fs")
|
add_compile_options("-static-libgcc" "-lstdc++fs" "-Wno-error=implicit-function-declaration" "-Wno-error=int-conversion")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${DYNAMIC} AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if(${DYNAMIC} AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
@@ -90,10 +98,11 @@ elseif(WIN32)
|
|||||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Our output dir
|
# Set the output directories
|
||||||
#set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) # unfortunately, forces all libraries to be built in series, which will slow down the build process
|
# ./build/<platform + architecture (x64, x86, aarch64)>/<compiler>/<build_mode>/
|
||||||
|
|
||||||
|
set(CMAKE_BINARY_DIR ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}/${CMAKE_CXX_COMPILER_ID}/${CMAKE_BUILD_TYPE})
|
||||||
|
|
||||||
# TODO make this not have to override the build type directories
|
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
|
||||||
@@ -108,6 +117,15 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
|||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
|
|
||||||
|
# Get DLU config directory
|
||||||
|
if(DEFINED ENV{DLU_CONFIG_DIR})
|
||||||
|
set(DLU_CONFIG_DIR $ENV{DLU_CONFIG_DIR})
|
||||||
|
else()
|
||||||
|
set(DLU_CONFIG_DIR ${CMAKE_BINARY_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Configuration Directory is ${DLU_CONFIG_DIR}, and the build directory is ${CMAKE_BINARY_DIR}")
|
||||||
|
|
||||||
find_package(MariaDB)
|
find_package(MariaDB)
|
||||||
|
|
||||||
# Create a /resServer directory
|
# Create a /resServer directory
|
||||||
@@ -116,18 +134,11 @@ make_directory(${CMAKE_BINARY_DIR}/resServer)
|
|||||||
# Create a /logs directory
|
# Create a /logs directory
|
||||||
make_directory(${CMAKE_BINARY_DIR}/logs)
|
make_directory(${CMAKE_BINARY_DIR}/logs)
|
||||||
|
|
||||||
# Get DLU config directory
|
|
||||||
if(DEFINED ENV{DLU_CONFIG_DIR})
|
|
||||||
set(DLU_CONFIG_DIR $ENV{DLU_CONFIG_DIR})
|
|
||||||
else()
|
|
||||||
set(DLU_CONFIG_DIR ${PROJECT_BINARY_DIR})
|
|
||||||
endif()
|
|
||||||
message(STATUS "Variable: DLU_CONFIG_DIR = ${DLU_CONFIG_DIR}")
|
|
||||||
|
|
||||||
# Copy resource files on first build
|
# Copy resource files on first build
|
||||||
set(RESOURCE_FILES "sharedconfig.ini" "authconfig.ini" "chatconfig.ini" "worldconfig.ini" "masterconfig.ini" "blocklist.dcf")
|
set(RESOURCE_FILES "sharedconfig.ini" "authconfig.ini" "chatconfig.ini" "worldconfig.ini" "masterconfig.ini" "blocklist.dcf")
|
||||||
message(STATUS "Checking resource file integrity")
|
message(STATUS "Checking resource file integrity")
|
||||||
|
|
||||||
|
|
||||||
include(Utils)
|
include(Utils)
|
||||||
UpdateConfigOption(${DLU_CONFIG_DIR}/authconfig.ini "port" "auth_server_port")
|
UpdateConfigOption(${DLU_CONFIG_DIR}/authconfig.ini "port" "auth_server_port")
|
||||||
UpdateConfigOption(${DLU_CONFIG_DIR}/chatconfig.ini "port" "chat_server_port")
|
UpdateConfigOption(${DLU_CONFIG_DIR}/chatconfig.ini "port" "chat_server_port")
|
||||||
@@ -196,15 +207,15 @@ endforeach()
|
|||||||
message(STATUS "Resource file integrity check complete")
|
message(STATUS "Resource file integrity check complete")
|
||||||
|
|
||||||
# if navmeshes directory does not exist, create it
|
# if navmeshes directory does not exist, create it
|
||||||
if(NOT EXISTS ${PROJECT_BINARY_DIR}/navmeshes)
|
if(NOT EXISTS ${CMAKE_BINARY_DIR}/navmeshes)
|
||||||
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/navmeshes)
|
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/navmeshes)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Copy navmesh data on first build and extract it
|
# Copy navmesh data on first build and extract it
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/resources/navmeshes.zip ${PROJECT_BINARY_DIR}/navmeshes.zip COPYONLY)
|
configure_file(${CMAKE_SOURCE_DIR}/resources/navmeshes.zip ${CMAKE_BINARY_DIR}/navmeshes.zip COPYONLY)
|
||||||
|
|
||||||
file(ARCHIVE_EXTRACT INPUT ${PROJECT_BINARY_DIR}/navmeshes.zip DESTINATION ${PROJECT_BINARY_DIR}/navmeshes)
|
file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/navmeshes.zip DESTINATION ${CMAKE_BINARY_DIR}/navmeshes)
|
||||||
file(REMOVE ${PROJECT_BINARY_DIR}/navmeshes.zip)
|
file(REMOVE ${CMAKE_BINARY_DIR}/navmeshes.zip)
|
||||||
|
|
||||||
# Copy vanity files on first build
|
# Copy vanity files on first build
|
||||||
set(VANITY_FILES "CREDITS.md" "INFO.md" "TESTAMENT.md" "root.xml" "dev-tribute.xml" "atm.xml" "demo.xml")
|
set(VANITY_FILES "CREDITS.md" "INFO.md" "TESTAMENT.md" "root.xml" "dev-tribute.xml" "atm.xml" "demo.xml")
|
||||||
@@ -214,20 +225,20 @@ foreach(file ${VANITY_FILES})
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Move our migrations for MasterServer to run
|
# Move our migrations for MasterServer to run
|
||||||
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/migrations/dlu/)
|
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/migrations/dlu/)
|
||||||
file(GLOB SQL_FILES ${CMAKE_SOURCE_DIR}/migrations/dlu/*.sql)
|
file(GLOB SQL_FILES ${CMAKE_SOURCE_DIR}/migrations/dlu/*.sql)
|
||||||
|
|
||||||
foreach(file ${SQL_FILES})
|
foreach(file ${SQL_FILES})
|
||||||
get_filename_component(file ${file} NAME)
|
get_filename_component(file ${file} NAME)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/migrations/dlu/${file} ${PROJECT_BINARY_DIR}/migrations/dlu/${file})
|
configure_file(${CMAKE_SOURCE_DIR}/migrations/dlu/${file} ${CMAKE_BINARY_DIR}/migrations/dlu/${file})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/migrations/cdserver/)
|
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/migrations/cdserver/)
|
||||||
file(GLOB SQL_FILES ${CMAKE_SOURCE_DIR}/migrations/cdserver/*.sql)
|
file(GLOB SQL_FILES ${CMAKE_SOURCE_DIR}/migrations/cdserver/*.sql)
|
||||||
|
|
||||||
foreach(file ${SQL_FILES})
|
foreach(file ${SQL_FILES})
|
||||||
get_filename_component(file ${file} NAME)
|
get_filename_component(file ${file} NAME)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/migrations/cdserver/${file} ${PROJECT_BINARY_DIR}/migrations/cdserver/${file})
|
configure_file(${CMAKE_SOURCE_DIR}/migrations/cdserver/${file} ${CMAKE_BINARY_DIR}/migrations/cdserver/${file})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Add system specfic includes for Apple, Windows and Other Unix OS' (including Linux)
|
# Add system specfic includes for Apple, Windows and Other Unix OS' (including Linux)
|
||||||
|
|||||||
@@ -11,72 +11,37 @@
|
|||||||
"displayName": "Default configure step",
|
"displayName": "Default configure step",
|
||||||
"description": "Use 'build' dir and Unix makefiles",
|
"description": "Use 'build' dir and Unix makefiles",
|
||||||
"binaryDir": "${sourceDir}/build",
|
"binaryDir": "${sourceDir}/build",
|
||||||
"generator": "Unix Makefiles"
|
"generator": "Unix Makefiles",
|
||||||
},
|
"hidden": true
|
||||||
{
|
|
||||||
"name": "debug-config",
|
|
||||||
"hidden": true,
|
|
||||||
"cacheVariables": {
|
|
||||||
"CMAKE_BUILD_TYPE": "Debug"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "relwithdebinfo-config",
|
|
||||||
"hidden": true,
|
|
||||||
"cacheVariables": {
|
|
||||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "release-config",
|
|
||||||
"hidden": true,
|
|
||||||
"cacheVariables": {
|
|
||||||
"CMAKE_BUILD_TYPE": "Release"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "clang-config",
|
|
||||||
"hidden": true,
|
|
||||||
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-clang.cmake"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gnu-config",
|
|
||||||
"hidden": true,
|
|
||||||
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-gnu.cmake"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "windows-msvc",
|
|
||||||
"inherits": "default",
|
|
||||||
"displayName": "[Multi] Windows (MSVC)",
|
|
||||||
"description": "Set architecture to 64-bit (b/c RakNet)",
|
|
||||||
"generator": "Visual Studio 17 2022",
|
|
||||||
"binaryDir": "${sourceDir}/build/msvc",
|
|
||||||
"architecture": {
|
|
||||||
"value": "x64"
|
|
||||||
},
|
|
||||||
"condition": {
|
|
||||||
"type": "equals",
|
|
||||||
"lhs": "${hostSystemName}",
|
|
||||||
"rhs": "Windows"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "windows-default",
|
"name": "windows-default",
|
||||||
"inherits": "windows-msvc",
|
"inherits": "default",
|
||||||
"displayName": "Windows only Configure Settings",
|
"displayName": "Windows Default Configure Settings",
|
||||||
"description": "Sets build and install directories",
|
"description": "Sets build and install directories",
|
||||||
"generator": "Ninja",
|
"generator": "Visual Studio 17 2022",
|
||||||
"condition": {
|
"condition": {
|
||||||
"type": "equals",
|
"type": "equals",
|
||||||
"lhs": "${hostSystemName}",
|
"lhs": "${hostSystemName}",
|
||||||
"rhs": "Windows"
|
"rhs": "Windows"
|
||||||
},
|
},
|
||||||
"architecture": {
|
"hidden": true
|
||||||
"value": "x64"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "linux-config",
|
"name": "windows-msvc",
|
||||||
|
"inherits": "windows-default",
|
||||||
|
"displayName": "Windows (MSVC)",
|
||||||
|
"description": "Create a build using MSVC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-clang",
|
||||||
|
"inherits": "windows-default",
|
||||||
|
"displayName": "EXPERIMENTAL - Windows (Clang)",
|
||||||
|
"description": "Create a build using Clang",
|
||||||
|
"toolset": "ClangCL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-default",
|
||||||
"inherits": "default",
|
"inherits": "default",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"condition": {
|
"condition": {
|
||||||
@@ -86,553 +51,74 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "linux-clang-debug",
|
"name": "linux-clang",
|
||||||
"inherits": [
|
"inherits": "linux-default",
|
||||||
"linux-config",
|
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-clang.cmake",
|
||||||
"clang-config",
|
"displayName": "Linux (Clang)",
|
||||||
"debug-config"
|
"description": "Create a build using the Clang toolchain for Linux"
|
||||||
],
|
|
||||||
"displayName": "EXPERIMENTAL - [Debug] Linux (Clang)",
|
|
||||||
"description": "Create a debug build using the Clang toolchain for Linux",
|
|
||||||
"binaryDir": "${sourceDir}/build/clang-debug"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "linux-clang-relwithdebinfo",
|
"name": "linux-gnu",
|
||||||
"inherits": [
|
"inherits": "linux-default",
|
||||||
"linux-config",
|
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-gnu.cmake",
|
||||||
"clang-config",
|
"displayName": "Linux (GNU)",
|
||||||
"relwithdebinfo-config"
|
"description": "Create a build using the GNU toolchain for Linux"
|
||||||
],
|
|
||||||
"displayName": "EXPERIMENTAL - [RelWithDebInfo] Linux (Clang)",
|
|
||||||
"description": "Create a release build with debug info using the Clang toolchain for Linux",
|
|
||||||
"binaryDir": "${sourceDir}/build/clang-relwithdebinfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-clang-release",
|
|
||||||
"inherits": [
|
|
||||||
"linux-config",
|
|
||||||
"clang-config",
|
|
||||||
"release-config"
|
|
||||||
],
|
|
||||||
"displayName": "EXPERIMENTAL - [Release] Linux (Clang)",
|
|
||||||
"description": "Create a release build using the Clang toolchain for Linux",
|
|
||||||
"binaryDir": "${sourceDir}/build/clang-release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-debug",
|
|
||||||
"inherits": [
|
|
||||||
"linux-config",
|
|
||||||
"gnu-config",
|
|
||||||
"debug-config"
|
|
||||||
],
|
|
||||||
"displayName": "[Debug] Linux (GNU)",
|
|
||||||
"description": "Create a debug build using the GNU toolchain for Linux",
|
|
||||||
"binaryDir": "${sourceDir}/build/gnu-debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-relwithdebinfo",
|
|
||||||
"inherits": [
|
|
||||||
"linux-config",
|
|
||||||
"gnu-config",
|
|
||||||
"relwithdebinfo-config"
|
|
||||||
],
|
|
||||||
"displayName": "[RelWithDebInfo] Linux (GNU)",
|
|
||||||
"description": "Create a release build with debug info using the GNU toolchain for Linux",
|
|
||||||
"binaryDir": "${sourceDir}/build/gnu-relwithdebinfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-release",
|
|
||||||
"inherits": [
|
|
||||||
"linux-config",
|
|
||||||
"gnu-config",
|
|
||||||
"release-config"
|
|
||||||
],
|
|
||||||
"displayName": "[Release] Linux (GNU)",
|
|
||||||
"description": "Create a release build using the GNU toolchain for Linux",
|
|
||||||
"binaryDir": "${sourceDir}/build/gnu-release"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "macos",
|
"name": "macos",
|
||||||
"inherits": "default",
|
"inherits": "default",
|
||||||
"displayName": "[Multi] MacOS",
|
"displayName": "MacOS",
|
||||||
"description": "Create a build for MacOS",
|
"description": "Create a build for MacOS",
|
||||||
"condition": {
|
"condition": {
|
||||||
"type": "equals",
|
"type": "equals",
|
||||||
"lhs": "${hostSystemName}",
|
"lhs": "${hostSystemName}",
|
||||||
"rhs": "Darwin"
|
"rhs": "Darwin"
|
||||||
},
|
}
|
||||||
"binaryDir": "${sourceDir}/build/macos"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"buildPresets": [
|
"buildPresets": [
|
||||||
{
|
{ "name": "ci-ubuntu-22.04", "configurePreset": "linux-gnu" },
|
||||||
"name": "default",
|
{ "name": "ci-macos-13", "configurePreset": "macos" },
|
||||||
"configurePreset": "default",
|
{ "name": "ci-windows-2022", "configurePreset": "windows-msvc" }
|
||||||
"displayName": "Default Build",
|
|
||||||
"description": "Default Build",
|
|
||||||
"jobs": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "windows-msvc-debug",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "windows-msvc",
|
|
||||||
"displayName": "[Debug] Windows (MSVC)",
|
|
||||||
"description": "This preset is used to build in debug mode using the MSVC toolchain on Windows",
|
|
||||||
"configuration": "Debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "windows-msvc-relwithdebinfo",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "windows-msvc",
|
|
||||||
"displayName": "[RelWithDebInfo] Windows (MSVC)",
|
|
||||||
"description": "This preset is used to build in debug mode using the MSVC toolchain on Windows",
|
|
||||||
"configuration": "RelWithDebInfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "windows-msvc-release",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "windows-msvc",
|
|
||||||
"displayName": "[Release] Windows (MSVC)",
|
|
||||||
"description": "This preset is used to build in release mode using the MSVC toolchain on Windows",
|
|
||||||
"configuration": "Release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-clang-debug",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-clang-debug",
|
|
||||||
"displayName": "EXPERIMENTAL - [Debug] Linux (Clang)",
|
|
||||||
"description": "This preset is used to build in debug mode using the Clang toolchain on Linux",
|
|
||||||
"configuration": "Debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-clang-relwithdebinfo",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-clang-relwithdebinfo",
|
|
||||||
"displayName": "EXPERIMENTAL - [RelWithDebInfo] Linux (Clang)",
|
|
||||||
"description": "This preset is used to build in release mode with debug info using the Clang toolchain on Linux",
|
|
||||||
"configuration": "RelWithDebInfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-clang-release",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-clang-release",
|
|
||||||
"displayName": "EXPERIMENTAL - [Release] Linux (Clang)",
|
|
||||||
"description": "This preset is used to build in release mode using the Clang toolchain on Linux",
|
|
||||||
"configuration": "Release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-debug",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-gnu-debug",
|
|
||||||
"displayName": "[Debug] Linux (GNU)",
|
|
||||||
"description": "This preset is used to build in debug mode using the GNU toolchain on Linux",
|
|
||||||
"configuration": "Debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-relwithdebinfo",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-gnu-relwithdebinfo",
|
|
||||||
"displayName": "[RelWithDebInfo] Linux (GNU)",
|
|
||||||
"description": "This preset is used to build in release mode with debug info using the GNU toolchain on Linux",
|
|
||||||
"configuration": "RelWithDebInfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-release",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-gnu-release",
|
|
||||||
"displayName": "[Release] Linux (GNU)",
|
|
||||||
"description": "This preset is used to build in release mode using the GNU toolchain on Linux",
|
|
||||||
"configuration": "Release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "macos-debug",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "macos",
|
|
||||||
"displayName": "[Debug] MacOS",
|
|
||||||
"description": "This preset is used to build in debug mode on MacOS",
|
|
||||||
"configuration": "Debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "macos-relwithdebinfo",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "macos",
|
|
||||||
"displayName": "[RelWithDebInfo] MacOS",
|
|
||||||
"description": "This preset is used to build in release mode with debug info on MacOS",
|
|
||||||
"configuration": "RelWithDebInfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "macos-release",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "macos",
|
|
||||||
"displayName": "[Release] MacOS",
|
|
||||||
"description": "This preset is used to build in release mode on MacOS",
|
|
||||||
"configuration": "Release"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"testPresets": [
|
"testPresets": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"hidden": true,
|
||||||
|
"execution": {
|
||||||
|
"jobs": 2
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"outputOnFailure": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "default",
|
"name": "ci-ubuntu-22.04",
|
||||||
"configurePreset": "default",
|
"configurePreset": "linux-gnu",
|
||||||
"execution": {
|
"displayName": "CI Tests on Linux",
|
||||||
"jobs": 2
|
"inherits": "default"
|
||||||
},
|
|
||||||
"output": {
|
|
||||||
"outputOnFailure": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "windows-msvc-test",
|
"name": "ci-macos-13",
|
||||||
"inherits": "default",
|
"configurePreset": "macos",
|
||||||
|
"displayName": "CI Tests on MacOS",
|
||||||
|
"inherits": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-windows-2022",
|
||||||
"configurePreset": "windows-msvc",
|
"configurePreset": "windows-msvc",
|
||||||
"hidden": true,
|
"displayName": "CI Tests on windows",
|
||||||
|
"inherits": "default",
|
||||||
|
|
||||||
|
"configuration": "RelWithDebInfo",
|
||||||
"filter": {
|
"filter": {
|
||||||
"exclude": {
|
"exclude": {
|
||||||
"name": "((example)|(minigzip))+"
|
"name": "((example)|(minigzip))+"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "windows-msvc-debug",
|
|
||||||
"inherits": "windows-msvc-test",
|
|
||||||
"configurePreset": "windows-msvc",
|
|
||||||
"displayName": "[Debug] Windows (MSVC)",
|
|
||||||
"description": "Runs all tests on a Windows configuration",
|
|
||||||
"configuration": "Debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "windows-msvc-relwithdebinfo",
|
|
||||||
"inherits": "windows-msvc-test",
|
|
||||||
"configurePreset": "windows-msvc",
|
|
||||||
"displayName": "[RelWithDebInfo] Windows (MSVC)",
|
|
||||||
"description": "Runs all tests on a Windows configuration",
|
|
||||||
"configuration": "RelWithDebInfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "windows-msvc-release",
|
|
||||||
"inherits": "windows-msvc-test",
|
|
||||||
"configurePreset": "windows-msvc",
|
|
||||||
"displayName": "[Release] Windows (MSVC)",
|
|
||||||
"description": "Runs all tests on a Windows configuration",
|
|
||||||
"configuration": "Release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-clang-debug",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-clang-debug",
|
|
||||||
"displayName": "EXPERIMENTAL - [Debug] Linux (Clang)",
|
|
||||||
"description": "Runs all tests on a Linux Clang configuration",
|
|
||||||
"configuration": "Release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-clang-relwithdebinfo",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-clang-relwithdebinfo",
|
|
||||||
"displayName": "EXPERIMENTAL - [RelWithDebInfo] Linux (Clang)",
|
|
||||||
"description": "Runs all tests on a Linux Clang configuration",
|
|
||||||
"configuration": "RelWithDebInfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-clang-release",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-clang-release",
|
|
||||||
"displayName": "EXPERIMENTAL - [Release] Linux (Clang)",
|
|
||||||
"description": "Runs all tests on a Linux Clang configuration",
|
|
||||||
"configuration": "Release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-debug",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-gnu-debug",
|
|
||||||
"displayName": "[Debug] Linux (GNU)",
|
|
||||||
"description": "Runs all tests on a Linux GNU configuration",
|
|
||||||
"configuration": "Release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-relwithdebinfo",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-gnu-relwithdebinfo",
|
|
||||||
"displayName": "[RelWithDebInfo] Linux (GNU)",
|
|
||||||
"description": "Runs all tests on a Linux GNU configuration",
|
|
||||||
"configuration": "RelWithDebInfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-release",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "linux-gnu-release",
|
|
||||||
"displayName": "[Release] Linux (GNU)",
|
|
||||||
"description": "Runs all tests on a Linux GNU configuration",
|
|
||||||
"configuration": "Release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "macos-debug",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "macos",
|
|
||||||
"displayName": "[Debug] MacOS",
|
|
||||||
"description": "Runs all tests on a MacOS configuration",
|
|
||||||
"configuration": "Debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "macos-relwithdebinfo",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "macos",
|
|
||||||
"displayName": "[RelWithDebInfo] MacOS",
|
|
||||||
"description": "Runs all tests on a MacOS configuration",
|
|
||||||
"configuration": "RelWithDebInfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "macos-release",
|
|
||||||
"inherits": "default",
|
|
||||||
"configurePreset": "macos",
|
|
||||||
"displayName": "[Release] MacOS",
|
|
||||||
"description": "Runs all tests on a MacOS configuration",
|
|
||||||
"configuration": "Release"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"workflowPresets": [
|
"workflowPresets": [
|
||||||
{
|
|
||||||
"name": "default",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "default"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "default"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "default"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "windows-msvc-debug",
|
|
||||||
"displayName": "[Debug] Windows (MSVC)",
|
|
||||||
"description": "MSVC debug workflow preset for Windows",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "windows-msvc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "windows-msvc-debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "windows-msvc-debug"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "windows-msvc-relwithdebinfo",
|
|
||||||
"displayName": "[RelWithDebInfo] Windows (MSVC)",
|
|
||||||
"description": "MSVC release with debug info workflow preset for Windows",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "windows-msvc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "windows-msvc-relwithdebinfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "windows-msvc-relwithdebinfo"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ci-windows-2022",
|
|
||||||
"displayName": "[Release] Windows (MSVC)",
|
|
||||||
"description": "CI workflow preset for Windows",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "windows-msvc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "windows-msvc-release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "windows-msvc-release"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-debug",
|
|
||||||
"displayName": "[Debug] Linux (GNU)",
|
|
||||||
"description": "GNU debug workflow preset for Linux",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "linux-gnu-debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "linux-gnu-debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "linux-gnu-debug"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-gnu-relwithdebinfo",
|
|
||||||
"displayName": "[RelWithDebInfo] Linux (GNU)",
|
|
||||||
"description": "GNU release with debug info workflow preset for Linux",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "linux-gnu-relwithdebinfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "linux-gnu-relwithdebinfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "linux-gnu-relwithdebinfo"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ci-ubuntu-22.04",
|
|
||||||
"displayName": "[Release] Linux (GNU)",
|
|
||||||
"description": "CI workflow preset for Ubuntu",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "linux-gnu-release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "linux-gnu-release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "linux-gnu-release"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-clang-debug",
|
|
||||||
"displayName": "EXPERIMENTAL - [Debug] Linux (Clang)",
|
|
||||||
"description": "Clang debug workflow preset for Linux",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "linux-clang-debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "linux-clang-debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "linux-clang-debug"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-clang-relwithdebinfo",
|
|
||||||
"displayName": "EXPERIMENTAL - [RelWithDebInfo] Linux (Clang)",
|
|
||||||
"description": "Clang release with debug info workflow preset for Linux",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "linux-clang-relwithdebinfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "linux-clang-relwithdebinfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "linux-clang-relwithdebinfo"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "linux-clang-release",
|
|
||||||
"displayName": "EXPERIMENTAL - [Release] Linux (Clang)",
|
|
||||||
"description": "Clang release workflow preset for Linux",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "linux-clang-release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "linux-clang-release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "linux-clang-release"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "macos-debug",
|
|
||||||
"displayName": "[Debug] MacOS",
|
|
||||||
"description": "Release workflow preset for MacOS",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "macos"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "macos-debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "macos-debug"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "macos-relwithdebinfo",
|
|
||||||
"displayName": "[RelWithDebInfo] MacOS",
|
|
||||||
"description": "Release with debug info workflow preset for MacOS",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "macos"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "macos-relwithdebinfo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "macos-relwithdebinfo"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ci-macos-13",
|
|
||||||
"displayName": "[Release] MacOS",
|
|
||||||
"description": "CI workflow preset for MacOS",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"type": "configure",
|
|
||||||
"name": "macos"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "build",
|
|
||||||
"name": "macos-release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "test",
|
|
||||||
"name": "macos-release"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
18
Dockerfile
18
Dockerfile
@@ -23,23 +23,23 @@ RUN --mount=type=cache,id=build-apt-cache,target=/var/cache/apt \
|
|||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Grab libraries and load them
|
# Grab libraries and load them
|
||||||
COPY --from=build /app/build/mariadbcpp/libmariadbcpp.so /usr/local/lib/
|
COPY --from=build /app/build/Linux-x86_64/GNU/Release/mariadbcpp/libmariadbcpp.so /usr/local/lib/
|
||||||
RUN ldconfig
|
RUN ldconfig
|
||||||
|
|
||||||
# Server bins
|
# Server bins
|
||||||
COPY --from=build /app/build/*Server /app/
|
COPY --from=build /app/build/Linux-x86_64/GNU/Release/*Server /app/
|
||||||
|
|
||||||
# Necessary suplimentary files
|
# Necessary suplimentary files
|
||||||
COPY --from=build /app/build/*.ini /app/configs/
|
COPY --from=build /app/build/Linux-x86_64/GNU/Release/*.ini /app/configs/
|
||||||
COPY --from=build /app/build/vanity/*.* /app/vanity/
|
COPY --from=build /app/build/Linux-x86_64/GNU/Release/vanity/*.* /app/vanity/
|
||||||
COPY --from=build /app/build/navmeshes /app/navmeshes
|
COPY --from=build /app/build/Linux-x86_64/GNU/Release/navmeshes /app/navmeshes
|
||||||
COPY --from=build /app/build/migrations /app/migrations
|
COPY --from=build /app/build/Linux-x86_64/GNU/Release/migrations /app/migrations
|
||||||
COPY --from=build /app/build/*.dcf /app/
|
COPY --from=build /app/build/Linux-x86_64/GNU/Release/*.dcf /app/
|
||||||
|
|
||||||
# backup of config and vanity files to copy to the host incase
|
# backup of config and vanity files to copy to the host incase
|
||||||
# of a mount clobbering the copy from above
|
# of a mount clobbering the copy from above
|
||||||
COPY --from=build /app/build/*.ini /app/default-configs/
|
COPY --from=build /app/build/Linux-x86_64/GNU/Release/*.ini /app/default-configs/
|
||||||
COPY --from=build /app/build/vanity/*.* /app/default-vanity/
|
COPY --from=build /app/build/Linux-x86_64/GNU/Release/vanity/*.* /app/default-vanity/
|
||||||
|
|
||||||
# needed as the container runs with the root user
|
# needed as the container runs with the root user
|
||||||
# and therefore sudo doesn't exist
|
# and therefore sudo doesn't exist
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
# On Windows ClangCL can't compile the connector from source but can link to an msvc compiled one,
|
# On Windows ClangCL can't compile the connector from source but can link to an msvc compiled one,
|
||||||
# so prefer the prebuilt binaries unless MARIADB_BUILD_SOURCE is specified
|
# so prefer the prebuilt binaries unless MARIADB_BUILD_SOURCE is specified
|
||||||
if(WIN32 AND NOT MARIADB_BUILD_SOURCE)
|
if(WIN32 AND NOT MARIADB_BUILD_SOURCE)
|
||||||
set(MARIADB_MSI_DIR "${PROJECT_BINARY_DIR}/msi")
|
set(MARIADB_MSI_DIR "${CMAKE_BINARY_DIR}/msi")
|
||||||
set(MARIADB_CONNECTOR_DIR "${PROJECT_BINARY_DIR}/mariadbcpp")
|
set(MARIADB_CONNECTOR_DIR "${CMAKE_BINARY_DIR}/mariadbcpp")
|
||||||
set(MARIADB_C_CONNECTOR_DIR "${MARIADB_CONNECTOR_DIR}/MariaDB/MariaDB Connector C 64-bit")
|
set(MARIADB_C_CONNECTOR_DIR "${MARIADB_CONNECTOR_DIR}/MariaDB/MariaDB Connector C 64-bit")
|
||||||
set(MARIADB_CPP_CONNECTOR_DIR "${MARIADB_CONNECTOR_DIR}/MariaDB/MariaDB C++ Connector 64-bit")
|
set(MARIADB_CPP_CONNECTOR_DIR "${MARIADB_CONNECTOR_DIR}/MariaDB/MariaDB C++ Connector 64-bit")
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ if(WIN32 AND NOT MARIADB_BUILD_SOURCE)
|
|||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
"${MARIADBCPP_SHARED_LIBRARY_LOCATION}"
|
"${MARIADBCPP_SHARED_LIBRARY_LOCATION}"
|
||||||
"${MARIADBC_SHARED_LIBRARY_LOCATION}"
|
"${MARIADBC_SHARED_LIBRARY_LOCATION}"
|
||||||
"${PROJECT_BINARY_DIR}")
|
"${CMAKE_BINARY_DIR}")
|
||||||
|
|
||||||
# MariaDB uses plugins that the database needs to load, the prebuilt binaries by default will try to find the libraries in system directories,
|
# MariaDB uses plugins that the database needs to load, the prebuilt binaries by default will try to find the libraries in system directories,
|
||||||
# so set this define and the servers will set the MARIADB_PLUGIN_DIR environment variable to the appropriate directory.
|
# so set this define and the servers will set the MARIADB_PLUGIN_DIR environment variable to the appropriate directory.
|
||||||
@@ -86,13 +86,13 @@ else() # Build from source
|
|||||||
-DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0)
|
-DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(MARIADBCPP_INSTALL_DIR ${PROJECT_BINARY_DIR}/prefix)
|
set(MARIADBCPP_INSTALL_DIR ${CMAKE_BINARY_DIR}/prefix)
|
||||||
set(MARIADBCPP_LIBRARY_DIR ${PROJECT_BINARY_DIR}/mariadbcpp)
|
set(MARIADBCPP_LIBRARY_DIR ${CMAKE_BINARY_DIR}/mariadbcpp)
|
||||||
set(MARIADBCPP_PLUGIN_DIR ${MARIADBCPP_LIBRARY_DIR}/plugin)
|
set(MARIADBCPP_PLUGIN_DIR ${MARIADBCPP_LIBRARY_DIR}/plugin)
|
||||||
set(MARIADBCPP_SOURCE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/mariadb-connector-cpp)
|
set(MARIADBCPP_SOURCE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/mariadb-connector-cpp)
|
||||||
set(MARIADB_INCLUDE_DIR "${MARIADBCPP_SOURCE_DIR}/include")
|
set(MARIADB_INCLUDE_DIR "${MARIADBCPP_SOURCE_DIR}/include")
|
||||||
ExternalProject_Add(mariadb_connector_cpp
|
ExternalProject_Add(mariadb_connector_cpp
|
||||||
PREFIX "${PROJECT_BINARY_DIR}/thirdparty/mariadb-connector-cpp"
|
PREFIX "${CMAKE_BINARY_DIR}/thirdparty/mariadb-connector-cpp"
|
||||||
SOURCE_DIR ${MARIADBCPP_SOURCE_DIR}
|
SOURCE_DIR ${MARIADBCPP_SOURCE_DIR}
|
||||||
INSTALL_DIR ${MARIADBCPP_INSTALL_DIR}
|
INSTALL_DIR ${MARIADBCPP_INSTALL_DIR}
|
||||||
CMAKE_ARGS -Wno-dev
|
CMAKE_ARGS -Wno-dev
|
||||||
@@ -127,20 +127,20 @@ else() # Build from source
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Create mariadb connector library object
|
# Create mariadb connector library object
|
||||||
add_library(MariaDB::ConnCpp SHARED IMPORTED GLOBAL)
|
add_library(mariadb_cpp_connector SHARED IMPORTED GLOBAL)
|
||||||
add_dependencies(MariaDB::ConnCpp mariadb_connector_cpp)
|
add_dependencies(mariadb_cpp_connector mariadb_connector_cpp)
|
||||||
set_target_properties(MariaDB::ConnCpp PROPERTIES
|
set_target_properties(mariadb_cpp_connector PROPERTIES
|
||||||
IMPORTED_LOCATION "${MARIADBCPP_SHARED_LIBRARY_LOCATION}")
|
IMPORTED_LOCATION "${MARIADBCPP_SHARED_LIBRARY_LOCATION}")
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_target_properties(MariaDB::ConnCpp PROPERTIES
|
set_target_properties(mariadb_cpp_connector PROPERTIES
|
||||||
IMPORTED_IMPLIB "${MARIADB_IMPLIB_LOCATION}")
|
IMPORTED_IMPLIB "${MARIADB_IMPLIB_LOCATION}")
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
set_target_properties(MariaDB::ConnCpp PROPERTIES
|
set_target_properties(mariadb_cpp_connector PROPERTIES
|
||||||
IMPORTED_SONAME "libmariadbcpp")
|
IMPORTED_SONAME "libmariadbcpp")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add directories to include lists
|
# Add directories to include lists
|
||||||
target_include_directories(MariaDB::ConnCpp SYSTEM INTERFACE ${MARIADB_INCLUDE_DIR})
|
target_include_directories(mariadb_cpp_connector SYSTEM INTERFACE ${MARIADB_INCLUDE_DIR})
|
||||||
|
|
||||||
set(MariaDB_FOUND TRUE)
|
set(mariadb_found TRUE)
|
||||||
|
|||||||
@@ -45,11 +45,15 @@ if (UNIX)
|
|||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
|
set(WITH_GTEST OFF CACHE BOOL "" FORCE)
|
||||||
|
set(ZLIB_ENABLE_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(ZLIB_COMPAT ON CACHE BOOL "Enable ZLIB compatibility mode" FORCE)
|
||||||
|
|
||||||
# TODO Keep an eye on the zlib repository for an update to disable testing. Don't forget to update CMakePresets
|
# TODO Keep an eye on the zlib repository for an update to disable testing. Don't forget to update CMakePresets
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
zlib
|
zlib
|
||||||
URL https://github.com/madler/zlib/archive/refs/tags/v1.2.11.zip
|
URL https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.2.2.zip
|
||||||
URL_HASH MD5=9d6a627693163bbbf3f26403a3a0b0b1
|
URL_HASH MD5=2cf9199fb785ea579a2a9905a75c38b3
|
||||||
)
|
)
|
||||||
|
|
||||||
# Disable warning about no project version.
|
# Disable warning about no project version.
|
||||||
@@ -60,7 +64,6 @@ elseif (WIN32)
|
|||||||
FetchContent_MakeAvailable(zlib)
|
FetchContent_MakeAvailable(zlib)
|
||||||
|
|
||||||
set(ZLIB_INCLUDE_DIRS ${zlib_SOURCE_DIR} ${zlib_BINARY_DIR})
|
set(ZLIB_INCLUDE_DIRS ${zlib_SOURCE_DIR} ${zlib_BINARY_DIR})
|
||||||
set_target_properties(zlib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}")
|
|
||||||
add_library(ZLIB::ZLIB ALIAS zlib)
|
add_library(ZLIB::ZLIB ALIAS zlib)
|
||||||
else ()
|
else ()
|
||||||
message(
|
message(
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace ZCompression {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t Compress(const uint8_t* abSrc, int32_t nLenSrc, uint8_t* abDst, int32_t nLenDst) {
|
int32_t Compress(const uint8_t* abSrc, int32_t nLenSrc, uint8_t* abDst, int32_t nLenDst) {
|
||||||
|
|
||||||
z_stream zInfo = { 0 };
|
z_stream zInfo = { 0 };
|
||||||
zInfo.total_in = zInfo.avail_in = nLenSrc;
|
zInfo.total_in = zInfo.avail_in = nLenSrc;
|
||||||
zInfo.total_out = zInfo.avail_out = nLenDst;
|
zInfo.total_out = zInfo.avail_out = nLenDst;
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
#include "zlib.h"
|
|
||||||
|
|
||||||
AssetManager::AssetManager(const std::filesystem::path& path) {
|
AssetManager::AssetManager(const std::filesystem::path& path) {
|
||||||
if (!std::filesystem::is_directory(path)) {
|
if (!std::filesystem::is_directory(path)) {
|
||||||
throw std::runtime_error("Attempted to load asset bundle (" + path.string() + ") however it is not a valid directory.");
|
throw std::runtime_error("Attempted to load asset bundle (" + path.string() + ") however it is not a valid directory.");
|
||||||
@@ -82,7 +80,7 @@ bool AssetManager::HasFile(const char* name) {
|
|||||||
if (fixedName.rfind("client\\res\\", 0) != 0) fixedName = "client\\res\\" + fixedName;
|
if (fixedName.rfind("client\\res\\", 0) != 0) fixedName = "client\\res\\" + fixedName;
|
||||||
|
|
||||||
uint32_t crc = crc32b(0xFFFFFFFF, reinterpret_cast<uint8_t*>(const_cast<char*>(fixedName.c_str())), fixedName.size());
|
uint32_t crc = crc32b(0xFFFFFFFF, reinterpret_cast<uint8_t*>(const_cast<char*>(fixedName.c_str())), fixedName.size());
|
||||||
crc = crc32b(crc, reinterpret_cast<Bytef*>(const_cast<char*>("\0\0\0\0")), 4);
|
crc = crc32b(crc, reinterpret_cast<uint8_t*>(const_cast<char*>("\0\0\0\0")), 4);
|
||||||
|
|
||||||
for (const auto& item : this->m_PackIndex->GetPackFileIndices()) {
|
for (const auto& item : this->m_PackIndex->GetPackFileIndices()) {
|
||||||
if (item.m_Crc == crc) {
|
if (item.m_Crc == crc) {
|
||||||
@@ -130,7 +128,7 @@ bool AssetManager::GetFile(const char* name, char** data, uint32_t* len) {
|
|||||||
}
|
}
|
||||||
int32_t packIndex = -1;
|
int32_t packIndex = -1;
|
||||||
uint32_t crc = crc32b(0xFFFFFFFF, reinterpret_cast<uint8_t*>(const_cast<char*>(fixedName.c_str())), fixedName.size());
|
uint32_t crc = crc32b(0xFFFFFFFF, reinterpret_cast<uint8_t*>(const_cast<char*>(fixedName.c_str())), fixedName.size());
|
||||||
crc = crc32b(crc, reinterpret_cast<Bytef*>(const_cast<char*>("\0\0\0\0")), 4);
|
crc = crc32b(crc, reinterpret_cast<uint8_t*>(const_cast<char*>("\0\0\0\0")), 4);
|
||||||
|
|
||||||
for (const auto& item : this->m_PackIndex->GetPackFileIndices()) {
|
for (const auto& item : this->m_PackIndex->GetPackFileIndices()) {
|
||||||
if (item.m_Crc == crc) {
|
if (item.m_Crc == crc) {
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
#define DARKFLAME_PLATFORM_IOS
|
#define DARKFLAME_PLATFORM_IOS
|
||||||
#elif TARGET_OS_MAC
|
#elif TARGET_OS_MAC
|
||||||
#define DARKFLAME_PLATFORM_MACOS
|
#define DARKFLAME_PLATFORM_MACOS
|
||||||
|
#pragma clang diagnostic push // prevent pragma messages being counted as a warning
|
||||||
|
#pragma clang diagnostic ignored "-W#pragma-messages"
|
||||||
#else
|
#else
|
||||||
#error unknown Apple operating system
|
#error unknown Apple operating system
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ add_subdirectory(GameDatabase)
|
|||||||
add_library(dDatabase STATIC "MigrationRunner.cpp")
|
add_library(dDatabase STATIC "MigrationRunner.cpp")
|
||||||
|
|
||||||
add_custom_target(conncpp_dylib
|
add_custom_target(conncpp_dylib
|
||||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${PROJECT_BINARY_DIR})
|
${CMAKE_COMMAND} -E copy $<TARGET_FILE:mariadb_cpp_connector> ${CMAKE_BINARY_DIR})
|
||||||
|
|
||||||
add_dependencies(dDatabase conncpp_dylib)
|
add_dependencies(dDatabase conncpp_dylib)
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ target_include_directories(dDatabaseGame PUBLIC "."
|
|||||||
"${PROJECT_SOURCE_DIR}/dCommon/dEnums"
|
"${PROJECT_SOURCE_DIR}/dCommon/dEnums"
|
||||||
)
|
)
|
||||||
target_link_libraries(dDatabaseGame
|
target_link_libraries(dDatabaseGame
|
||||||
PUBLIC MariaDB::ConnCpp
|
PUBLIC mariadb_cpp_connector
|
||||||
INTERFACE dCommon)
|
INTERFACE dCommon)
|
||||||
|
|
||||||
# Glob together all headers that need to be precompiled
|
# Glob together all headers that need to be precompiled
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ class AMFArrayValue;
|
|||||||
/**
|
/**
|
||||||
* @brief Sent when a player moves a Behavior A at position B to their inventory.
|
* @brief Sent when a player moves a Behavior A at position B to their inventory.
|
||||||
*/
|
*/
|
||||||
#pragma warning("This Control Behavior Message does not have a test yet. Non-developers can ignore this warning.")
|
#pragma message("MoveToInventory.h This Control Behavior Message does not have a test yet. Non-developers can ignore this warning.")
|
||||||
|
|
||||||
class MoveToInventoryMessage : public BehaviorMessageBase {
|
class MoveToInventoryMessage : public BehaviorMessageBase {
|
||||||
public:
|
public:
|
||||||
MoveToInventoryMessage(const AMFArrayValue& arguments);
|
MoveToInventoryMessage(const AMFArrayValue& arguments);
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ bool Precondition::CheckValue(Entity* player, const uint32_t value, bool evaluat
|
|||||||
|
|
||||||
return inventoryComponent->GetLotCount(value) >= count;
|
return inventoryComponent->GetLotCount(value) >= count;
|
||||||
case PreconditionType::DoesNotHaveItem:
|
case PreconditionType::DoesNotHaveItem:
|
||||||
return inventoryComponent->IsEquipped(value) < count;
|
return (inventoryComponent->IsEquipped(value) ? 1 : 0) < count;
|
||||||
case PreconditionType::HasAchievement:
|
case PreconditionType::HasAchievement:
|
||||||
if (missionComponent == nullptr) return false;
|
if (missionComponent == nullptr) return false;
|
||||||
return missionComponent->GetMissionState(value) >= eMissionState::COMPLETE;
|
return missionComponent->GetMissionState(value) >= eMissionState::COMPLETE;
|
||||||
|
|||||||
@@ -65,13 +65,13 @@ void RandomSpawnerFin::OnStartup(Entity* self) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
sectionMultipliers = {
|
sectionMultipliers = {
|
||||||
{"secA", 1},
|
{"secA", 1.0f},
|
||||||
{"secB", 1},
|
{"secB", 1.0f},
|
||||||
{"secC", 1.2f},
|
{"secC", 1.2f},
|
||||||
{"secD", 1.3f},
|
{"secD", 1.3f},
|
||||||
{"secE", 1.6f},
|
{"secE", 1.6f},
|
||||||
{"secF", 1},
|
{"secF", 1.0f},
|
||||||
{"secG", 1},
|
{"secG", 1.0f},
|
||||||
{"secH", 1.2f},
|
{"secH", 1.2f},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ void RandomSpawnerPit::OnStartup(Entity* self) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
sectionMultipliers = {
|
sectionMultipliers = {
|
||||||
{"secA", 1},
|
{"secA", 1.0f},
|
||||||
{"secB", 1.2f},
|
{"secB", 1.2f},
|
||||||
{"secC", 1.2f},
|
{"secC", 1.2f},
|
||||||
{"secD", 1},
|
{"secD", 1},
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ void RandomSpawnerStr::OnStartup(Entity* self) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
sectionMultipliers = {
|
sectionMultipliers = {
|
||||||
{"secA", 1},
|
{"secA", 1.0f},
|
||||||
{"secB", 1},
|
{"secB", 1.0f},
|
||||||
{"secC", 1.2f},
|
{"secC", 1.2f},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ add_executable(dCommonTests ${DCOMMONTEST_SOURCES})
|
|||||||
# Needs to be in binary dir for ctest
|
# Needs to be in binary dir for ctest
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
add_custom_target(dCommonTestsLink
|
add_custom_target(dCommonTestsLink
|
||||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_CURRENT_BINARY_DIR})
|
${CMAKE_COMMAND} -E copy $<TARGET_FILE:mariadb_cpp_connector> ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
add_dependencies(dCommonTests dCommonTestsLink)
|
add_dependencies(dCommonTests dCommonTestsLink)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ add_executable(dGameTests ${DGAMETEST_SOURCES})
|
|||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
add_custom_target(dGameTestsLink
|
add_custom_target(dGameTestsLink
|
||||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_CURRENT_BINARY_DIR})
|
${CMAKE_COMMAND} -E copy $<TARGET_FILE:mariadb_cpp_connector> ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
add_dependencies(dGameTests dGameTestsLink)
|
add_dependencies(dGameTests dGameTestsLink)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user