From e46015c29fc227b7085b4535c3ea7a8561895f8a Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Wed, 18 Apr 2018 16:13:12 +0000 Subject: [PATCH] Remove INCLUDE_DEFAULT_MODS setting. In practice this makes life more difficult than needed for modders, who instead implement hacky workarounds. --- launch-dedicated.sh | 6 +----- launch-game.sh | 6 +----- make.ps1 | 8 ++------ mod.config | 6 ------ packaging/linux/buildpackage.sh | 6 ------ packaging/osx/buildpackage.sh | 6 ------ packaging/windows/buildpackage.sh | 6 ------ utility.sh | 6 +----- 8 files changed, 5 insertions(+), 45 deletions(-) diff --git a/launch-dedicated.sh b/launch-dedicated.sh index dfbf87f..40887f0 100755 --- a/launch-dedicated.sh +++ b/launch-dedicated.sh @@ -10,6 +10,7 @@ command -v mono >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires TEMPLATE_LAUNCHER=$(python -c "import os; print(os.path.realpath('$0'))") TEMPLATE_ROOT=$(dirname "${TEMPLATE_LAUNCHER}") +MOD_SEARCH_PATHS="${TEMPLATE_ROOT}/mods,./mods" # shellcheck source=mod.config . "${TEMPLATE_ROOT}/mod.config" @@ -19,11 +20,6 @@ if [ -f "${TEMPLATE_ROOT}/user.config" ]; then . "${TEMPLATE_ROOT}/user.config" fi -MOD_SEARCH_PATHS="${TEMPLATE_ROOT}/mods" -if [ "${INCLUDE_DEFAULT_MODS}" = "True" ]; then - MOD_SEARCH_PATHS="${MOD_SEARCH_PATHS},./mods" -fi - NAME="${Name:-"Dedicated Server"}" LAUNCH_MOD="${Mod:-"${MOD_ID}"}" LISTEN_PORT="${ListenPort:-"1234"}" diff --git a/launch-game.sh b/launch-game.sh index 36b06b4..4fc181f 100755 --- a/launch-game.sh +++ b/launch-game.sh @@ -6,6 +6,7 @@ command -v mono >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires TEMPLATE_LAUNCHER=$(python -c "import os; print(os.path.realpath('$0'))") TEMPLATE_ROOT=$(dirname "${TEMPLATE_LAUNCHER}") +MOD_SEARCH_PATHS="${TEMPLATE_ROOT}/mods,./mods" # shellcheck source=mod.config . "${TEMPLATE_ROOT}/mod.config" @@ -15,11 +16,6 @@ if [ -f "${TEMPLATE_ROOT}/user.config" ]; then . "${TEMPLATE_ROOT}/user.config" fi -MOD_SEARCH_PATHS="${TEMPLATE_ROOT}/mods" -if [ "${INCLUDE_DEFAULT_MODS}" = "True" ]; then - MOD_SEARCH_PATHS="${MOD_SEARCH_PATHS},./mods" -fi - cd "${TEMPLATE_ROOT}" if [ ! -f "${ENGINE_DIRECTORY}/OpenRA.Game.exe" ] || [ "$(cat "${ENGINE_DIRECTORY}/VERSION")" != "${ENGINE_VERSION}" ]; then echo "Required engine files not found." diff --git a/make.ps1 b/make.ps1 index 58ed470..a56b23c 100644 --- a/make.ps1 +++ b/make.ps1 @@ -217,7 +217,7 @@ function ReadConfigLine($line, $name) function ParseConfigFile($fileName) { - $names = @("MOD_ID", "INCLUDE_DEFAULT_MODS", "ENGINE_VERSION", "AUTOMATIC_ENGINE_MANAGEMENT", "AUTOMATIC_ENGINE_SOURCE", + $names = @("MOD_ID", "ENGINE_VERSION", "AUTOMATIC_ENGINE_MANAGEMENT", "AUTOMATIC_ENGINE_SOURCE", "AUTOMATIC_ENGINE_EXTRACT_DIRECTORY", "AUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME", "ENGINE_DIRECTORY") $reader = [System.IO.File]::OpenText($fileName) @@ -272,11 +272,7 @@ if (Test-Path "user.config") $modID = $env:MOD_ID -$env:MOD_SEARCH_PATHS = (Get-Item -Path ".\" -Verbose).FullName + "\mods" -if ($env:INCLUDE_DEFAULT_MODS -eq "True") -{ - $env:MOD_SEARCH_PATHS = $env:MOD_SEARCH_PATHS + ",./mods" -} +$env:MOD_SEARCH_PATHS = (Get-Item -Path ".\" -Verbose).FullName + "\mods,./mods" # Run the same command on the engine's make file if ($command -eq "all" -or $command -eq "clean") diff --git a/mod.config b/mod.config index df47276..34909b1 100644 --- a/mod.config +++ b/mod.config @@ -11,12 +11,6 @@ MOD_ID="example" # The OpenRA engine version to use for this project. ENGINE_VERSION="release-20180307" -# Enable this to make the default OpenRA mods available for use in your mod.yaml -# Packages list (via $mod references). Accepts values "True" or "False". -# WARNING: This setting is provided to simplify early project development, -# and must be disabled before you can package installers for your project! -INCLUDE_DEFAULT_MODS="False" - ############################################################################## # Continuous Integration # diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index c1a3bc3..100002c 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -23,12 +23,6 @@ if [ -f "${TEMPLATE_ROOT}/user.config" ]; then . "${TEMPLATE_ROOT}/user.config" fi -if [ "${INCLUDE_DEFAULT_MODS}" = "True" ]; then - echo "Cannot generate installers while INCLUDE_DEFAULT_MODS is enabled." - echo "Make sure that this setting is disabled in both your mod.config and user.config." - exit 1 -fi - TAG="$1" if [ $# -eq "1" ]; then OUTPUTDIR=$(python -c "import os; print(os.path.realpath('.'))") diff --git a/packaging/osx/buildpackage.sh b/packaging/osx/buildpackage.sh index 2c4a142..7974fbc 100755 --- a/packaging/osx/buildpackage.sh +++ b/packaging/osx/buildpackage.sh @@ -22,12 +22,6 @@ if [ -f "${TEMPLATE_ROOT}/user.config" ]; then . "${TEMPLATE_ROOT}/user.config" fi -if [ "${INCLUDE_DEFAULT_MODS}" = "True" ]; then - echo "Cannot generate installers while INCLUDE_DEFAULT_MODS is enabled." - echo "Make sure that this setting is disabled in both your mod.config and user.config." - exit 1 -fi - TAG="$1" if [ $# -eq "1" ]; then OUTPUTDIR=$(python -c "import os; print(os.path.realpath('.'))") diff --git a/packaging/windows/buildpackage.sh b/packaging/windows/buildpackage.sh index 01f5279..5a8965f 100755 --- a/packaging/windows/buildpackage.sh +++ b/packaging/windows/buildpackage.sh @@ -20,12 +20,6 @@ if [ -f "${TEMPLATE_ROOT}/user.config" ]; then . "${TEMPLATE_ROOT}/user.config" fi -if [ "${INCLUDE_DEFAULT_MODS}" = "True" ]; then - echo "Cannot generate installers while INCLUDE_DEFAULT_MODS is enabled." - echo "Make sure that this setting is disabled in both your mod.config and user.config." - exit 1 -fi - TAG="$1" if [ $# -eq "1" ]; then OUTPUTDIR=$(python -c "import os; print(os.path.realpath('.'))") diff --git a/utility.sh b/utility.sh index 5297226..c22a5db 100755 --- a/utility.sh +++ b/utility.sh @@ -10,6 +10,7 @@ command -v mono >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires TEMPLATE_LAUNCHER=$(python -c "import os; print(os.path.realpath('$0'))") TEMPLATE_ROOT=$(dirname "${TEMPLATE_LAUNCHER}") +MOD_SEARCH_PATHS="${TEMPLATE_ROOT}/mods,./mods" # shellcheck source=mod.config . "${TEMPLATE_ROOT}/mod.config" @@ -19,11 +20,6 @@ if [ -f "${TEMPLATE_ROOT}/user.config" ]; then . "${TEMPLATE_ROOT}/user.config" fi -MOD_SEARCH_PATHS="${TEMPLATE_ROOT}/mods" -if [ "${INCLUDE_DEFAULT_MODS}" = "True" ]; then - MOD_SEARCH_PATHS="${MOD_SEARCH_PATHS},./mods" -fi - LAUNCH_MOD="${Mod:-"${MOD_ID}"}" cd "${TEMPLATE_ROOT}"