6 Star 16 Fork 1

Castle/TiberianAurora

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
utility.cmd 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
Castle 提交于 2021-03-03 03:00 . <支持>修复utility脚本中的错误
@echo off
setlocal EnableDelayedExpansion
FOR /F "tokens=1,2 delims==" %%A IN (mod.config) DO (set %%A=%%B)
if exist user.config (FOR /F "tokens=1,2 delims==" %%A IN (user.config) DO (set %%A=%%B))
set MOD_SEARCH_PATHS=%~dp0mods,%~dp0engine\mods
set ENGINE_DIR=%~dp0engine
if "!MOD_ID!" == "" goto badconfig
if "!ENGINE_VERSION!" == "" goto badconfig
if "!ENGINE_DIRECTORY!" == "" goto badconfig
title bin\OpenRA.Utility.exe %MOD_ID%
set TEMPLATE_DIR=%CD%
if not exist %ENGINE_DIRECTORY%\bin\OpenRA.exe goto noengine
>nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\VERSION || goto noengine
cd %ENGINE_DIRECTORY%
:loop
echo.
echo ----------------------------------------
echo.
echo Enter a utility command or --exit to exit.
echo Press enter --help to view a list of valid utility commands.
echo.
set /P command=Please enter a command: OpenRA.Utility.exe %MOD_ID%
if /I "%command%" EQU "--exit" (cd %TEMPLATE_DIR% & exit /b)
if /I "%command%" EQU "--help" (goto help)
echo.
echo ----------------------------------------
echo.
echo OpenRA.Utility.exe %MOD_ID% %command%
call "./bin/OpenRA.Utility.exe" %MOD_ID% %command%
goto loop
:noengine
echo Required engine files not found.
echo Run `make all` in the mod directory to fetch and build the required files, then try again.
pause
exit /b
:badconfig
echo Required mod.config variables are missing.
echo Ensure that MOD_ID ENGINE_VERSION and ENGINE_DIRECTORY are
echo defined in your mod.config (or user.config) and try again.
pause
exit /b
:help
echo.
echo ----------------------------------------
echo.
echo OpenRA.Utility.exe %MOD_ID%
call "./bin/OpenRA.Utility.exe" %MOD_ID%
goto loop
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/CastleJing/TiberianAurora.git
git@gitee.com:CastleJing/TiberianAurora.git
CastleJing
TiberianAurora
TiberianAurora
bleed

搜索帮助