Removal of Gradle until needed, adds extra overhead.
This commit is contained in:
@@ -117,7 +117,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 Gradle installed already? It is required for this."
|
echo "Do you have Oracle Java JDK 8 and Ant 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"
|
||||||
@@ -130,7 +130,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 gradle ant oracle-java8-set-default openjfx -y
|
sudo add-apt-repository ppa:webupd8team/java -y && sudo apt update && sudo apt install ant oracle-java8-set-default openjfx -y
|
||||||
else
|
else
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
@@ -159,7 +159,7 @@ if [ "$install" == "1" ]; then
|
|||||||
firewall-cmd --reload
|
firewall-cmd --reload
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Do you have Oracle Java JDK 8 and Gradle installed already? It is required for this."
|
echo "Do you have Oracle Java JDK 8 and Ant 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"
|
||||||
@@ -171,7 +171,7 @@ if [ "$install" == "1" ]; then
|
|||||||
|
|
||||||
# Fedora Java ===================================================>
|
# Fedora Java ===================================================>
|
||||||
if [ "$java" == "1" ]; then
|
if [ "$java" == "1" ]; then
|
||||||
sudo dnf -y install gradle ant openjfx
|
sudo dnf -y install ant openjfx
|
||||||
wget --no-cookies \
|
wget --no-cookies \
|
||||||
--no-check-certificate \
|
--no-check-certificate \
|
||||||
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
||||||
@@ -259,7 +259,7 @@ if [ "$install" == "1" ]; then
|
|||||||
firewall-cmd --reload
|
firewall-cmd --reload
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Do you have Oracle Java JDK 8 and Gradle installed already? It is required for this."
|
echo "Do you have Oracle Java JDK 8 and Ant 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"
|
||||||
@@ -271,7 +271,7 @@ if [ "$install" == "1" ]; then
|
|||||||
|
|
||||||
# CentOS 7 Java ===================================================>
|
# CentOS 7 Java ===================================================>
|
||||||
if [ "$java" == "1" ]; then
|
if [ "$java" == "1" ]; then
|
||||||
sudo dnf -y install gradle ant openjfx
|
sudo dnf -y install ant openjfx
|
||||||
wget --no-cookies \
|
wget --no-cookies \
|
||||||
--no-check-certificate \
|
--no-check-certificate \
|
||||||
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
|
||||||
@@ -355,7 +355,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 Gradle installed already? It is required for this."
|
echo "Do you have Oracle Java JDK 8 and Ant 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"
|
||||||
@@ -368,7 +368,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 gradle ant openjfx
|
brew install adoptopenjdk-openjdk8 ant openjfx
|
||||||
fi
|
fi
|
||||||
# Mac Java <===================================================
|
# Mac Java <===================================================
|
||||||
|
|
||||||
@@ -438,7 +438,7 @@ if [ "$install" == "1" ]; then
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Do you have Oracle Java JDK 8 and Gradle installed already? It is required for this. If it fails, install manually."
|
echo "Do you have Oracle Java JDK 8 and Ant 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"
|
||||||
@@ -451,7 +451,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 gradle ant oracle-java8-set-default openjfx -y
|
sudo add-apt-repository ppa:webupd8team/java -y && sudo apt update && sudo apt install ant oracle-java8-set-default openjfx -y
|
||||||
else
|
else
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ goto doinstall
|
|||||||
|
|
||||||
:installjava
|
:installjava
|
||||||
echo:
|
echo:
|
||||||
echo Installing Oracle Java JDK 8 and Gradle.
|
echo Installing Oracle Java JDK 8 and Ant.
|
||||||
echo:
|
echo:
|
||||||
choco install -y jdk8 gradle ant
|
choco install -y jdk8 ant
|
||||||
echo:
|
echo:
|
||||||
echo:
|
echo:
|
||||||
goto askdocker
|
goto askdocker
|
||||||
|
|||||||
@@ -14,22 +14,28 @@ sudo make start-single-player
|
|||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Compile the game server and client
|
cd Game
|
||||||
echo "Compiling the game client."
|
if git diff --name-only | grep -o '[a-zA-Z0-9]*.java' > /dev/null; then
|
||||||
echo ""
|
|
||||||
#sudo ant -f Game/client/build.xml compile
|
# Compile the game server and client
|
||||||
sudo gradle -b Game/client/build.gradle compile
|
echo "Compiling the game client."
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
sudo ant -f "client/build.xml" compile
|
||||||
echo "Compiling the game server."
|
#sudo gradle -b "client/build.gradle" compile
|
||||||
echo ""
|
echo ""
|
||||||
#sudo ant -f Game/server/build.xml compile
|
echo ""
|
||||||
sudo gradle -b Game/server/build.gradle compile
|
echo "Compiling the game server."
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
sudo ant -f "server/build.xml" compile
|
||||||
|
#sudo gradle -b "server/build.gradle" compile
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
fi
|
||||||
|
cd ../
|
||||||
|
|
||||||
#Create game cache
|
#Create game cache
|
||||||
echo "Removing old then extracting a fresh client cache to your home folder."
|
echo "Removing old cache if exists and then extracting a fresh client cache to your home folder."
|
||||||
echo ""
|
echo ""
|
||||||
sudo rm -rf ~/OpenRSC
|
sudo rm -rf ~/OpenRSC
|
||||||
mkdir ~/OpenRSC
|
mkdir ~/OpenRSC
|
||||||
@@ -37,28 +43,34 @@ unzip -o Game/client/cache.zip -d ~/OpenRSC >/dev/null
|
|||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
#Import fresh version of config database
|
cd Game
|
||||||
echo "Importing a fresh openrsc_config.sql database."
|
if git diff --name-only | grep -o '[a-zA-Z0-9]*.sql' > /dev/null; then
|
||||||
echo ""
|
|
||||||
sudo docker exec -i $(sudo docker-compose ps -q mysqldb) mysql -u"root" -p"root" < Game/Databases/openrsc_config.sql 2>/dev/null
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
#Generate updated cache files, copies them to cache folder overwriting existing
|
#Import fresh version of config database
|
||||||
echo "Generating cache .dat files from current config database and copying to client cache in your home folder."
|
echo "Importing a fresh openrsc_config.sql database."
|
||||||
echo ""
|
echo ""
|
||||||
sudo ant -f Game/server/build.xml npcs items objects > /dev/null
|
sudo docker exec -i $(sudo docker-compose ps -q mysqldb) mysql -u"root" -p"root" < Game/Databases/openrsc_config.sql 2>/dev/null
|
||||||
yes | cp -rf Game/server/npcs.dat ~/OpenRSC/npcs.dat
|
echo ""
|
||||||
yes | cp -rf Game/server/objects.dat ~/OpenRSC/objects.dat
|
echo ""
|
||||||
yes | cp -rf Game/server/items.dat ~/OpenRSC/items.dat
|
|
||||||
echo ""
|
#Generate updated cache files, copies them to cache folder overwriting existing
|
||||||
echo ""
|
echo "Generating cache .dat files from current config database and copying to client cache in your home folder."
|
||||||
|
echo ""
|
||||||
|
sudo ant -f Game/server/build.xml npcs items objects > /dev/null
|
||||||
|
yes | cp -rf Game/server/npcs.dat ~/OpenRSC/npcs.dat
|
||||||
|
yes | cp -rf Game/server/objects.dat ~/OpenRSC/objects.dat
|
||||||
|
yes | cp -rf Game/server/items.dat ~/OpenRSC/items.dat
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
fi
|
||||||
|
cd ../
|
||||||
|
|
||||||
# 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 &
|
#java -jar Game/client/Open_RSC_Client.jar &
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|||||||
@@ -17,12 +17,12 @@ echo:
|
|||||||
|
|
||||||
REM Compile the game server and client:
|
REM Compile the game server and client:
|
||||||
echo Compiling the game client.
|
echo Compiling the game client.
|
||||||
echo:
|
echo:
|
||||||
call ant -f Game/client/build.xml compile
|
call ant -f Game/client/build.xml compile
|
||||||
echo:
|
echo:
|
||||||
echo:
|
echo:
|
||||||
echo Compiling the game server.
|
echo Compiling the game server.
|
||||||
echo:
|
echo:
|
||||||
call ant -f Game/server/build.xml compile
|
call ant -f Game/server/build.xml compile
|
||||||
echo:
|
echo:
|
||||||
echo:
|
echo:
|
||||||
@@ -45,7 +45,7 @@ echo:
|
|||||||
|
|
||||||
REM Generate updated cache files, copies them to cache folder overwriting existing:
|
REM Generate updated cache files, copies them to cache folder overwriting existing:
|
||||||
echo Generating cache .dat files from current config database and copying to client cache in your home folder.
|
echo Generating cache .dat files from current config database and copying to client cache in your home folder.
|
||||||
echo:
|
echo:
|
||||||
call sudo ant -f Game/server/build.xml npcs items objects > NULL
|
call sudo ant -f Game/server/build.xml npcs items objects > NULL
|
||||||
xcopy /y "Game/server/npcs.dat" "%HOMEPATH%/OpenRSC/npcs.dat"
|
xcopy /y "Game/server/npcs.dat" "%HOMEPATH%/OpenRSC/npcs.dat"
|
||||||
xcopy /y "Game/server/objects.dat" "%HOMEPATH%/OpenRSC/objects.dat"
|
xcopy /y "Game/server/objects.dat" "%HOMEPATH%/OpenRSC/objects.dat"
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ echo ""
|
|||||||
echo "Console output is being saved to gameserver.log"
|
echo "Console output is being saved to gameserver.log"
|
||||||
echo ""
|
echo ""
|
||||||
cd Game/server
|
cd Game/server
|
||||||
java -jar Open_RSC_Server.jar > ../../gameserver.log
|
java -jar "Open_RSC_Server.jar" > ../../gameserver.log
|
||||||
|
|||||||
Reference in New Issue
Block a user