forked from k1ngzo/RS-2009
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-singleplayer.bat
40 lines (33 loc) · 1.21 KB
/
build-singleplayer.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@echo off
mkdir Single-Player
echo Building Client...
cd Client
call gradle jar
cd ..
copy /Y "Client\build\libs\client-1.0.0.jar" "Single-Player\client.jar"
echo.
echo Building Management-Server...
cd Management-Server
call gradle jar
cd ..
copy /Y "Management-Server\build\libs\managementserver-1.0.0.jar" "Single-Player\ms.jar"
echo.
echo Building Server...
cd Server
call gradle jar
cd ..
copy /Y "Server\build\libs\server-1.0.0.jar" "Single-Player\server.jar"
echo.
echo Copying server data...
del /S /Q "Single-Player/data"
xcopy /E /I /Y "Server\data" "Single-Player\data"
xcopy /E /I /Y "Server\db_exports\*.sql" "Single-Player\data"
del /S /Q "Single-Player/worldprops"
xcopy /E /I /Y "Server\worldprops" "Single-Player\worldprops"
: Set Debug/Dev mode to false on single player server config
powershell -Command "(gc Single-Player\worldprops\default.json) -replace '\"debug\": true', '\"debug\": false' -replace '\"dev\": true', '\"dev\": false' | Out-File -Encoding Default Single-Player\worldprops\default.json"
: Replace Live server addresses with localhost
powershell -Command "(gc Client\config.json) -replace 'play.2009scape.org', 'localhost' | Out-File -Encoding Default Single-Player\config.json"
echo.
echo Done!
pause