From 3f329aacf7d439204687f3ae53de3be8555d4830 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 21 Dec 2015 16:29:58 +0100 Subject: [PATCH 1/7] Changed: Remove PatchServer because unused --HG-- branch : develop --- code/ryzom/client/client_default.cfg | 1 - code/ryzom/client/src/client_cfg.cpp | 3 --- code/ryzom/client/src/client_cfg.h | 1 - 3 files changed, 5 deletions(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 421d7b73c..05b10684d 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; -PatchServer = ""; PatchWanted = 0; SignUpURL = ""; StartupHost = "shard.ryzomcore.org:40916"; diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index c16608eb7..8bc31871d 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -420,7 +420,6 @@ CClientConfig::CClientConfig() PatchUrl.clear(); PatchletUrl.clear(); PatchVersion.clear(); - PatchServer.clear(); WebIgMainDomain = "shard.ryzomcore.org"; WebIgTrustedDomains.push_back(WebIgMainDomain); @@ -1050,13 +1049,11 @@ void CClientConfig::setValues() ///////////////////////// // NEW PATCHING SYSTEM // READ_BOOL_FV(PatchWanted) - READ_STRING_FV(PatchServer) READ_STRING_FV(PatchUrl) READ_STRING_FV(PatchVersion) READ_STRING_FV(RingReleaseNotePath) READ_STRING_FV(ReleaseNotePath) READ_BOOL_DEV(PatchWanted) - READ_STRING_DEV(PatchServer) READ_STRING_DEV(PatchUrl) READ_STRING_DEV(PatchVersion) READ_STRING_DEV(RingReleaseNotePath) diff --git a/code/ryzom/client/src/client_cfg.h b/code/ryzom/client/src/client_cfg.h index 8f96b4244..5b9c9099e 100644 --- a/code/ryzom/client/src/client_cfg.h +++ b/code/ryzom/client/src/client_cfg.h @@ -296,7 +296,6 @@ struct CClientConfig std::string PatchUrl; std::string PatchletUrl; std::string PatchVersion; - std::string PatchServer; std::string RingReleaseNotePath; std::string ReleaseNotePath; From 1b2e607d5d2538f7ecf121538d9c658df724087c Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 21 Dec 2015 17:05:18 +0100 Subject: [PATCH 2/7] Changed: Add WITH_UNIX_STRUCTURE to use UNIX structure (bin, etc, share, etc...) --HG-- branch : develop --- code/CMakeModules/nel.cmake | 114 +++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 55 deletions(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index bb19183b8..b4add81a0 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -218,6 +218,11 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_EXTERNAL "With provided external." OFF) ENDIF(WIN32) OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF) + IF(UNIX AND NOT APPLE) + OPTION(WITH_UNIX_STRUCTURE "Use UNIX structure (bin, include, lib)" ON ) + ELSE() + OPTION(WITH_UNIX_STRUCTURE "Use UNIX structure (bin, include, lib)" OFF) + ENDIF() OPTION(WITH_INSTALL_LIBRARIES "Install development files." ON ) OPTION(WITH_ASSIMP "Use assimp exporter" OFF) @@ -908,121 +913,120 @@ ENDMACRO(NL_SETUP_BUILD_FLAGS) MACRO(NL_MAKE_ABSOLUTE_PREFIX NAME_RELATIVE NAME_ABSOLUTE) IF(IS_ABSOLUTE "${${NAME_RELATIVE}}") SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}}) - ELSE(IS_ABSOLUTE "${${NAME_RELATIVE}}") - IF(WIN32) - SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}}) - ELSE(WIN32) + ELSE() + IF(WITH_UNIX_STRUCTURE) SET(${NAME_ABSOLUTE} ${CMAKE_INSTALL_PREFIX}/${${NAME_RELATIVE}}) - ENDIF(WIN32) + ELSE() + SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}}) + ENDIF() ENDIF(IS_ABSOLUTE "${${NAME_RELATIVE}}") ENDMACRO(NL_MAKE_ABSOLUTE_PREFIX) MACRO(NL_SETUP_PREFIX_PATHS) ## Allow override of install_prefix/etc path. IF(NOT NL_ETC_PREFIX) - IF(WIN32) - SET(NL_ETC_PREFIX "." CACHE PATH "Installation path for configurations") - ELSE(WIN32) + IF(WITH_UNIX_STRUCTURE) SET(NL_ETC_PREFIX "etc/nel" CACHE PATH "Installation path for configurations") - ENDIF(WIN32) - ENDIF(NOT NL_ETC_PREFIX) + ELSE() + SET(NL_ETC_PREFIX "." CACHE PATH "Installation path for configurations") + ENDIF() + ENDIF() NL_MAKE_ABSOLUTE_PREFIX(NL_ETC_PREFIX NL_ETC_ABSOLUTE_PREFIX) ## Allow override of install_prefix/share path. IF(NOT NL_SHARE_PREFIX) - IF(WIN32) - SET(NL_SHARE_PREFIX "." CACHE PATH "Installation path for data.") - ELSE(WIN32) + IF(WITH_UNIX_STRUCTURE) SET(NL_SHARE_PREFIX "share/nel" CACHE PATH "Installation path for data.") - ENDIF(WIN32) - ENDIF(NOT NL_SHARE_PREFIX) + ELSE() + SET(NL_SHARE_PREFIX "." CACHE PATH "Installation path for data.") + ENDIF() + ENDIF() NL_MAKE_ABSOLUTE_PREFIX(NL_SHARE_PREFIX NL_SHARE_ABSOLUTE_PREFIX) ## Allow override of install_prefix/sbin path. IF(NOT NL_SBIN_PREFIX) - IF(WIN32) - SET(NL_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.") - ELSE(WIN32) + IF(WITH_UNIX_STRUCTURE) SET(NL_SBIN_PREFIX "sbin" CACHE PATH "Installation path for admin tools and services.") - ENDIF(WIN32) - ENDIF(NOT NL_SBIN_PREFIX) + ELSE() + SET(NL_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.") + ENDIF() + ENDIF() NL_MAKE_ABSOLUTE_PREFIX(NL_SBIN_PREFIX NL_SBIN_ABSOLUTE_PREFIX) ## Allow override of install_prefix/bin path. IF(NOT NL_BIN_PREFIX) - IF(WIN32) - SET(NL_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.") - ELSE(WIN32) + IF(WITH_UNIX_STRUCTURE) SET(NL_BIN_PREFIX "bin" CACHE PATH "Installation path for tools and applications.") - ENDIF(WIN32) - ENDIF(NOT NL_BIN_PREFIX) + ELSE() + SET(NL_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.") + ENDIF() + ENDIF() NL_MAKE_ABSOLUTE_PREFIX(NL_BIN_PREFIX NL_BIN_ABSOLUTE_PREFIX) ## Allow override of install_prefix/lib path. IF(NOT NL_LIB_PREFIX) IF(LIBRARY_ARCHITECTURE) SET(NL_LIB_PREFIX "lib/${LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.") - ELSE(LIBRARY_ARCHITECTURE) + ELSE() SET(NL_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.") - ENDIF(LIBRARY_ARCHITECTURE) - ENDIF(NOT NL_LIB_PREFIX) + ENDIF() + ENDIF() NL_MAKE_ABSOLUTE_PREFIX(NL_LIB_PREFIX NL_LIB_ABSOLUTE_PREFIX) ## Allow override of install_prefix/lib path. IF(NOT NL_DRIVER_PREFIX) - IF(WIN32) - SET(NL_DRIVER_PREFIX "." CACHE PATH "Installation path for drivers.") - ELSE(WIN32) + IF(WITH_UNIX_STRUCTURE) IF(LIBRARY_ARCHITECTURE) SET(NL_DRIVER_PREFIX "lib/${LIBRARY_ARCHITECTURE}/nel" CACHE PATH "Installation path for drivers.") - ELSE(LIBRARY_ARCHITECTURE) + ELSE() SET(NL_DRIVER_PREFIX "lib/nel" CACHE PATH "Installation path for drivers.") - ENDIF(LIBRARY_ARCHITECTURE) - ENDIF(WIN32) - ENDIF(NOT NL_DRIVER_PREFIX) + ENDIF() + ELSE() + SET(NL_DRIVER_PREFIX "." CACHE PATH "Installation path for drivers.") + ENDIF() + ENDIF() NL_MAKE_ABSOLUTE_PREFIX(NL_DRIVER_PREFIX NL_DRIVER_ABSOLUTE_PREFIX) - ENDMACRO(NL_SETUP_PREFIX_PATHS) MACRO(RYZOM_SETUP_PREFIX_PATHS) ## Allow override of install_prefix/etc path. IF(NOT RYZOM_ETC_PREFIX) - IF(WIN32) - SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations") - ELSE(WIN32) + IF(WITH_UNIX_STRUCTURE) SET(RYZOM_ETC_PREFIX "etc/ryzom" CACHE PATH "Installation path for configurations") - ENDIF(WIN32) + ELSE() + SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations") + ENDIF() ENDIF(NOT RYZOM_ETC_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(RYZOM_ETC_PREFIX RYZOM_ETC_ABSOLUTE_PREFIX) ## Allow override of install_prefix/share path. IF(NOT RYZOM_SHARE_PREFIX) - IF(WIN32) - SET(RYZOM_SHARE_PREFIX "." CACHE PATH "Installation path for data.") - ELSE(WIN32) + IF(WITH_UNIX_STRUCTURE) SET(RYZOM_SHARE_PREFIX "share/ryzom" CACHE PATH "Installation path for data.") - ENDIF(WIN32) - ENDIF(NOT RYZOM_SHARE_PREFIX) + ELSE() + SET(RYZOM_SHARE_PREFIX "." CACHE PATH "Installation path for data.") + ENDIF() + ENDIF() NL_MAKE_ABSOLUTE_PREFIX(RYZOM_SHARE_PREFIX RYZOM_SHARE_ABSOLUTE_PREFIX) ## Allow override of install_prefix/sbin path. IF(NOT RYZOM_SBIN_PREFIX) - IF(WIN32) - SET(RYZOM_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.") - ELSE(WIN32) + IF(WITH_UNIX_STRUCTURE) SET(RYZOM_SBIN_PREFIX "sbin" CACHE PATH "Installation path for admin tools and services.") - ENDIF(WIN32) - ENDIF(NOT RYZOM_SBIN_PREFIX) + ELSE() + SET(RYZOM_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.") + ENDIF() + ENDIF() NL_MAKE_ABSOLUTE_PREFIX(RYZOM_SBIN_PREFIX RYZOM_SBIN_ABSOLUTE_PREFIX) ## Allow override of install_prefix/bin path. IF(NOT RYZOM_BIN_PREFIX) - IF(WIN32) - SET(RYZOM_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.") - ELSE(WIN32) + IF(WITH_UNIX_STRUCTURE) SET(RYZOM_BIN_PREFIX "bin" CACHE PATH "Installation path for tools.") - ENDIF(WIN32) - ENDIF(NOT RYZOM_BIN_PREFIX) + ELSE() + SET(RYZOM_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.") + ENDIF() + ENDIF() NL_MAKE_ABSOLUTE_PREFIX(RYZOM_BIN_PREFIX RYZOM_BIN_ABSOLUTE_PREFIX) ## Allow override of install_prefix/lib path. From f88fd7719c2c9dd4fa26fcd4707789393b8d6b5c Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 21 Dec 2015 17:29:34 +0100 Subject: [PATCH 3/7] Changed: Minor changes --HG-- branch : develop --- code/ryzom/client/client_default.cfg | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 05b10684d..5814f6aa5 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -425,18 +425,18 @@ LoadingStringCount = 0; // Some R2 parameters ... -R2Mode = 1; +R2Mode = 1; R2EDEnabled = 1; R2EDExtendedDebug = 0; R2EDLightPalette = 0; R2ClientGw = "r2linux01"; -LoadLuaDebugger = 0; -CheckR2ScenarioMD5 = 1; -LevelDesignEnabled = 0; +LoadLuaDebugger = 0; +CheckR2ScenarioMD5 = 1; +LevelDesignEnabled = 0; -DmCameraDistMax = 25; -DmRun = 20; -DmWalk = 6; +DmCameraDistMax = 25; +DmRun = 20; +DmWalk = 6; R2EDReloadFiles = { "r2ed.xml", From 9bc453466031e49aaa3e1f6c721b8d5f582b72c1 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 21 Dec 2015 17:31:14 +0100 Subject: [PATCH 4/7] Fixed: use PatchUrl instead of PatchServer in ryzom_client_patcher --HG-- branch : develop --- code/ryzom/tools/client/client_patcher/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/ryzom/tools/client/client_patcher/main.cpp b/code/ryzom/tools/client/client_patcher/main.cpp index cbd3ddc0b..1ee6c8c5e 100644 --- a/code/ryzom/tools/client/client_patcher/main.cpp +++ b/code/ryzom/tools/client/client_patcher/main.cpp @@ -202,10 +202,10 @@ int main(int argc, char *argv[]) // load client.cfg or client_default.cfg ClientCfg.init(config); - // check if PatchServer is defined - if (ClientCfg.PatchServer.empty()) + // check if PatchUrl is defined + if (ClientCfg.PatchUrl.empty()) { - printError("PatchServer not defined in " + config); + printError("PatchUrl not defined in " + config); return 1; } @@ -273,9 +273,9 @@ int main(int argc, char *argv[]) // set the correct root path pPM->setClientRootPath(rootPath); - // use PatchServer URL + // use PatchUrl vector patchURLs; - pPM->init(patchURLs, ClientCfg.PatchServer, ClientCfg.PatchVersion); + pPM->init(patchURLs, ClientCfg.PatchUrl, ClientCfg.PatchVersion); pPM->startCheckThread(true /* include background patchs */); ucstring state; From 93225c6495ea7bd6c866e9bc2bb9abf144276b71 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 21 Dec 2015 17:32:05 +0100 Subject: [PATCH 5/7] Changed: Minor changes --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 9c0cbb9fd..d9dfa487e 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -237,7 +237,7 @@ void CPatchManager::setClientRootPath(const std::string& clientRootPath) { ClientRootPath = CPath::standardizePath(clientRootPath); ClientPatchPath = CPath::standardizePath(ClientRootPath + "unpack"); - + WritableClientDataPath = CPath::standardizePath(ClientRootPath + "data"); #ifdef NL_OS_MAC @@ -275,6 +275,7 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s { uint i; PatchServers.clear(); + for (i=0; i vFileList; CPath::getPathContent ("patch", false, false, true, vFileList, NULL, false); @@ -2736,7 +2737,7 @@ void CPatchThread::run() for (i = 0; i < AllFilesToPatch.size(); ++i) { CPatchManager::SFileToPatch &rFTP = AllFilesToPatch[i]; - + string ext = NLMISC::CFile::getExtension(rFTP.FileName); if (ext == "bnp") { From fb98ffe8096a6549cadb9137a6a26a18585c8ed6 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 21 Dec 2015 17:33:32 +0100 Subject: [PATCH 6/7] Changed: Added WITH_RYZOM_CUSTOM_PATCH_SERVER that allows to give priority to PatchUrl defined in client.cfg --HG-- branch : develop --- 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 Date: Mon, 21 Dec 2015 17:34:09 +0100 Subject: [PATCH 7/7] Changed: Only copy installscript_osx.vdf in compatibility branch --HG-- branch : develop --- code/ryzom/client/src/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 015227561..ef08de45c 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -101,8 +101,6 @@ IF(APPLE) ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing bundle...") ENDIF() ENDIF() - - ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/installscript_osx.vdf ${RYZOM_OUTPUT_DIR}) ENDIF() INCLUDE_DIRECTORIES(