From 966b15eef1886973c72a8b0ed17705e620aa0e77 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 21 Dec 2015 17:33:32 +0100 Subject: [PATCH] Changed: Added WITH_RYZOM_CUSTOM_PATCH_SERVER that allows to give priority to PatchUrl defined in client.cfg --- code/CMakeModules/nel.cmake | 3 ++- code/ryzom/client/client_default.cfg | 1 - code/ryzom/client/src/CMakeLists.txt | 4 ++++ code/ryzom/client/src/client_cfg.cpp | 8 +++++--- code/ryzom/client/src/login.cpp | 13 ++++++++++--- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index b4add81a0..c51752c72 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -320,7 +320,6 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS) OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON ) OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON ) OPTION(WITH_RYZOM_SOUND "Enable Ryzom Core Sound" ON ) - OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF) ### # Optional support @@ -329,6 +328,8 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS) OPTION(WITH_LUA52 "Build Ryzom Core using Lua 5.2" OFF) OPTION(WITH_LUA53 "Build Ryzom Core using Lua 5.3" OFF) OPTION(WITH_RYZOM_CLIENT_UAC "Ask to run as Administrator" OFF) + OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF) + OPTION(WITH_RYZOM_CUSTOM_PATCH_SERVER "Only use patch server from CFG file" OFF) ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS) MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 5814f6aa5..cc0a1e02b 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -41,7 +41,6 @@ Gamma_max = 1.0; Application = { "ryzom_open", "./client_ryzom_r.exe", "./" }; BackgroundDownloader = 0; -PatchWanted = 0; SignUpURL = ""; StartupHost = "shard.ryzomcore.org:40916"; StartupPage = "/login/r2_login.php"; diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 43249b54d..015227561 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -10,6 +10,10 @@ ADD_SUBDIRECTORY(seven_zip) IF(WITH_RYZOM_PATCH) ADD_DEFINITIONS(-DRZ_USE_PATCH) + + IF(WITH_RYZOM_CUSTOM_PATCH_SERVER) + ADD_DEFINITIONS(-DRZ_USE_CUSTOM_PATCH_SERVER) + ENDIF() ENDIF() FILE(GLOB CFG ../*.cfg) diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 8bc31871d..cce8ca058 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -1048,17 +1048,19 @@ void CClientConfig::setValues() ///////////////////////// // NEW PATCHING SYSTEM // - READ_BOOL_FV(PatchWanted) + READ_BOOL_DEV(PatchWanted) + +#ifdef RZ_USE_CUSTOM_PATCH_SERVER READ_STRING_FV(PatchUrl) READ_STRING_FV(PatchVersion) READ_STRING_FV(RingReleaseNotePath) READ_STRING_FV(ReleaseNotePath) - READ_BOOL_DEV(PatchWanted) +#else READ_STRING_DEV(PatchUrl) READ_STRING_DEV(PatchVersion) READ_STRING_DEV(RingReleaseNotePath) READ_STRING_DEV(ReleaseNotePath) - +#endif ///////////////////////// // NEW PATCHLET SYSTEM // diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index aacc37053..ae08874ba 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -992,9 +992,16 @@ static void getPatchParameters(std::string &url, std::string &ver, std::vector