@@ -114,16 +114,8 @@ fi
|
|||||||
#fi
|
#fi
|
||||||
|
|
||||||
# Run the game server in a detached screen
|
# Run the game server in a detached screen
|
||||||
echo ""
|
./Linux_Run_Production_Server.sh
|
||||||
echo ""
|
|
||||||
echo "Launching the game server in a new screen."
|
|
||||||
echo ""
|
|
||||||
echo "Type 'screen -r' to access the game server screen."
|
|
||||||
echo "Use CTRL + A + D to detach the live server screen so it runs in the background."
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
cd Game/server
|
|
||||||
screen -dmS name ./ant_launcher.sh
|
|
||||||
#cd ../../
|
#cd ../../
|
||||||
#touch current_md5sum.txt
|
#touch current_md5sum.txt
|
||||||
#tar -cf - Game | md5sum | grep -o '^[a-zA-Z0-9]*' > current_md5sum.txt
|
#tar -cf - Game | md5sum | grep -o '^[a-zA-Z0-9]*' > current_md5sum.txt
|
||||||
|
|||||||
@@ -519,9 +519,11 @@ if [ "$choice" == "1" ]; then
|
|||||||
sudo make import-game
|
sudo make import-game
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Open RSC setup complete!"
|
echo "Ready to launch \"./Linux_Single_Player.sh\" - Press enter when ready."
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
echo ""
|
||||||
|
read next
|
||||||
|
./Linux_Single_Player.sh
|
||||||
# 1. Set up for single player <===================================================
|
# 1. Set up for single player <===================================================
|
||||||
|
|
||||||
# 2. Deployment for a publicly hosted server ===================================================>
|
# 2. Deployment for a publicly hosted server ===================================================>
|
||||||
@@ -573,11 +575,11 @@ elif [ "$choice" == "2" ]; then
|
|||||||
sudo make stop && sudo make start
|
sudo make stop && sudo make start
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Ready to launch \"Run_Production_Linux_Game_Server.sh\" - Press enter when ready."
|
echo "Ready to launch \"./Linux_Fetch_Updates_Production.sh\" - Press enter when ready."
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
read next
|
read next
|
||||||
./Run_Production_Linux_Game_Server.sh
|
./Linux_Fetch_Updates_Production.sh
|
||||||
# 2. Deployment for a publicly hosted server <===================================================
|
# 2. Deployment for a publicly hosted server <===================================================
|
||||||
|
|
||||||
# 3. Backup ===================================================>
|
# 3. Backup ===================================================>
|
||||||
@@ -592,7 +594,7 @@ elif [ "$choice" == "3" ]; then
|
|||||||
echo "Done! - Press enter to return back to the menu."
|
echo "Done! - Press enter to return back to the menu."
|
||||||
echo ""
|
echo ""
|
||||||
read
|
read
|
||||||
./Setup_Linux_Mac.sh
|
./Linux_Installer.sh
|
||||||
# 3. Backup <===================================================
|
# 3. Backup <===================================================
|
||||||
|
|
||||||
# 4. Restore ===================================================>
|
# 4. Restore ===================================================>
|
||||||
@@ -607,7 +609,7 @@ elif [ "$choice" == "4" ]; then
|
|||||||
echo "Done! - Press enter to return back to the menu."
|
echo "Done! - Press enter to return back to the menu."
|
||||||
echo ""
|
echo ""
|
||||||
read
|
read
|
||||||
./Setup_Linux_Mac.sh
|
./Linux_Installer.sh
|
||||||
# 4. Restore <===================================================
|
# 4. Restore <===================================================
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -615,6 +617,6 @@ else
|
|||||||
echo "Error! ${RED}$choice${NC} is not a valid option. Press enter to try again."
|
echo "Error! ${RED}$choice${NC} is not a valid option. Press enter to try again."
|
||||||
echo ""
|
echo ""
|
||||||
read
|
read
|
||||||
./Setup_Linux_Mac.sh
|
./Linux_Installer.sh
|
||||||
fi
|
fi
|
||||||
# Selection <===================================================
|
# Selection <===================================================
|
||||||
|
|||||||
@@ -12,29 +12,22 @@ echo ""
|
|||||||
echo ""
|
echo ""
|
||||||
echo "Starting Docker containers."
|
echo "Starting Docker containers."
|
||||||
echo ""
|
echo ""
|
||||||
|
sudo make stop
|
||||||
sudo make start-single-player
|
sudo make start-single-player
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
cd Game
|
# Compile the game server and client
|
||||||
if git diff --name-only | grep -o '[a-zA-Z0-9]*.java' > /dev/null; then
|
echo "Compiling the game client."
|
||||||
|
echo ""
|
||||||
# Compile the game server and client
|
sudo ant -f "Game/client/build.xml" 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 ""
|
echo ""
|
||||||
echo "Compiling the game server."
|
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 cache if exists and 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."
|
||||||
@@ -45,34 +38,28 @@ unzip -o Game/client/cache.zip -d ~/OpenRSC >/dev/null
|
|||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
cd Game
|
#Import fresh version of config database
|
||||||
if git diff --name-only | grep -o '[a-zA-Z0-9]*.sql' > /dev/null; then
|
echo "Importing a fresh openrsc_config.sql database."
|
||||||
|
echo ""
|
||||||
|
sudo docker exec -i $(sudo docker-compose ps -q mysqldb) mysql -u"$MYSQL_ROOT_USER" -p"$MYSQL_ROOT_PASSWORD" < Game/Databases/openrsc_config.sql 2>/dev/null
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
#Import fresh version of config database
|
#Generate updated cache files, copies them to cache folder overwriting existing
|
||||||
echo "Importing a fresh openrsc_config.sql database."
|
echo "Generating cache .dat files from current config database and copying to client cache in your home folder."
|
||||||
echo ""
|
echo ""
|
||||||
sudo docker exec -i $(sudo docker-compose ps -q mysqldb) mysql -u"$MYSQL_ROOT_USER" -p"$MYSQL_ROOT_PASSWORD" < Game/Databases/openrsc_config.sql 2>/dev/null
|
sudo ant -f Game/server/build.xml npcs items objects > /dev/null
|
||||||
echo ""
|
yes | cp -rf Game/server/npcs.dat ~/OpenRSC/npcs.dat
|
||||||
echo ""
|
yes | cp -rf Game/server/objects.dat ~/OpenRSC/objects.dat
|
||||||
|
yes | cp -rf Game/server/items.dat ~/OpenRSC/items.dat
|
||||||
#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 ""
|
||||||
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 ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user