From 6ebbb48f9f7197b87d65be6e5fef76c0569c072a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 1 Mar 2009 01:35:39 -0500 Subject: [PATCH] Re-landed automating updating (bug 3530, r=pred). --- configs/core.cfg | 2 +- core/sourcemod.cpp | 7 +++++++ modules.versions | 11 +++++++++++ tools/builder/PkgCore.cs | 7 +++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/configs/core.cfg b/configs/core.cfg index 21b99c3e..49b55525 100644 --- a/configs/core.cfg +++ b/configs/core.cfg @@ -100,7 +100,7 @@ * URL to use for retrieving update information. * SSL is not yet supported. */ - "AutoUpdateURL" "http://www.sourcemod.net/update/" + "AutoUpdateURL" "http://update.sourcemod.net/update/" /** * Whether to show debug spew. diff --git a/core/sourcemod.cpp b/core/sourcemod.cpp index f6e67817..e12d4f00 100644 --- a/core/sourcemod.cpp +++ b/core/sourcemod.cpp @@ -300,6 +300,13 @@ void SourceModBase::StartSourceMod(bool late) { g_SourceMod_Core.OnVSPListening(vsp_interface); } + + /* If we want to autoload, do that now */ + const char *disabled = GetCoreConfigValue("DisableAutoUpdate"); + if (disabled == NULL || strcasecmp(disabled, "yes") != 0) + { + g_Extensions.LoadAutoExtension("updater.ext." PLATFORM_LIB_EXT); + } } static bool g_LevelEndBarrier = false; diff --git a/modules.versions b/modules.versions index 63d4ae56..fd78a34c 100644 --- a/modules.versions +++ b/modules.versions @@ -77,3 +77,14 @@ out = svn_version.h folder = extensions/clientprefs in = svn_version.tpl out = svn_version.h + +[curl] +folder = extensions/curl +in = svn_version.tpl +out = svn_version.h + +[updater] +folder = extensions/updater +in = svn_version.tpl +out = svn_version.h + diff --git a/tools/builder/PkgCore.cs b/tools/builder/PkgCore.cs index 99207a54..bafd5770 100644 --- a/tools/builder/PkgCore.cs +++ b/tools/builder/PkgCore.cs @@ -330,6 +330,13 @@ namespace builder lib.vcproj_name = "curl"; libraries.Add(lib); + lib = new Library(); + lib.package_path = "addons/sourcemod/extensions"; + lib.source_path = "extensions/updater"; + lib.binary_name = "updater.ext"; + lib.vcproj_name = "updater"; + libraries.Add(lib); + return (Library [])libraries.ToArray(typeof(Library)); }