File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed
Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,32 @@ if not exist %ENGINE_DIRECTORY%\bin\OpenRA.exe goto noengine
1616> nul find %ENGINE_VERSION% %ENGINE_DIRECTORY% \VERSION || goto noengine
1717cd %ENGINE_DIRECTORY%
1818
19+ set argC = 0
20+ for %%x in (%* ) do set /A argC += 1
21+
22+ if %argC% == 0 goto choosemod
23+
24+ if %argC% == 1 (
25+ set MOD_ID = %1
26+ goto loop
27+ )
28+
29+ if %argC% GEQ 2 (
30+ @ REM This option is for use by other scripts so we don't want any extra output here - before or after.
31+ call bin\OpenRA.Utility.exe %*
32+ EXIT /B 0
33+ )
34+
35+ :choosemod
36+ echo ----------------------------------------
37+ echo .
38+ call bin\OpenRA.Utility.exe
39+ echo Enter --exit to exit
40+ set /P mod = " Please enter a modname: OpenRA.Utility.exe "
41+ if /I " %mod% " EQU " --exit" (exit /b)
42+ set MOD_ID = %mod%
43+ echo .
44+
1945:loop
2046echo .
2147echo ----------------------------------------
@@ -24,12 +50,12 @@ echo Enter a utility command or --exit to exit.
2450echo Press enter to view a list of valid utility commands.
2551echo .
2652
27- set /P command = Please enter a command: OpenRA.Utility.exe %MOD_ID%
53+ set /P command = " Please enter a command: OpenRA.Utility.exe %MOD_ID% "
2854if /I " %command% " EQU " --exit" (cd %TEMPLATE_DIR% & exit /b)
2955echo .
3056echo ----------------------------------------
3157echo .
32- echo OpenRA.Utility.exe %MOD_ID% %command%
58+ echo Starting OpenRA.Utility.exe %MOD_ID% %command%
3359call bin\OpenRA.Utility.exe %MOD_ID% %command%
3460goto loop
3561
You can’t perform that action at this time.
0 commit comments