Add missing launch arguments to launch-dedicated scripts.

This commit is contained in:
Paul Chote 2020-03-01 15:42:26 +00:00 committed by abcdefg30
parent 17e9d976cb
commit 3b535d8fda
2 changed files with 33 additions and 5 deletions

View File

@ -5,9 +5,18 @@
set Name="Dedicated Server"
set ListenPort=1234
set AdvertiseOnline=True
set EnableSingleplayer=False
set Password=""
set GeoIPDatabase=""
set RequireAuthentication=False
set ProfileIDBlacklist=""
set ProfileIDWhitelist=""
set EnableSingleplayer=False
set EnableSyncReports=False
set ShareAnonymizedIPs=True
@echo off
setlocal EnableDelayedExpansion
@ -25,7 +34,7 @@ if not exist %ENGINE_DIRECTORY%\OpenRA.Game.exe goto noengine
cd %ENGINE_DIRECTORY%
:loop
OpenRA.Server.exe Game.Mod=%MOD_ID% Server.Name=%Name% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password%
OpenRA.Server.exe Game.Mod=%MOD_ID% Server.Name=%Name% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password% Server.GeoIPDatabase=%GeoIPDatabase% Server.RequireAuthentication=%RequireAuthentication% Server.ProfileIDBlacklist=%ProfileIDBlacklist% Server.ProfileIDWhitelist=%ProfileIDWhitelist% Server.EnableSyncReports=%EnableSyncReports% Server.ShareAnonymizedIPs=%ShareAnonymizedIPs% Engine.SupportDir=%SupportDir%
goto loop
:noengine
@ -39,4 +48,4 @@ 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
exit /b

View File

@ -38,9 +38,20 @@ NAME="${Name:-"Dedicated Server"}"
LAUNCH_MOD="${Mod:-"${MOD_ID}"}"
LISTEN_PORT="${ListenPort:-"1234"}"
ADVERTISE_ONLINE="${AdvertiseOnline:-"True"}"
ENABLE_SINGLE_PLAYER="${EnableSingleplayer:-"False"}"
PASSWORD="${Password:-""}"
GEOIP_DATABASE_PATH="${GeoIPDatabase:-""}"
REQUIRE_AUTHENTICATION="${RequireAuthentication:-"False"}"
PROFILE_ID_BLACKLIST="${ProfileIDBlacklist:-""}"
PROFILE_ID_WHITELIST="${ProfileIDWhitelist:-""}"
ENABLE_SINGLE_PLAYER="${EnableSingleplayer:-"False"}"
ENABLE_SYNC_REPORTS="${EnableSyncReports:-"False"}"
SHARE_ANONYMISED_IPS="${ShareAnonymizedIPs:-"True"}"
SUPPORT_DIR="${SupportDir:-""}"
cd "${TEMPLATE_ROOT}"
if [ ! -f "${ENGINE_DIRECTORY}/OpenRA.Game.exe" ] || [ "$(cat "${ENGINE_DIRECTORY}/VERSION")" != "${ENGINE_VERSION}" ]; then
echo "Required engine files not found."
@ -54,5 +65,13 @@ while true; do
MOD_SEARCH_PATHS="${MOD_SEARCH_PATHS}" mono --debug OpenRA.Server.exe Game.Mod="${LAUNCH_MOD}" \
Server.Name="${NAME}" Server.ListenPort="${LISTEN_PORT}" \
Server.AdvertiseOnline="${ADVERTISE_ONLINE}" \
Server.EnableSingleplayer="${ENABLE_SINGLE_PLAYER}" Server.Password="${PASSWORD}"
Server.Password="${PASSWORD}" \
Server.GeoIPDatabase="${GEOIP_DATABASE_PATH}" \
Server.RequireAuthentication="${REQUIRE_AUTHENTICATION}" \
Server.ProfileIDBlacklist="${PROFILE_ID_BLACKLIST}" \
Server.ProfileIDWhitelist="${PROFILE_ID_WHITELIST}" \
Server.EnableSingleplayer="${ENABLE_SINGLE_PLAYER}" \
Server.EnableSyncReports="${ENABLE_SYNC_REPORTS}" \
Server.ShareAnonymizedIPs="${SHARE_ANONYMISED_IPS}" \
Engine.SupportDir="${SUPPORT_DIR}"
done