feat(bash): support for derivated distro + refactor conf (#3259)

* feat(bash): support for derivated distro

* refactor: refactoring for dist files
This commit is contained in:
Yehonal 2020-08-06 02:37:14 +02:00 committed by GitHub
parent a37ea1b60e
commit ad6ad094de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 39 additions and 9 deletions

17
conf/dist/config.cmake vendored Normal file
View file

@ -0,0 +1,17 @@
option(SERVERS "Build worldserver and authserver" 1)
option(SCRIPTS "Build core with scripts included" 1)
option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 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(WITH_MESHEXTRACTOR "Build meshextractor (alpha)" 0)
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
option(ENABLE_EXTRAS "Set to 0 to disable extra features optimizing performances" 1)
option(ENABLE_VMAP_CHECKS "Enable Checks relative to DisableMgr system on vmap" 1)
option(ENABLE_EXTRA_LOGS "Enable extra log functions that can be CPU intensive" 0)
# 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)

181
conf/dist/config.sh vendored Normal file
View file

@ -0,0 +1,181 @@
# 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="$AC_PATH_ROOT/var/build/obj"
# absolute path where binary files must be stored
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/"
##############################################
#
# 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=0
# enable/disable warnings during compilation
CWARNINGS=ON
# enable/disable some debug informations ( it's not a debug compilation )
CDEBUG=OFF
# specify compilation type
CTYPE=Release
# compile scripts
CSCRIPTS=ON
# compile server
CSERVERS=ON
# compile tools
CTOOLS=OFF
# use precompiled headers ( fatest compilation but not optimized if you change headers often )
CSCRIPTPCH=ON
CCOREPCH=ON
# Skip specific modules from compilation (cmake reconfigure needed)
# use semicolon ; to separate modules
CDISABLED_AC_MODULES=""
# you can add your custom definitions here ( -D )
# example: CCUSTOMOPTIONS=" -DWITH_PERFTOOLS=ON -DENABLE_EXTRA_LOGS=ON"
#
CCUSTOMOPTIONS=""
##############################################
#
# DB ASSEMBLER / EXPORTER CONFIGURATIONS
#
##############################################
#
# Basically you don't have to edit it
# but if you have another database you can add it here
# and create relative confiugurations below
#
DATABASES=(
"AUTH"
"CHARACTERS"
"WORLD"
)
OUTPUT_FOLDER="$AC_PATH_ROOT/env/dist/sql/"
####### BACKUP
# Set to true if you want to backup your azerothcore databases before importing the SQL with the db_assembler
# Do not forget to stop your database software (mysql) before doing so
BACKUP_ENABLE=false
BACKUP_FOLDER="$AC_PATH_ROOT/env/dist/sql/backup/"
#######
# FULL DB
DB_AUTH_PATHS=(
$SRCPATH"/data/sql/base/db_auth/"
)
DB_CHARACTERS_PATHS=(
$SRCPATH"/data/sql/base/db_characters"
)
DB_WORLD_PATHS=(
$SRCPATH"/data/sql/base/db_world/"
)
# UPDATES
DB_AUTH_UPDATES_PATHS=(
$SRCPATH"/data/sql/updates/db_auth/"
$SRCPATH"/data/sql/updates/pending_db_auth/"
)
DB_CHARACTERS_UPDATES_PATHS=(
$SRCPATH"/data/sql/updates/db_characters/"
$SRCPATH"/data/sql/updates/pending_db_characters/"
)
DB_WORLD_UPDATES_PATHS=(
$SRCPATH"/data/sql/updates/db_world/"
$SRCPATH"/data/sql/updates/pending_db_world/"
)
# CUSTOM
DB_AUTH_CUSTOM_PATHS=(
$SRCPATH"/data/sql/custom/db_auth/"
)
DB_CHARACTERS_CUSTOM_PATHS=(
$SRCPATH"/data/sql/custom/db_characters/"
)
DB_WORLD_CUSTOM_PATHS=(
$SRCPATH"/data/sql/custom/db_world/"
)
##############################################
#
# DB EXPORTER/IMPORTER CONFIGURATIONS
#
##############################################
#
# Skip import of base sql files to avoid
# table dropping
#
DB_SKIP_BASE_IMPORT_IF_EXISTS=true
#
# Example:
# "C:/Program Files/MySQL/MySQL Server 5.6/bin/mysql.exe"
# "/usr/bin/mysql"
# "mysql"
#
DB_MYSQL_EXEC="mysql"
DB_MYSQL_DUMP_EXEC="mysqldump"
DB_AUTH_CONF="MYSQL_USER='acore'; \
MYSQL_PASS='acore'; \
MYSQL_HOST='localhost';\
"
DB_CHARACTERS_CONF="MYSQL_USER='acore'; \
MYSQL_PASS='acore'; \
MYSQL_HOST='localhost';\
"
DB_WORLD_CONF="MYSQL_USER='acore'; \
MYSQL_PASS='acore'; \
MYSQL_HOST='localhost';\
"
DB_AUTH_NAME="acore_auth"
DB_CHARACTERS_NAME="acore_characters"
DB_WORLD_NAME="acore_world"