From febc9d3d3d8757b0f3aa3854753885ebfb993419 Mon Sep 17 00:00:00 2001 From: Warkdev Date: Thu, 24 Nov 2016 22:21:43 +0100 Subject: [PATCH 1/3] Adding support of several known Linux distribution for dependancies setup (#175) - Ubuntu "precise" 12.04 LTS - Ubuntu "trusty" 14.04 LTS - Ubuntu "xenial" 16.04 LTS - Ubuntu "yakkety" 16.10 - Debian "jessie" 8.0 - Debian "stretch" next - Linux Mint "maya" 13 - Linux Mint "qiana" 17 - Linux Mint "rebecca" 17.1 - Linux Mint "rafaela" 17.2 - Linux Mint "rosa" 17.3 - Linux Mint "sarah" 18 - LMDE "betsy" 2 --- linux/getmangos.sh | 139 +++++++++++++++++++++++++++++++++------------ 1 file changed, 103 insertions(+), 36 deletions(-) diff --git a/linux/getmangos.sh b/linux/getmangos.sh index ad9f9dc3..82d66964 100755 --- a/linux/getmangos.sh +++ b/linux/getmangos.sh @@ -120,54 +120,121 @@ function Log() # Function to install prerequisite libraries 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 $DLGAPP --backtitle "MaNGOS Linux Build Configuration" --title "Install Required Dependencies" \ --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 Log "User declined to install required tools and development libraries." 1 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 - # Handle Debian OS - if [ -f "/etc/debian_version" ]; then - # 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 - - # Grab the version of Debian installed on this system - OS_VER=`cat /etc/debian_version` - - # Check for a valid version - if [ $(echo "$OS_VER < 6.0" | bc) -eq 1 ] || [ $(echo "$OS_VER >= 8.0" | bc) -eq 1 ]; then - Log "Error: Only Debian Squeeze and Wheezy are supported." 1 - return 1 - fi - - # Handle Debian Wheezy - if [ $(echo "$OS_VER >= 7.0" | bc) -eq 1 ] && [ $(echo "$OS_VER < 8.0" | bc) -eq 1 ]; then - # 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 - fi - - # Handle Debian Squeeze - if [ $(echo "$OS_VER >= 6.0" | bc) -eq 1 ] && [ $(echo "$OS_VER < 7.0" | bc) -eq 1 ]; then - # Install the prerequisite packages - 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 - fi - fi + # Handle OS + case ${OS} in + "LinuxMint") + case ${VER} in + "sarah") + # Linux Mint 18 - Ubuntu Xenial based + 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 + ;; + "rosa") + # Linux Mint 17.3 - 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 + ;; + "rafaela") + # 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 + ;; + "rebecca") + # Linux Mint 17.1 - 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 + ;; + "qiana") + # Linux Mint 17 - 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 + ;; + "maya") + # 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 + ;; + "betsy") + # LMDE 2 - Debian Jessie based + 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 + ;; + *) + 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 - if [ OS_VER -ne 0 ]; then + if [ ${OS_VER} -ne 0 ]; then # Log success Log "The development tools and libraries have been installed!" 1 else From da6249e329a52e41e85ceca32ce2946891b35725 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Sat, 26 Nov 2016 21:50:45 +0200 Subject: [PATCH 2/3] Eluna update version --- src/modules/Eluna | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/Eluna b/src/modules/Eluna index ca52c493..ca8a2202 160000 --- a/src/modules/Eluna +++ b/src/modules/Eluna @@ -1 +1 @@ -Subproject commit ca52c4938871132c2225752b9ef32c010e7de791 +Subproject commit ca8a22023bc7f25856afe4c059cb5620972f0257 From 6c9cc76139f9eef7cab324f0d2540c1df9aa2fc9 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Sat, 26 Nov 2016 21:58:24 +0200 Subject: [PATCH 3/3] Fix duplicate timer update - This may require you to change CreateLuaEvent timers to half of what they were --- src/game/WorldHandlers/World.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/game/WorldHandlers/World.cpp b/src/game/WorldHandlers/World.cpp index bc86461c..de7f27fb 100644 --- a/src/game/WorldHandlers/World.cpp +++ b/src/game/WorldHandlers/World.cpp @@ -1576,11 +1576,6 @@ void World::Update(uint32 diff) // And last, but not least handle the issued cli commands ProcessCliCommands(); - ///- Used by Eluna -#ifdef ENABLE_ELUNA - sEluna->OnWorldUpdate(diff); -#endif /* ENABLE_ELUNA */ - // cleanup unused GridMap objects as well as VMaps sTerrainMgr.Update(diff); }