summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dockerignore2
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt2
-rw-r--r--apps/bash_shared/common.sh2
-rw-r--r--apps/compiler/README.md4
-rw-r--r--apps/db_assembler/README.md2
-rw-r--r--apps/installer/includes/functions.sh22
m---------apps/joiner0
-rw-r--r--conf/dist/config.cmake (renamed from conf/config.cmake.dist)0
-rw-r--r--conf/dist/config.sh (renamed from conf/config.sh.dist)9
-rw-r--r--docker/build/Dockerfile2
11 files changed, 38 insertions, 9 deletions
diff --git a/.dockerignore b/.dockerignore
index 56b63f6bac..b8e5ffbfe0 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -3,7 +3,7 @@ var/*
data/contrib/*
data/doc/*
conf/*
-!conf/*.dist
+!conf/dist
docker/worldserver/data/*
.idea
cmake-build-debug/*
diff --git a/.gitignore b/.gitignore
index b34616c77f..755983db24 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,7 @@
#
conf/*
-!conf/*.dist
+!conf/dist
apps/drassil/*
env/dist/*
env/user/*
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 31fe7915db..e266cbf48f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,7 +45,7 @@ include(deps/drassil/cmake-utils/utils.cmake)
include(src/cmake/ac_macros.cmake)
# set default buildoptions and print them
-include(conf/config.cmake.dist)
+include(conf/dist/config.cmake)
# load custom configurations for cmake if exists
if(EXISTS "${CMAKE_SOURCE_DIR}/conf/config.cmake")
diff --git a/apps/bash_shared/common.sh b/apps/bash_shared/common.sh
index 7b42858057..baeaae86c7 100644
--- a/apps/bash_shared/common.sh
+++ b/apps/bash_shared/common.sh
@@ -1,7 +1,7 @@
function registerHooks() { hwc_event_register_hooks "$@"; }
function runHooks() { hwc_event_run_hooks "$@"; }
-source "$AC_PATH_CONF/config.sh.dist" # "hack" to avoid missing conf variables
+source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables
if [ -f "$AC_PATH_CONF/config.sh" ]; then
source "$AC_PATH_CONF/config.sh" # should overwrite previous
diff --git a/apps/compiler/README.md b/apps/compiler/README.md
index a4759ee232..856ee5f870 100644
--- a/apps/compiler/README.md
+++ b/apps/compiler/README.md
@@ -1,7 +1,7 @@
## How to compile:
-first of all, if you need some custom configuration you have to copy and rename
-/conf/config.sh.dist in /conf/config.sh and configure it
+first of all, if you need some custom configuration you have to copy
+/conf/dist/config.sh in /conf/config.sh and configure it
* for a "clean" compilation you must run all scripts in their order:
diff --git a/apps/db_assembler/README.md b/apps/db_assembler/README.md
index 009ac7ce2a..865efc4542 100644
--- a/apps/db_assembler/README.md
+++ b/apps/db_assembler/README.md
@@ -4,7 +4,7 @@ This script allows you to assemble all sql files into one so you can easily impo
## How to use:
-First of all, if you need some custom configuration, you have to copy and rename `/conf/config.sh.dist` to `/conf/config.sh` and configure it. The file is here: https://github.com/azerothcore/azerothcore-wotlk/tree/master/conf
+First of all, if you need some custom configuration, you have to copy `/conf/dist/config.sh` to `/conf/config.sh` and configure it. The file is here: https://github.com/azerothcore/azerothcore-wotlk/tree/master/conf
_Read it because there are several options to configure._
diff --git a/apps/installer/includes/functions.sh b/apps/installer/includes/functions.sh
index 365afb6a3b..ca9cfe1c98 100644
--- a/apps/installer/includes/functions.sh
+++ b/apps/installer/includes/functions.sh
@@ -4,14 +4,34 @@ function inst_configureOS() {
solaris*) echo "Solaris is not supported yet" ;;
darwin*) source "$AC_PATH_INSTALLER/includes/os_configs/osx.sh" ;;
linux*)
+ # If $OSDISTRO is set, use this value (from config.sh)
+ if [ ! -z "$OSDISTRO" ]; then
+ DISTRO=$OSDISTRO
# If available, use LSB to identify distribution
- if [ -f /etc/lsb-release -o -d /etc/lsb-release.d ]; then
+ elif [ -f /etc/lsb-release -o -d /etc/lsb-release.d ]; then
DISTRO=$(lsb_release -i | cut -d: -f2 | sed s/'^\t'//)
# Otherwise, use release info file
else
DISTRO=$(ls -d /etc/[A-Za-z]*[_-][rv]e[lr]* | grep -v "lsb" | cut -d'/' -f3 | cut -d'-' -f1 | cut -d'_' -f1)
fi
+ case $DISTRO in
+ # add here distro that are debian or ubuntu based
+ # TODO: find a better way, maybe checking the existance
+ # of a package manager
+ "neon" | "ubuntu")
+ DISTRO="ubuntu"
+ ;;
+ "debian")
+ DISTRO="debian"
+ ;;
+ *)
+ echo "Distro: $DISTRO, is not supported. If your distribution is based on debian or ubuntu,
+ please set the 'OSDISTRO' environment variable to one of these distro (you can use config.sh file)"
+ ;;
+ esac
+
+
DISTRO=${DISTRO,,}
echo "Distro: $DISTRO"
diff --git a/apps/joiner b/apps/joiner
new file mode 160000
+Subproject ee8d5a2718d96423f3d873ae7703be2ecee96ae
diff --git a/conf/config.cmake.dist b/conf/dist/config.cmake
index 19e6c4c2aa..19e6c4c2aa 100644
--- a/conf/config.cmake.dist
+++ b/conf/dist/config.cmake
diff --git a/conf/config.sh.dist b/conf/dist/config.sh
index 5763809cc7..339b68073f 100644
--- a/conf/config.sh.dist
+++ b/conf/dist/config.sh
@@ -8,6 +8,15 @@ 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/"
diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile
index 28d98e10b8..325c6e9bed 100644
--- a/docker/build/Dockerfile
+++ b/docker/build/Dockerfile
@@ -6,7 +6,7 @@ RUN apt update && apt install -y git cmake make gcc g++ clang libmysqlclient-dev
# copy the sources from the host machine to the Docker container
ADD .git /azerothcore/.git
ADD deps /azerothcore/deps
-ADD conf/config.cmake.dist /azerothcore/conf/config.cmake.dist
+ADD conf/dist /azerothcore/conf/dist
ADD src /azerothcore/src
ADD modules /azerothcore/modules
ADD CMakeLists.txt /azerothcore/CMakeLists.txt