diff --git a/launch-dedicated.cmd b/launch-dedicated.cmd index 112881a..ec8441c 100644 --- a/launch-dedicated.cmd +++ b/launch-dedicated.cmd @@ -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 diff --git a/launch-dedicated.sh b/launch-dedicated.sh index 407befc..dfbf87f 100755 --- a/launch-dedicated.sh +++ b/launch-dedicated.sh @@ -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 diff --git a/launch-game.cmd b/launch-game.cmd index 56a982a..58a27ad 100644 --- a/launch-game.cmd +++ b/launch-game.cmd @@ -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% diff --git a/launch-game.sh b/launch-game.sh index 3094b39..36b06b4 100755 --- a/launch-game.sh +++ b/launch-game.sh @@ -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 diff --git a/utility.cmd b/utility.cmd index 500e2e2..0b2339e 100644 --- a/utility.cmd +++ b/utility.cmd @@ -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 diff --git a/utility.sh b/utility.sh index ac35531..5297226 100755 --- a/utility.sh +++ b/utility.sh @@ -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