First Commit

This commit is contained in:
mikx
2025-03-18 19:19:03 -04:00
commit 93073b0be2
10024 changed files with 9034050 additions and 0 deletions

130
conf/dist/config.cmake vendored Normal file
View File

@@ -0,0 +1,130 @@
#
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
# Copyright (C) 2021+ WarheadCore <https://github.com/WarheadCore>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
set(SCRIPTS_AVAILABLE_OPTIONS none static dynamic minimal-static minimal-dynamic)
set(MODULES_AVAILABLE_OPTIONS none static dynamic)
set(BUILD_APPS_AVAILABLE_OPTIONS none all auth-only world-only)
set(BUILD_TOOLS_AVAILABLE_OPTIONS none all db-only maps-only)
set(SCRIPTS "static" CACHE STRING "Build core with scripts")
set(MODULES "static" CACHE STRING "Build core with modules")
set(APPS_BUILD "all" CACHE STRING "Build list for applications")
set(TOOLS_BUILD "none" CACHE STRING "Build list for tools")
set_property(CACHE SCRIPTS PROPERTY STRINGS ${SCRIPTS_AVAILABLE_OPTIONS})
set_property(CACHE MODULES PROPERTY STRINGS ${MODULES_AVAILABLE_OPTIONS})
set_property(CACHE APPS_BUILD PROPERTY STRINGS ${BUILD_APPS_AVAILABLE_OPTIONS})
set_property(CACHE TOOLS_BUILD PROPERTY STRINGS ${BUILD_TOOLS_AVAILABLE_OPTIONS})
# Log a error when the value of the SCRIPTS variable isn't a valid option.
if(SCRIPTS)
list(FIND SCRIPTS_AVAILABLE_OPTIONS "${SCRIPTS}" SCRIPTS_INDEX)
if(${SCRIPTS_INDEX} EQUAL -1)
message(FATAL_ERROR "The value (${SCRIPTS}) of your SCRIPTS variable is invalid! "
"Allowed values are: ${SCRIPTS_AVAILABLE_OPTIONS}. Set static")
endif()
endif()
# Log a error when the value of the MODULES variable isn't a valid option.
if(MODULES)
list(FIND MODULES_AVAILABLE_OPTIONS "${MODULES}" MODULES_INDEX)
if(${MODULES_INDEX} EQUAL -1)
message(FATAL_ERROR "The value (${MODULES}) of your MODULES variable is invalid! "
"Allowed values are: ${MODULES_AVAILABLE_OPTIONS}. Set static")
endif()
endif()
# Log a fatal error when the value of the APPS_BUILD variable isn't a valid option.
if(APPS_BUILD)
list(FIND BUILD_APPS_AVAILABLE_OPTIONS "${APPS_BUILD}" BUILD_APPS_INDEX)
if(${BUILD_APPS_INDEX} EQUAL -1)
message(FATAL_ERROR "The value (${APPS_BUILD}) of your APPS_BUILD variable is invalid! "
"Allowed values are: ${BUILD_APPS_AVAILABLE_OPTIONS}. Set default")
endif()
endif()
# Log a fatal error when the value of the TOOLS_BUILD variable isn't a valid option.
if(TOOLS_BUILD)
list(FIND BUILD_TOOLS_AVAILABLE_OPTIONS "${TOOLS_BUILD}" BUILD_TOOLS_INDEX)
if(${BUILD_TOOLS_INDEX} EQUAL -1)
message(FATAL_ERROR "The value (${TOOLS_BUILD}) of your TOOLS_BUILD variable is invalid! "
"Allowed values are: ${BUILD_TOOLS_AVAILABLE_OPTIONS}. Set default")
endif()
endif()
# Build a list of all script modules when -DSCRIPT="custom" is selected
GetScriptModuleList(SCRIPT_MODULE_LIST)
foreach(SCRIPT_MODULE ${SCRIPT_MODULE_LIST})
ScriptModuleNameToVariable(${SCRIPT_MODULE} SCRIPT_MODULE_VARIABLE)
set(${SCRIPT_MODULE_VARIABLE} "default" CACHE STRING "Build type of the ${SCRIPT_MODULE} module.")
set_property(CACHE ${SCRIPT_MODULE_VARIABLE} PROPERTY STRINGS default disabled static dynamic)
endforeach()
# Build a list of all modules script when -DMODULE="custom" is selected
GetModuleSourceList(SCRIPT_MODULE_LIST)
foreach(SCRIPT_MODULE ${SCRIPT_MODULE_LIST})
ModuleNameToVariable(${SCRIPT_MODULE} SCRIPT_MODULE_VARIABLE)
set(${SCRIPT_MODULE_VARIABLE} "default" CACHE STRING "Build type of the ${SCRIPT_MODULE} module.")
set_property(CACHE ${SCRIPT_MODULE_VARIABLE} PROPERTY STRINGS default disabled static dynamic)
endforeach()
# Build a list of all applications when -DBUILD_APPS="custom" is selected
GetApplicationsList(APPLICATIONS_BUILD_LIST)
foreach(APPLICATION_BUILD_NAME ${APPLICATIONS_BUILD_LIST})
ApplicationNameToVariable(${APPLICATION_BUILD_NAME} APPLICATION_BUILD_VARIABLE)
set(${APPLICATION_BUILD_VARIABLE} "default" CACHE STRING "Enable build the ${APPLICATION_BUILD_NAME} application.")
set_property(CACHE ${APPLICATION_BUILD_VARIABLE} PROPERTY STRINGS default enabled disabled)
endforeach()
# Build a list of all applications when -DBUILD_TOOLS="custom" is selected
GetToolsList(TOOLS_BUILD_LIST)
foreach(TOOL_BUILD_NAME ${TOOLS_BUILD_LIST})
ToolNameToVariable(${TOOL_BUILD_NAME} TOOL_BUILD_VARIABLE)
set(${TOOL_BUILD_VARIABLE} "default" CACHE STRING "Enable build the ${TOOL_BUILD_NAME} tool.")
set_property(CACHE ${TOOL_BUILD_VARIABLE} PROPERTY STRINGS default enabled disabled)
endforeach()
option(BUILD_TESTING "Build unit tests" 0)
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
option(WITH_WARNINGS "Show all warnings during compile" 0)
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
option(WITH_PERFTOOLS "Enable compilation with gperftools libraries included" 0)
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
option(ENABLE_VMAP_CHECKS "Enable Checks relative to DisableMgr system on vmap" 1)
option(WITH_DYNAMIC_LINKING "Enable dynamic library linking." 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)
CheckApplicationsBuildList()
CheckToolsBuildList()
IsDynamicLinkingRequired(WITH_DYNAMIC_LINKING_FORCED)
IsDynamicLinkingModulesRequired(WITH_DYNAMIC_LINKING_FORCED)
if(WITH_DYNAMIC_LINKING AND WITH_DYNAMIC_LINKING_FORCED)
set(WITH_DYNAMIC_LINKING_FORCED OFF)
endif()
if(WITH_DYNAMIC_LINKING OR WITH_DYNAMIC_LINKING_FORCED)
set(BUILD_SHARED_LIBS ON)
else()
set(BUILD_SHARED_LIBS OFF)
endif()
# Source tree in IDE
set(WITH_SOURCE_TREE "hierarchical" CACHE STRING "Build the source tree for IDE's.")
set_property(CACHE WITH_SOURCE_TREE PROPERTY STRINGS no flat hierarchical)
# Config abort
option(CONFIG_ABORT_INCORRECT_OPTIONS "Enable abort if core found incorrect option in config files" 0)

147
conf/dist/config.sh vendored Normal file
View File

@@ -0,0 +1,147 @@
# absolute root path of your azerothcore repository
# It should not be modified if you don't really know what you're doing
SRCPATH="$AC_PATH_ROOT"
# absolute path where build files must be stored
BUILDPATH=${BUILDPATH:-"$AC_PATH_VAR/build/obj"}
# absolute path where azerothcore will be installed
# NOTE: on linux the binaries are stored in a subfolder (/bin)
# of the $BINPATH
BINPATH="$AC_PATH_ROOT/env/dist"
# bash fills it by default with your os type. No need to change it.
# Change it if you really know what you're doing.
# OSTYPE=""
# When using linux, our installer automatically get information about your distro
# using lsb_release. If your distro is not supported but it's based on ubuntu or debian,
# please change it to one of these values.
# OSDISTRO="ubuntu"
# absolute path where config. files must be stored
# default: the system will use binpath by default
# CONFDIR="$AC_PATH_ROOT/env/dist/etc/"
# absolute path where maps and client data will be downloaded
# by the AC dashboard
# default: the system will use binpath by default
# DATAPATH="$BINPATH/bin"
# DATAPATH_ZIP="$DATAPATH/data.zip"
# azerothcore's official remote source address to pull from
# by default git will fetch form the azrothcore remote
# You can change it to "origin" if you want to fetch/pull from the set remote
ORIGIN_REMOTE="https://github.com/azerothcore/azerothcore-wotlk.git"
# Branch configuration for the installer to pull from.
# By default git will select the current working branch
# You can set it to "master" if you want the latest updates
INSTALLER_PULL_FROM=
##############################################
#
# COMPILER_CONFIGURATIONS
#
##############################################
# Set preferred compilers.
# To use gcc (not suggested) instead of clang change in:
# CCOMPILERC="/usr/bin/gcc"
# CCOMPILERCXX="/usr/bin/g++"
#
CCOMPILERC="/usr/bin/clang"
CCOMPILERCXX="/usr/bin/clang++"
# how many thread must be used for compilation ( leave zero to use all available )
MTHREADS=${MTHREADS:-0}
# enable/disable warnings during compilation
CWARNINGS=ON
# enable/disable some debug informations ( it's not a debug compilation )
CDEBUG=OFF
# specify compilation type:
# * Release: high optimization level, no debug info, code or asserts.
# * Debug: No optimization, asserts enabled, [custom debug (output) code enabled],
# debug info included in executable (so you can step through the code with a
# debugger and have address to source-file:line-number translation).
# * RelWithDebInfo: optimized, *with* debug info, but no debug (output) code or asserts.
# * MinSizeRel: same as Release but optimizing for size rather than speed.
CTYPE=${CTYPE:-Release}
# compile scripts
CSCRIPTS=${CSCRIPTS:-static}
# compile modules
CMODULES=${CMODULES:-static}
# compile unit tests
CBUILD_TESTING=OFF
# use precompiled headers ( fatest compilation but not optimized if you change headers often )
CSCRIPTPCH=${CSCRIPTPCH:-ON}
CCOREPCH=${CCOREPCH:-ON}
# build apps list variable
CAPPS_BUILD=${CAPPS_BUILD:-all}
# build tools list variable
CTOOLS_BUILD=${CTOOLS_BUILD:-none}
# build apps list
CBUILD_APPS_LIST=${CBUILD_APPS_LIST:-''}
# build tools list
CBUILD_TOOLS_LIST=${CBUILD_TOOLS_LIST:-''}
# you can add your custom definitions here ( -D )
# example: CCUSTOMOPTIONS=" -DWITH_PERFTOOLS=ON
#
CCUSTOMOPTIONS=${CCUSTOMOPTIONS:-''}
# Enable ccache to speedup
# recompilations
#
AC_CCACHE=${AC_CCACHE:-false}
export CCACHE_DIR=${CCACHE_DIR:-"$AC_PATH_VAR/ccache"}
##############################################
#
# GOOGLE PERF TOOLS
#
# Repository: https://github.com/gperftools/gperftools#readme
# Documentation: https://gperftools.github.io/gperftools/
#
# Install (Ubuntu):
# sudo apt-get install google-perftools libgoogle-perftools-dev
# Note: dependencies above are already installed in docker
#
# Usage:
# 1. To enable the gperftools you need to compile with the -DWITH_PERFTOOLS=ON compiler flag. You can use CCUSTOMOPTIONS above to set it for the dashboard compiler
# 2. Configure the variable below accordingly to your needs
# 3. run the worldserver with the "./acore.sh run-worldserver"
# 4. run "killall -12 worldserver" This command will start the monitoring process. Run "killall -12 worldserver" again to stop the process when you want
# 5. At this time you will have the .prof file ready in the folder configured below.
# Run "google-pprof --callgrind <path/of/worldserver/bin> </path/of/prof/file>" This will generate a callgrind file that can be read with
# QCacheGrind, KCacheGrind and any other compatible tools
#
##############################################
# files used by gperftools to store monitored information
export CPUPROFILE=${CPUPROFILE:-"$BINPATH/logs/worldserver-cpu.prof"}
# heap profile is disabled by default. Uncomment this line to enable it
# export HEAPPROFILE=${HEAPPROFILE:-"$BINPATH/logs/worldserver-heap.prof"}
# signal to send to the kill command to start/stop the profiling process. kill -12
export CPUPROFILESIGNAL=${CPUPROFILESIGNAL:-12}
# How many interrupts/second the cpu-profiler samples.
#export CPUPROFILE_FREQUENCY=${CPUPROFILESIGNAL:-100}
# If set to any value (including 0 or the empty string), use ITIMER_REAL instead of ITIMER_PROF to gather profiles.
# In general, ITIMER_REAL is not as accurate as ITIMER_PROF, and also interacts badly with use of alarm(),
# so prefer ITIMER_PROF unless you have a reason prefer ITIMER_REAL.
#export CPUPROFILE_REALTIME=${CPUPROFILE_REALTIME}
# Other values for HEAPCHECK: minimal, normal (equivalent to "1"), strict, draconian
#export HEAPCHECK=${HEAPCHECK:-normal}

4
conf/dist/docker-compose.override.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
version: '3.8'
# services:
# ac-worldserver-2:

21
conf/dist/env.ac vendored Normal file
View File

@@ -0,0 +1,21 @@
#
# GENERAL
#
USER_CONF_PATH=/azerothcore/apps/docker/config-docker.sh
DATAPATH=/azerothcore/env/dist/data
#
# COMPILER
#
CTYPE=RelWithDebInfo
CSCRIPTS=static
AC_CCACHE=true
#
# SIMPLE RESTARTER
#
AC_RESTARTER_BINPATH=
AC_RESTARTER_BINFILE=
AC_RESTARTER_WITHGDB=

23
conf/dist/env.docker vendored Normal file
View File

@@ -0,0 +1,23 @@
#
# Create a .env file in the root folder and use the following
# variables to configure your docker compose
#
DOCKER_AC_ENV_FILE=
DOCKER_VOL_ETC=
DOCKER_VOL_LOGS=
DOCKER_VOL_DATA=
# Working only in ac-dev-server with dev profile
DOCKER_VOL_ROOT=
DOCKER_WORLD_EXTERNAL_PORT=
DOCKER_SOAP_EXTERNAL_PORT=
DOCKER_AUTH_EXTERNAL_PORT=
DOCKER_DB_EXTERNAL_PORT=
DOCKER_DB_ROOT_PASSWORD=
DOCKER_USER=
DOCKER_USER_ID=
DOCKER_GROUP_ID=