Check for required engine version before launching mod.
This commit is contained in:
parent
0ebff73e8e
commit
39815828aa
@ -21,6 +21,7 @@ set MOD_SEARCH_PATHS=%MOD_SEARCH_PATHS%,./mods
|
||||
|
||||
:start
|
||||
if not exist %ENGINE_DIRECTORY%\OpenRA.Game.exe goto noengine
|
||||
>nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\VERSION || goto noengine
|
||||
cd %ENGINE_DIRECTORY%
|
||||
|
||||
:loop
|
||||
|
||||
@ -33,7 +33,7 @@ ENABLE_SINGLE_PLAYER="${EnableSingleplayer:-"False"}"
|
||||
PASSWORD="${Password:-""}"
|
||||
|
||||
cd "${TEMPLATE_ROOT}"
|
||||
if [ ! -f "${ENGINE_DIRECTORY}/OpenRA.Game.exe" ]; then
|
||||
if [ ! -f "${ENGINE_DIRECTORY}/OpenRA.Game.exe" ] || [ "$(cat "${ENGINE_DIRECTORY}/VERSION")" != "${ENGINE_VERSION}" ]; then
|
||||
echo "Required engine files not found."
|
||||
echo "Run \`make\` in the mod directory to fetch and build the required files, then try again.";
|
||||
exit 1
|
||||
|
||||
@ -11,8 +11,9 @@ set MOD_SEARCH_PATHS=%MOD_SEARCH_PATHS%,./mods
|
||||
:launch
|
||||
set TEMPLATE_DIR=%CD%
|
||||
if not exist %ENGINE_DIRECTORY%\OpenRA.Game.exe goto noengine
|
||||
|
||||
>nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\VERSION || goto noengine
|
||||
cd %ENGINE_DIRECTORY%
|
||||
|
||||
OpenRA.Game.exe Game.Mod=%MOD_ID% Engine.LaunchPath="%TEMPLATE_LAUNCHER%" "Engine.ModSearchPaths=%MOD_SEARCH_PATHS%" "%*"
|
||||
set ERROR=%errorlevel%
|
||||
cd %TEMPLATE_DIR%
|
||||
|
||||
@ -21,7 +21,7 @@ if [ "${INCLUDE_DEFAULT_MODS}" = "True" ]; then
|
||||
fi
|
||||
|
||||
cd "${TEMPLATE_ROOT}"
|
||||
if [ ! -f "${ENGINE_DIRECTORY}/OpenRA.Game.exe" ]; then
|
||||
if [ ! -f "${ENGINE_DIRECTORY}/OpenRA.Game.exe" ] || [ "$(cat "${ENGINE_DIRECTORY}/VERSION")" != "${ENGINE_VERSION}" ]; then
|
||||
echo "Required engine files not found."
|
||||
echo "Run \`make\` in the mod directory to fetch and build the required files, then try again.";
|
||||
exit 1
|
||||
|
||||
@ -12,6 +12,7 @@ set MOD_SEARCH_PATHS=%MOD_SEARCH_PATHS%,./mods
|
||||
:start
|
||||
set TEMPLATE_DIR=%CD%
|
||||
if not exist %ENGINE_DIRECTORY%\OpenRA.Game.exe goto noengine
|
||||
>nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\VERSION || goto noengine
|
||||
cd %ENGINE_DIRECTORY%
|
||||
|
||||
:loop
|
||||
|
||||
@ -27,7 +27,7 @@ fi
|
||||
LAUNCH_MOD="${Mod:-"${MOD_ID}"}"
|
||||
|
||||
cd "${TEMPLATE_ROOT}"
|
||||
if [ ! -f "${ENGINE_DIRECTORY}/OpenRA.Game.exe" ]; then
|
||||
if [ ! -f "${ENGINE_DIRECTORY}/OpenRA.Game.exe" ] || [ "$(cat "${ENGINE_DIRECTORY}/VERSION")" != "${ENGINE_VERSION}" ]; then
|
||||
echo "Required engine files not found."
|
||||
echo "Run \`make\` in the mod directory to fetch and build the required files, then try again.";
|
||||
exit 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user