Gradle conversion, script cleanup

This commit is contained in:
Marwolf
2018-08-11 13:00:44 -04:00
parent d4d3f83aac
commit 171aa9e3e4
4 changed files with 28 additions and 19 deletions

View File

@@ -12,14 +12,16 @@ echo ""
echo "Compiling the game server." echo "Compiling the game server."
echo "" echo ""
echo "" echo ""
sudo ant -f Game/server/build.xml compile #sudo ant -f Game/server/build.xml compile
sudo gradle -b Game/server/build.gradle compile
echo "" echo ""
echo "" echo ""
# Client # Client
echo "Compiling the game client." echo "Compiling the game client."
echo "" echo ""
sudo ant -f "Game/client/build.xml" compile #sudo ant -f "Game/client/build.xml" compile
sudo gradle -b Game/client/build.gradle compile
echo "" echo ""
echo "" echo ""
echo "Compressing jar into zip" echo "Compressing jar into zip"
@@ -39,7 +41,8 @@ echo ""
# Launcher # Launcher
echo "Compiling the game launcher." echo "Compiling the game launcher."
echo "" echo ""
sudo ant -f "Game/Launcher/build.xml" #sudo ant -f "Game/Launcher/build.xml" jar
sudo gradle -b Game/Launcher/build.gradle jar
echo "" echo ""
echo "" echo ""
echo "Copying result to Website/downloads/" echo "Copying result to Website/downloads/"

View File

@@ -108,7 +108,7 @@ if [ "$install" == "1" ]; then
echo "sudo ufw enable" echo "sudo ufw enable"
echo "" echo ""
echo "" echo ""
echo "Do you have Oracle Java JDK 8 and Apache Ant installed already? It is required for this." echo "Do you have Oracle Java JDK 8 and Gradle installed already? It is required for this."
echo "" echo ""
echo "${RED}1${NC} - Install for me!" echo "${RED}1${NC} - Install for me!"
echo "${RED}2${NC} - Im all set" echo "${RED}2${NC} - Im all set"
@@ -118,7 +118,7 @@ if [ "$install" == "1" ]; then
# Ubuntu Java ===================================================> # Ubuntu Java ===================================================>
if [ "$java" == "1" ]; then if [ "$java" == "1" ]; then
sudo apt-get remove openjdk-6-jre default-jre default-jre-headless -y sudo apt-get remove openjdk-6-jre default-jre default-jre-headless -y
sudo add-apt-repository ppa:webupd8team/java -y && sudo apt update && sudo apt install ant oracle-java8-set-default -y sudo add-apt-repository ppa:webupd8team/java -y && sudo apt update && sudo apt install gradle ant oracle-java8-set-default -y
else else
continue continue
fi fi
@@ -147,7 +147,7 @@ if [ "$install" == "1" ]; then
firewall-cmd --reload firewall-cmd --reload
echo "" echo ""
echo "" echo ""
echo "Do you have Oracle Java JDK 8 and Apache Ant installed already? It is required for this." echo "Do you have Oracle Java JDK 8 and Gradle installed already? It is required for this."
echo "" echo ""
echo "${RED}1${NC} - Install for me!" echo "${RED}1${NC} - Install for me!"
echo "${RED}2${NC} - Im all set" echo "${RED}2${NC} - Im all set"
@@ -156,7 +156,7 @@ if [ "$install" == "1" ]; then
# Fedora Java ===================================================> # Fedora Java ===================================================>
if [ "$java" == "1" ]; then if [ "$java" == "1" ]; then
sudo dnf -y install ant sudo dnf -y install gradle ant
wget --no-cookies \ wget --no-cookies \
--no-check-certificate \ --no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ --header "Cookie: oraclelicense=accept-securebackup-cookie" \
@@ -241,7 +241,7 @@ if [ "$install" == "1" ]; then
firewall-cmd --reload firewall-cmd --reload
echo "" echo ""
echo "" echo ""
echo "Do you have Oracle Java JDK 8 and Apache Ant installed already? It is required for this." echo "Do you have Oracle Java JDK 8 and Gradle installed already? It is required for this."
echo "" echo ""
echo "${RED}1${NC} - Install for me!" echo "${RED}1${NC} - Install for me!"
echo "${RED}2${NC} - Im all set" echo "${RED}2${NC} - Im all set"
@@ -250,7 +250,7 @@ if [ "$install" == "1" ]; then
# CentOS 7 Java ===================================================> # CentOS 7 Java ===================================================>
if [ "$java" == "1" ]; then if [ "$java" == "1" ]; then
sudo dnf -y install ant sudo dnf -y install gradle ant
wget --no-cookies \ wget --no-cookies \
--no-check-certificate \ --no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ --header "Cookie: oraclelicense=accept-securebackup-cookie" \
@@ -328,7 +328,7 @@ if [ "$install" == "1" ]; then
brew install unzip wget git curl zip screen brew install unzip wget git curl zip screen
echo "" echo ""
echo "" echo ""
echo "Do you have Oracle Java JDK 8 and Apache Ant installed already? It is required for this." echo "Do you have Oracle Java JDK 8 and Gradle installed already? It is required for this."
echo "" echo ""
echo "${RED}1${NC} - Install for me!" echo "${RED}1${NC} - Install for me!"
echo "${RED}2${NC} - Im all set" echo "${RED}2${NC} - Im all set"
@@ -338,7 +338,7 @@ if [ "$install" == "1" ]; then
# Mac Java ===================================================> # Mac Java ===================================================>
if [ "$java" == "1" ]; then if [ "$java" == "1" ]; then
brew tap AdoptOpenJDK/openjdk brew tap AdoptOpenJDK/openjdk
brew install adoptopenjdk-openjdk8 brew install adoptopenjdk-openjdk8 gradle ant
fi fi
# Mac Java <=================================================== # Mac Java <===================================================
@@ -402,7 +402,7 @@ if [ "$install" == "1" ]; then
echo "" echo ""
echo "" echo ""
echo "Do you have Oracle Java JDK 8 and Apache Ant installed already? It is required for this. If it fails, install manually." echo "Do you have Oracle Java JDK 8 and Gradle installed already? It is required for this. If it fails, install manually."
echo "" echo ""
echo "${RED}1${NC} - Install for me!" echo "${RED}1${NC} - Install for me!"
echo "${RED}2${NC} - Im all set" echo "${RED}2${NC} - Im all set"
@@ -412,7 +412,7 @@ if [ "$install" == "1" ]; then
# Other OS Java ===================================================> # Other OS Java ===================================================>
if [ "$java" == "1" ]; then if [ "$java" == "1" ]; then
sudo apt-get remove openjdk-6-jre default-jre default-jre-headless -y sudo apt-get remove openjdk-6-jre default-jre default-jre-headless -y
sudo add-apt-repository ppa:webupd8team/java -y && sudo apt update && sudo apt install ant oracle-java8-set-default -y sudo add-apt-repository ppa:webupd8team/java -y && sudo apt update && sudo apt install gradle ant oracle-java8-set-default -y
else else
continue continue
fi fi

View File

@@ -17,12 +17,14 @@ echo ""
# Compile the game server and client # Compile the game server and client
echo "Compiling the game client." echo "Compiling the game client."
echo "" echo ""
sudo ant -f Game/client/build.xml compile #sudo ant -f Game/client/build.xml compile
sudo gradle -b Game/client/build.gradle compile
echo "" echo ""
echo "" echo ""
echo "Compiling the game server." echo "Compiling the game server."
echo "" echo ""
sudo ant -f Game/server/build.xml compile #sudo ant -f Game/server/build.xml compile
sudo gradle -b Game/server/build.gradle compile
echo "" echo ""
echo "" echo ""
@@ -31,7 +33,7 @@ echo "Removing old then extracting a fresh client cache to your home folder."
echo "" echo ""
sudo rm -rf ~/OpenRSC sudo rm -rf ~/OpenRSC
mkdir ~/OpenRSC mkdir ~/OpenRSC
unzip -o Game/client/cache.zip -d ~/OpenRSC unzip -o Game/client/cache.zip -d ~/OpenRSC >/dev/null
echo "" echo ""
echo "" echo ""
@@ -55,12 +57,15 @@ echo ""
# Run the game client in a new window # Run the game client in a new window
echo "Launching the game client." echo "Launching the game client."
echo "" echo ""
ant -f Game/client/build.xml runclient & #ant -f Game/client/build.xml runclient &
java -jar Game/client/Open_RSC_Client.jar &
echo "" echo ""
echo "" echo ""
# Run the game server in the current window # Run the game server in the current window
echo "Launching the game server." echo "Launching the game server."
echo "" echo ""
ant -f Game/server/build.xml runserver #ant -f Game/server/build.xml runserver
cd Game/server
java -jar Open_RSC_Server.jar
echo "" echo ""

View File

@@ -7,4 +7,5 @@ echo "CTRL + A + D to detach the screen so this continues in the background."
echo "" echo ""
echo "Console output is being saved to gameserver.log" echo "Console output is being saved to gameserver.log"
echo "" echo ""
ant -f Game/server/build.xml runserver > gameserver.log cd Game/server
java -jar Open_RSC_Server.jar > gameserver.log