Add/edit tool script templates for later install while building

main
Alex 4 months ago
parent e0d585c53a
commit dc7267744b

@ -0,0 +1,2 @@
@ECHO OFF
CALL serv.bat brokk-server.exe Brokk-Server %*

@ -19,6 +19,8 @@ set "login_running=false"
set "char_running=false"
set "web_running=false"
set "map_running=false"
set "brokk_running=false"
set "sindri_running=false"
if "%target%" == "status" (
@ -39,6 +41,8 @@ call :stopLogin
call :stopChar
call :stopWeb
call :stopMap
call :stopBrokk
call :stopSindri
goto :EOF
:Watch
@ -49,6 +53,8 @@ call :startLogin
call :startChar
call :startWeb
call :startMap
call :startBrokk
call :startSindri
goto :EOF
:Start
@ -58,6 +64,8 @@ call :startLogin
call :startChar
call :startWeb
call :startMap
call :startBrokk
call :startSindri
goto :EOF
:getStatus
@ -66,6 +74,8 @@ call :getLoginStatus
call :getCharStatus
call :getWebStatus
call :getMapStatus
call :getBrokkStatus
call :getSindriStatus
if "%login_running%" == "false" ( echo "login_serv is not running"
) else echo "login_serv is running pid=%LoginServPID%"
@ -75,6 +85,11 @@ if "%web_running%" == "false" ( echo "web_serv is not running"
) else echo "web_serv is running pid=%WebServPID%"
if "%map_running%" == "false" ( echo "map_serv is not running"
) else echo "map_serv is running pid=%MapServPID%"
if "%brokk_running%" == "false" ( echo "brokk_serv is not running"
) else echo "brokk_serv is running pid=%BrokkServPID%"
if "%sindri_running%" == "false" ( echo "sindri_serv is not running"
) else echo "sindri_serv is running pid=%SindriServPID%"
goto :EOF
@ -104,6 +119,15 @@ goto :EOF
call :getMapStatus
if "%map_running%" == "true" Taskkill /PID %MapServPID% /F
goto :EOF
:stopBrokk
call :getBrokkStatus
if "%brokk_running%" == "true" Taskkill /PID %BrokkServPID% /F
goto :EOF
:stopSindri
call :getSindriStatus
if "%sindri_running%" == "true" Taskkill /PID %SindriServPID% /F
goto :EOF
REM start sub targets
:startLogin
@ -129,6 +153,17 @@ call :getMapStatus
if "%map_running%" == "false" ( start cmd /k mapserv.bat %restart_mode%
) else echo "Map serv is already running, pid=%MapServPID%"
goto :EOF
:startBrokk
call :getBrokkStatus
if "%brokk_running%" == "false" ( start cmd /k brokkserv.bat %restart_mode%
) else echo "Brokk serv is already running, pid=%BrokkServPID%"
goto :EOF
:startSindri
call :getMapStatus
if "%sindri_running%" == "false" ( start cmd /k sindriserv.bat %restart_mode%
) else echo "Sindri serv is already running, pid=%SindriServPID%"
goto :EOF
REM status sub targets
@ -151,3 +186,13 @@ goto :EOF
for /F "TOKENS=1,2,*" %%a in ('tasklist /FI "IMAGENAME eq map-server.exe"') do set MapServPID=%%b
echo(%MapServPID%|findstr "^[-][1-9][0-9]*$ ^[1-9][0-9]*$ ^0$">nul&& set "map_running=true" || set "map_running=false"
goto :EOF
:getBrokkStatus
for /F "TOKENS=1,2,*" %%a in ('tasklist /FI "IMAGENAME eq brokk-server.exe"') do set BrokkServPID=%%b
echo(%BrokkServPID%|findstr "^[-][1-9][0-9]*$ ^[1-9][0-9]*$ ^0$">nul&& set "brokk_running=true" || set "brokk_running=false"
goto :EOF
:getSindriStatus
for /F "TOKENS=1,2,*" %%a in ('tasklist /FI "IMAGENAME eq sindri-server.exe"') do set SindriServPID=%%b
echo(%SindriServPID%|findstr "^[-][1-9][0-9]*$ ^[1-9][0-9]*$ ^0$">nul&& set "sindri_running=true" || set "sindri_running=false"
goto :EOF

@ -0,0 +1,2 @@
@ECHO OFF
CALL serv.bat sindri-server.exe Sindri-Server %*
Loading…
Cancel
Save