Changed: Added WITH_RYZOM_CUSTOM_PATCH_SERVER that allows to give priority to PatchUrl defined in client.cfg

--HG--
branch : develop
This commit is contained in:
kervala 2015-12-21 17:33:32 +01:00
parent 93225c6495
commit fb98ffe809
5 changed files with 21 additions and 8 deletions

View file

@ -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)

View file

@ -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";

View file

@ -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)

View file

@ -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 //

View file

@ -992,9 +992,16 @@ static void getPatchParameters(std::string &url, std::string &ver, std::vector<s
{
if (ClientCfg.R2Mode)
{
patchURIs = R2PatchURLs;
url = R2BackupPatchURL;
ver = R2ServerVersion;
url = ClientCfg.PatchUrl;
ver = ClientCfg.PatchVersion;
// if PatchUrl is forced, don't use URLs returned by server
if (url.empty())
{
patchURIs = R2PatchURLs;
url = R2BackupPatchURL;
ver = R2ServerVersion;
}
}
else
{