Added an option to run utility.cmd programatically

And still pass arguments to Utility.exe without having to manually input them.
This commit is contained in:
penev92
2022-04-24 19:18:05 +03:00
committed by Paul Chote
parent c3c5dbfa35
commit 07ec2d03fb

View File

@@ -1,6 +1,23 @@
@echo off
title OpenRA.Utility.exe
set ENGINE_DIR=..
set argC=0
for %%x in (%*) do set /A argC+=1
if %argC% == 0 goto choosemod
if %argC% == 1 (
set mod=%1
goto help
)
if %argC% GEQ 2 (
@REM This option is for use by other scripts so we don't want any extra output here - before or after.
call bin\OpenRA.Utility.exe %*
EXIT /B 0
)
:choosemod
echo ----------------------------------------
echo.
@@ -20,7 +37,7 @@ goto choosemod
echo.
echo ----------------------------------------
echo.
echo OpenRA.Utility.exe %mod%
echo Starting OpenRA.Utility.exe %mod%
call bin\OpenRA.Utility.exe %mod%
:start
echo.
@@ -38,6 +55,6 @@ if /I "%command%" EQU "--mod" (goto choosemod)
echo.
echo ----------------------------------------
echo.
echo OpenRA.Utility.exe %mod% %command%
echo Starting OpenRA.Utility.exe %mod% %command%
call bin\OpenRA.Utility.exe %mod% %command%
goto start