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 ""
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 ""
# Client
echo "Compiling the game client."
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 "Compressing jar into zip"
@@ -39,7 +41,8 @@ echo ""
# Launcher
echo "Compiling the game launcher."
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 "Copying result to Website/downloads/"

View File

@@ -108,7 +108,7 @@ if [ "$install" == "1" ]; then
echo "sudo ufw enable"
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 "${RED}1${NC} - Install for me!"
echo "${RED}2${NC} - Im all set"
@@ -118,7 +118,7 @@ if [ "$install" == "1" ]; then
# Ubuntu Java ===================================================>
if [ "$java" == "1" ]; then
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
continue
fi
@@ -147,7 +147,7 @@ if [ "$install" == "1" ]; then
firewall-cmd --reload
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 "${RED}1${NC} - Install for me!"
echo "${RED}2${NC} - Im all set"
@@ -156,7 +156,7 @@ if [ "$install" == "1" ]; then
# Fedora Java ===================================================>
if [ "$java" == "1" ]; then
sudo dnf -y install ant
sudo dnf -y install gradle ant
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
@@ -241,7 +241,7 @@ if [ "$install" == "1" ]; then
firewall-cmd --reload
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 "${RED}1${NC} - Install for me!"
echo "${RED}2${NC} - Im all set"
@@ -250,7 +250,7 @@ if [ "$install" == "1" ]; then
# CentOS 7 Java ===================================================>
if [ "$java" == "1" ]; then
sudo dnf -y install ant
sudo dnf -y install gradle ant
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
@@ -328,7 +328,7 @@ if [ "$install" == "1" ]; then
brew install unzip wget git curl zip screen
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 "${RED}1${NC} - Install for me!"
echo "${RED}2${NC} - Im all set"
@@ -338,7 +338,7 @@ if [ "$install" == "1" ]; then
# Mac Java ===================================================>
if [ "$java" == "1" ]; then
brew tap AdoptOpenJDK/openjdk
brew install adoptopenjdk-openjdk8
brew install adoptopenjdk-openjdk8 gradle ant
fi
# Mac Java <===================================================
@@ -402,7 +402,7 @@ if [ "$install" == "1" ]; then
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 "${RED}1${NC} - Install for me!"
echo "${RED}2${NC} - Im all set"
@@ -412,7 +412,7 @@ if [ "$install" == "1" ]; then
# Other OS Java ===================================================>
if [ "$java" == "1" ]; then
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
continue
fi

View File

@@ -17,12 +17,14 @@ echo ""
# Compile the game server and client
echo "Compiling the game client."
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 "Compiling the game server."
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 ""
@@ -31,7 +33,7 @@ echo "Removing old then extracting a fresh client cache to your home folder."
echo ""
sudo rm -rf ~/OpenRSC
mkdir ~/OpenRSC
unzip -o Game/client/cache.zip -d ~/OpenRSC
unzip -o Game/client/cache.zip -d ~/OpenRSC >/dev/null
echo ""
echo ""
@@ -55,12 +57,15 @@ echo ""
# Run the game client in a new window
echo "Launching the game client."
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 ""
# Run the game server in the current window
echo "Launching the game server."
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 ""

View File

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