-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.bat
105 lines (98 loc) · 2.47 KB
/
setup.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
@echo off
set /p path=<MSBuildPath.txt
:menu
set mode=nul
cls
echo all //.. Build 2 projects, clean and release in /MobileServer!
echo srv //.. Build TerrariaServerAPI
echo shk //.. Build TShockAPI
echo rls //.. Release in \MobileServer!
echo run //.. Run \MobileServer\TerrariaServer.exe with DEBUG.wld
echo exit/off
set /p mode= Enter command:
cls
if "%mode%"=="all" goto all
if "%mode%"=="srv" goto srv
if "%mode%"=="shk" goto shk
if "%mode%"=="rls" goto rls
if "%mode%"=="run" goto debug
if "%mode%"=="un" goto debug
if "%mode%"=="exit" goto exit
if "%mode%"=="off" goto exit
echo "Invalid input"
echo ...
pause >nul
goto menu
:debug
if not exist MobileServer goto relf
cd MobileServer
if not exist DEBUG\DEBUG.wld (
mkdir DEBUG
copy ..\DEBUG\DEBUG.wld DEBUG\DEBUG.wld /y
cls
echo DEBUG directory created...
pause >nul
)
TerrariaServer.exe -port 7777 -world DEBUG\DEBUG.wld
cls
cd ..\
goto menu
:relf
echo You need a release before you can use this command!
echo ...
pause >nul
goto menu
:all
echo Press any key to Build all projects and pack the Release!
echo ...
pause >nul
:srv
RMDIR /S /Q TerrariaServerAPI\TerrariaServerAPI\bin
%path% TerrariaServerAPI\TerrariaServerAPI\TerrariaServerAPI.csproj /t:rebuild
if "%mode%"=="all" goto shk
echo ...
pause >nul
goto menu
:shk
if not exist TerrariaServerAPI\TerrariaServerAPI\bin goto bsapif
RMDIR /S /Q TShockAPI\bin
%path% TShockAPI\TShockAPI.csproj /t:rebuild
if not "%mode%"=="all" goto shka
echo Press any key to continue!
pause >nul
goto rls
:shka
echo ...
pause >nul
goto menu
:bsapif
echo You need to build TerrariaServerAPI before you can use this command!
echo ...
pause >nul
goto menu
:rls
if not exist TShockAPI\bin goto btapif
RMDIR /S /Q MobileServer
mkdir MobileServer
mkdir MobileServer\ServerPlugins
mkdir MobileServer\Worlds
%systemroot%\System32\robocopy PB\ MobileServer /E
move TShockAPI\bin\Debug\BCrypt.Net.dll MobileServer\ServerPlugins
move TShockAPI\bin\Debug\HttpServer.dll MobileServer\ServerPlugins
move TShockAPI\bin\Debug\Mono.Data.Sqlite.dll MobileServer\ServerPlugins
move TShockAPI\bin\Debug\MySql.Data.dll MobileServer\ServerPlugins
move TShockAPI\bin\Debug\TShockAPI.dll MobileServer\ServerPlugins
move TShockAPI\bin\Debug\Newtonsoft.Json.dll MobileServer
move TShockAPI\bin\Debug\OTAPI.dll MobileServer
move TShockAPI\bin\Debug\TerrariaServer.exe MobileServer
echo Release cleanup complete!
echo ...
pause >nul
goto menu
:btapif
echo You need to build TShockAPI before you can use this command!
echo ...
pause >nul
goto menu
:exit
exit