Merge branch 'develop21' of https://github.com/mangoszero/server into develop21

This commit is contained in:
Antz 2016-11-26 20:08:32 +00:00
commit 74f22b5a19
3 changed files with 104 additions and 42 deletions

View File

@ -120,54 +120,121 @@ function Log()
# Function to install prerequisite libraries # Function to install prerequisite libraries
function GetPrerequisites() function GetPrerequisites()
{ {
local OS_VER=0 # First, let's check that we have the necessary tools to define the OS version.
which lsb_release
if [ $? -ne 0 ]; then
Log "Cannot define your OS distribution and version." 1
return 0
fi
local OS=$(lsb_release -si)
local VER=$(lsb_release -sc)
local OS_VER=1
# Ask the user to continue # Ask the user to continue
$DLGAPP --backtitle "MaNGOS Linux Build Configuration" --title "Install Required Dependencies" \ $DLGAPP --backtitle "MaNGOS Linux Build Configuration" --title "Install Required Dependencies" \
--yesno "Would you like to install the required build and development packages?" 8 60 --yesno "Would you like to install the required build and development packages?" 8 60
# Check the suer's response # Check the user's response
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
Log "User declined to install required tools and development libraries." 1 Log "User declined to install required tools and development libraries." 1
return 0 return 0
fi
# Inform the user of the need for root access
$DLGAPP --backtitle "MaNGOS Linux Build Configuration" --title "Install Required Dependencies" \
--yesno "Installing packages requires root access, which you will be prompted for.\nDo you want to proceed?" 8 60
# Check the user's response
if [ $? -ne 0 ]; then
Log "User declined to proved root access for package installation." 1
return 0
fi fi
# Handle Debian OS # Handle OS
if [ -f "/etc/debian_version" ]; then case ${OS} in
# Inform the user of the need for root access "LinuxMint")
$DLGAPP --backtitle "MaNGOS Linux Build Configuration" --title "Install Required Dependencies" \ case ${VER} in
--yesno "Installing packages requires root access, which you will be prompted for.\nDo you want to proceed?" 8 60 "sarah")
# Linux Mint 18 - Ubuntu Xenial based
# Check the user's response su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.3.3 libssl-dev libmysqlclient-dev zlib1g-dev" root
if [ $? -ne 0 ]; then ;;
Log "User declined to proved root access for package installation." 1 "rosa")
return 0 # Linux Mint 17.3 - Ubuntu Trusty based
fi su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.0.3 libssl-dev libmysqlclient-dev zlib1g-dev" root
;;
# Grab the version of Debian installed on this system "rafaela")
OS_VER=`cat /etc/debian_version` # Linux Mint 17.2 - Ubuntu Trusty based
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.0.3 libssl-dev libmysqlclient-dev zlib1g-dev" root
# Check for a valid version ;;
if [ $(echo "$OS_VER < 6.0" | bc) -eq 1 ] || [ $(echo "$OS_VER >= 8.0" | bc) -eq 1 ]; then "rebecca")
Log "Error: Only Debian Squeeze and Wheezy are supported." 1 # Linux Mint 17.1 - Ubuntu Trusty based
return 1 su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.0.3 libssl-dev libmysqlclient-dev zlib1g-dev" root
fi ;;
"qiana")
# Handle Debian Wheezy # Linux Mint 17 - Ubuntu Trusty based
if [ $(echo "$OS_VER >= 7.0" | bc) -eq 1 ] && [ $(echo "$OS_VER < 8.0" | bc) -eq 1 ]; then su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.0.3 libssl-dev libmysqlclient-dev zlib1g-dev" root
# Install the prerequisite packages ;;
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.0.3 libssl-dev libmysqlclient-dev zlib1g-dev" root "maya")
fi # Linux Mint 13 - Ubuntu Precise based
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.0.1 libssl-dev libmysqlclient-dev zlib1g-dev" root
# Handle Debian Squeeze ;;
if [ $(echo "$OS_VER >= 6.0" | bc) -eq 1 ] && [ $(echo "$OS_VER < 7.0" | bc) -eq 1 ]; then "betsy")
# Install the prerequisite packages # LMDE 2 - Debian Jessie based
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-5.7.7 libssl-dev libmysqlclient-dev zlib1g-dev" root su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.2.8 libssl-dev libmysqlclient-dev zliblg-dev" root
fi ;;
fi *)
OS_VER=0
;;
esac
;;
"Ubuntu")
case ${VER} in
"precise")
# Ubuntu 12.04 LTS
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.0.1 libssl-dev libmysqlclient-dev zlib1g-dev" root
;;
"trusty")
# Ubuntu 14.04 LTS
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.0.3 libssl-dev libmysqlclient-dev zlib1g-dev" root
;;
"xenial")
# Ubuntu 16.04 LTS
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.3.3 libssl-dev libmysqlclient-dev zlib1g-dev" root
;;
"yakkety")
# Ubuntu 16.10
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.3.3 libssl-dev libmysqlclient-dev zlib1g-dev" root
;;
*)
OS_VER=0
;;
esac
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.3.3 libssl-dev libmysqlclient-dev zlib1g-dev" root
;;
"Debian")
case ${VER} in
"jessie")
# Debian 8.0 "current"
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.2.8 libssl-dev libmysqlclient-dev zliblg-dev" root
;;
"stretch")
# Debian Next
su -c "aptitude -y install build-essential linux-headers-$(uname -r) autoconf automake cmake libbz2-dev libace-dev libace-6.3.3 libssl-dev libmysqlclient-dev zliblg-dev" root
;;
*)
OS_VER=0
;;
esac
;;
*)
OS_VER=0
;;
esac
# See if a supported OS was detected # See if a supported OS was detected
if [ OS_VER -ne 0 ]; then if [ ${OS_VER} -ne 0 ]; then
# Log success # Log success
Log "The development tools and libraries have been installed!" 1 Log "The development tools and libraries have been installed!" 1
else else

View File

@ -1576,11 +1576,6 @@ void World::Update(uint32 diff)
// And last, but not least handle the issued cli commands // And last, but not least handle the issued cli commands
ProcessCliCommands(); ProcessCliCommands();
///- Used by Eluna
#ifdef ENABLE_ELUNA
sEluna->OnWorldUpdate(diff);
#endif /* ENABLE_ELUNA */
// cleanup unused GridMap objects as well as VMaps // cleanup unused GridMap objects as well as VMaps
sTerrainMgr.Update(diff); sTerrainMgr.Update(diff);
} }

@ -1 +1 @@
Subproject commit ca52c4938871132c2225752b9ef32c010e7de791 Subproject commit ca8a22023bc7f25856afe4c059cb5620972f0257