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