eq2emu-linux-install.sh 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. #/bin/bash
  2. devn=$(cat /etc/os-release | grep "PRETTY_NAME" | sed 's/PRETTY_NAME=//g' | sed 's/["]//g' | awk '{print $1}')
  3. RED='\033[0;31m'
  4. NC='\033[0m'
  5. YELLOW='\033[1;33m'
  6. if [ $devn = "CentOS" ]
  7. then
  8. echo "CentOS is not currently supported";
  9. fi
  10. if [ $devn = "Ubuntu" ]
  11. then
  12. yes | apt install git make automake mariadb-server libsdl2-dev libmariadb-dev libboost-dev libboost-all-dev libreadline-dev cmake build-essential screen
  13. mkdir /home/eq2emu
  14. cd /home/eq2emu
  15. wget --quiet --no-check-certificate -O start_eq2emu.sh https://www.zeklabs.com/dl/start_eq2emu.sh
  16. chmod +x start_eq2emu.sh
  17. echo "[ Working dir (/home/eq2emu) created and Startup Script Downloaded ]"
  18. git clone http://cutpon.com:3000/devn00b/EQ2EMu.git
  19. cp -r /home/eq2emu/EQ2EMu/server /home/eq2emu
  20. cd EQ2EMu/EQ2/source/depends/recastnavigation/RecastDemo
  21. mkdir t
  22. cd t
  23. wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz
  24. tar xvfz premake-5.0.0-alpha15-linux.tar.gz
  25. mv premake5 ..
  26. cd ..
  27. rm -rf t
  28. chmod +x premake5
  29. ./premake5 gmake
  30. cd Build/gmake
  31. make -j$(nproc)
  32. cp lib/Debug/*.a /usr/lib
  33. cd ../../../..
  34. git clone https://github.com/fmtlib/fmt.git
  35. cd ../../../
  36. mkdir Linux
  37. cd EQ2/source/depends/fmt/include
  38. cp -R fmt /home/eq2emu/EQ2EMu/EQ2/source/common
  39. cd /home/eq2emu/EQ2EMu/EQ2/source/WorldServer
  40. make -j$(nproc)
  41. cp eq2world /home/eq2emu/server
  42. cd /home/eq2emu/EQ2EMu/EQ2/source/LoginServer
  43. make -j$(nproc)
  44. cp login /home/eq2emu/server
  45. cd /home/eq2emu/server
  46. echo " "
  47. echo " "
  48. echo -e "${RED}Install Complete, Follow the instructions below, unless you already have mysql setup${NC}"
  49. fi
  50. if [ $devn = "Debian" ]
  51. then
  52. yes | apt install git make automake mariadb-server libsdl2-dev libmariadb-dev libboost-dev libboost-all-dev libreadline-dev cmake build-essential screen
  53. mkdir /home/eq2emu
  54. cd /home/eq2emu
  55. wget --quiet --no-check-certificate -O start_eq2emu.sh https://www.zeklabs.com/dl/start_eq2emu.sh
  56. chmod +x start_eq2emu.sh
  57. echo "[ Working dir (/home/eq2emu) created and Startup Script Downloaded ]"
  58. git clone http://cutpon.com:3000/devn00b/EQ2EMu.git
  59. cp -r /home/eq2emu/EQ2EMu/server /home/eq2emu
  60. cd EQ2EMu/EQ2/source/depends/recastnavigation/RecastDemo
  61. mkdir t
  62. cd t
  63. wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz
  64. tar xvfz premake-5.0.0-alpha15-linux.tar.gz
  65. mv premake5 ..
  66. cd ..
  67. rm -rf t
  68. chmod +x premake5
  69. ./premake5 gmake
  70. cd Build/gmake
  71. make -j$(nproc)
  72. cp lib/Debug/*.a /usr/lib
  73. cd ../../../..
  74. git clone https://github.com/fmtlib/fmt.git
  75. cd ../../../
  76. mkdir Linux
  77. cd EQ2/source/depends/fmt/include
  78. cp -R fmt /home/eq2emu/EQ2EMu/EQ2/source/common
  79. cd /home/eq2emu/EQ2EMu/EQ2/source/WorldServer
  80. make -j$(nproc)
  81. cp eq2world /home/eq2emu/server
  82. cd /home/eq2emu/EQ2EMu/EQ2/source/LoginServer
  83. make -j$(nproc)
  84. cp login /home/eq2emu/server
  85. cd /home/eq2emu/server
  86. echo " "
  87. echo " "
  88. echo -e "${RED}Install Complete, Follow the instructions below, unless you already have mysql setup${NC}"
  89. fi
  90. if [ $devn = "Fedora" ]
  91. then
  92. yes | dnf install git make automake mariadb mariadb-server SDL2 SDL2-devel mesa-libGLU-devel boost boost-devel readline-devel mariadb-devel cmake make automake gcc gcc-c++ kernel-devel screen
  93. mkdir /home/eq2emu
  94. cd /home/eq2emu
  95. wget --quiet --no-check-certificate -O start_eq2emu.sh https://www.zeklabs.com/dl/start_eq2emu.sh
  96. chmod +x start_eq2emu.sh
  97. echo "[ Working dir (/home/eq2emu) created and Startup Script Downloaded ]"
  98. git clone http://cutpon.com:3000/devn00b/EQ2EMu.git
  99. cp -r /home/eq2emu/EQ2EMu/server /home/eq2emu
  100. cd EQ2EMu/EQ2/source/depends/recastnavigation/RecastDemo
  101. mkdir t
  102. cd t
  103. wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz
  104. tar xvfz premake-5.0.0-alpha15-linux.tar.gz
  105. mv premake5 ..
  106. cd ..
  107. rm -rf t
  108. chmod +x premake5
  109. ./premake5 gmake
  110. cd Build/gmake
  111. make -j$(nproc)
  112. cp lib/Debug/*.a /usr/lib
  113. cd ../../../..
  114. git clone https://github.com/fmtlib/fmt.git
  115. cd ../../../
  116. mkdir Linux
  117. cd EQ2/source/depends/fmt/include
  118. cp -R fmt /home/eq2emu/EQ2EMu/EQ2/source/common
  119. cd /home/eq2emu/EQ2EMu/EQ2/source/WorldServer
  120. make -j$(nproc)
  121. cp eq2world /home/eq2emu/server
  122. cd /home/eq2emu/EQ2EMu/EQ2/source/LoginServer
  123. make -j$(nproc)
  124. cp login /home/eq2emu/server
  125. cd /home/eq2emu/server
  126. echo " "
  127. echo " "
  128. echo -e "${RED}Install Complete, Follow the instructions below, unless you already have mysql setup${NC}"
  129. fi
  130. if [ $devn = "Manjaro" ]
  131. then
  132. pacman -S git make automake mariadb sdl2 boost-libs boost readline cmake base-devel screen
  133. mkdir /home/eq2emu
  134. cd /home/eq2emu
  135. wget --quiet --no-check-certificate -O start_eq2emu.sh https://www.zeklabs.com/dl/start_eq2emu.sh
  136. chmod +x start_eq2emu.sh
  137. echo "[ Working dir (/home/eq2emu) created and Startup Script Downloaded ]"
  138. git clone http://cutpon.com:3000/devn00b/EQ2EMu.git
  139. cp -r /home/eq2emu/EQ2EMu/server /home/eq2emu
  140. cd EQ2EMu/EQ2/source/depends/recastnavigation/RecastDemo
  141. mkdir t
  142. cd t
  143. wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz
  144. tar xvfz premake-5.0.0-alpha15-linux.tar.gz
  145. mv premake5 ..
  146. cd ..
  147. rm -rf t
  148. chmod +x premake5
  149. ./premake5 gmake
  150. cd Build/gmake
  151. make -j$(nproc)
  152. cp lib/Debug/*.a /usr/lib
  153. cd ../../../..
  154. git clone https://github.com/fmtlib/fmt.git
  155. cd ../../../
  156. mkdir Linux
  157. cd EQ2/source/depends/fmt/include
  158. cp -R fmt /home/eq2emu/EQ2EMu/EQ2/source/common
  159. cd /home/eq2emu/EQ2EMu/EQ2/source/WorldServer
  160. make -j$(nproc)
  161. cp eq2world /home/eq2emu/server
  162. cd /home/eq2emu/EQ2EMu/EQ2/source/LoginServer
  163. make -j$(nproc)
  164. cp login /home/eq2emu/server
  165. cd /home/eq2emu/server
  166. echo " "
  167. echo " "
  168. echo -e "${RED}Install Complete, Follow the instructions below, unless you already have mysql setup${NC}"
  169. fi
  170. if [ $devn = "Arch Linux" ]
  171. then
  172. pacman -S git make automake mariadb sdl2 boost-libs boost readline cmake base-devel screen
  173. mkdir /home/eq2emu
  174. cd /home/eq2emu
  175. wget --quiet --no-check-certificate -O start_eq2emu.sh https://www.zeklabs.com/dl/start_eq2emu.sh
  176. chmod +x start_eq2emu.sh
  177. echo "[ Working dir (/home/eq2emu) created and Startup Script Downloaded ]"
  178. git clone http://cutpon.com:3000/devn00b/EQ2EMu.git
  179. cp -r /home/eq2emu/EQ2EMu/server /home/eq2emu
  180. cd EQ2EMu/EQ2/source/depends/recastnavigation/RecastDemo
  181. mkdir t
  182. cd t
  183. wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz
  184. tar xvfz premake-5.0.0-alpha15-linux.tar.gz
  185. mv premake5 ..
  186. cd ..
  187. rm -rf t
  188. chmod +x premake5
  189. ./premake5 gmake
  190. cd Build/gmake
  191. make -j$(nproc)
  192. cp lib/Debug/*.a /usr/lib
  193. cd ../../../..
  194. git clone https://github.com/fmtlib/fmt.git
  195. cd ../../../
  196. mkdir Linux
  197. cd EQ2/source/depends/fmt/include
  198. cp -R fmt /home/eq2emu/EQ2EMu/EQ2/source/common
  199. cd /home/eq2emu/EQ2EMu/EQ2/source/WorldServer
  200. make -j$(nproc)
  201. cp eq2world /home/eq2emu/server
  202. cd /home/eq2emu/EQ2EMu/EQ2/source/LoginServer
  203. make -j$(nproc)
  204. cp login /home/eq2emu/server
  205. cd /home/eq2emu/server
  206. echo " "
  207. echo " "
  208. echo -e "${RED}Install Complete, Follow the instructions below, unless you already have mysql setup${NC}"
  209. fi
  210. echo " "
  211. echo " "
  212. echo -e "${YELLOW} Please be sure to create a mysql user with password, and empty database before continuing. "
  213. echo " "
  214. echo " The command to create a user from inside mysql is: "
  215. echo " grant all on *.* to YOURUSERNAMEHERE@'%' identified by 'YOURPASSWORDHERE'; "
  216. echo " Replace YOURUSERNAMEHERE and YOURPASSWORD here with your username/password "
  217. echo " "
  218. echo " then create a database using the following commnad: "
  219. echo " create database DATABASENAME; "
  220. echo -e " Once that is done you are then ready to run the startup script (/home/eq2emu/start_eq2emu.sh)${NC}"