GrassClipper/scripts/local_server_launch.cmd

29 lines
505 B
Batchfile
Raw Normal View History

2022-04-23 03:01:57 +00:00
@echo off
set GRASSCUTTER_JAR=%1
set GRASSCUTTER_JAR=%GRASSCUTTER_JAR:"=%
2022-05-02 02:43:57 +00:00
title Grasscutter
2022-04-23 07:32:54 +00:00
:: Get folder the jar is in
set "X=%GRASSCUTTER_JAR%"
:l
2022-05-02 02:43:57 +00:00
set IS_SLASH=false
if "%X:~-1%"=="\" set IS_SLASH=true
if "%X:~-1%"=="/" set IS_SLASH=true
if %IS_SLASH% equ true goto al
set "X=%X:~0,-1%"
goto l
2022-04-23 07:32:54 +00:00
:al
2022-05-02 02:43:57 +00:00
set "X=%X:~0,-1%"
set "GRASSCUTTER_ROOT=%X%"
2022-04-23 07:32:54 +00:00
2022-04-23 03:01:57 +00:00
echo Starting local Grasscutter server...
2022-04-23 06:45:43 +00:00
:: Change dir to server directory
2022-04-23 07:32:54 +00:00
cd /d "%GRASSCUTTER_ROOT%"
2022-04-23 06:45:43 +00:00
2022-04-26 02:32:01 +00:00
call java -jar %GRASSCUTTER_JAR%