From 32ce9a47cbab15af220149f063500535f40be5d5 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 12 Apr 2016 19:54:05 +0200 Subject: [PATCH 01/33] Fixed: Compilation with Qt 5.6 --HG-- branch : develop --- code/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index c14632a0a..58c2d7db6 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -344,7 +344,8 @@ IF(WITH_QT5) IF(WIN32) SET(QT_LIBRARIES ${QT_LIBRARIES} ${WINSDK_LIBRARY_DIR}/Crypt32.lib - ${WINSDK_LIBRARY_DIR}/WS2_32.Lib) + ${WINSDK_LIBRARY_DIR}/WS2_32.Lib + ${WINSDK_LIBRARY_DIR}/IPHlpApi.Lib) ENDIF() # Core From 8090ddd12f3385fe207f236d9fd00f58edb2077a Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 12 Apr 2016 19:54:38 +0200 Subject: [PATCH 02/33] Changed: Display parameters passed to batch in log --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index bbd896ec9..019baaab5 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1040,6 +1040,13 @@ void CPatchManager::executeBatchFile() arguments.push_back(startupPath); #endif + // log parameters passed to Ryzom client + nlinfo("Restarting Ryzom..."); + nlinfo("RyzomFilename = %s", RyzomFilename.c_str()); + nlinfo("ClientPatchPath = %s", ClientPatchPath.c_str()); + nlinfo("ClientRootPath = %s", ClientRootPath.c_str()); + nlinfo("StartupPath = %s", startupPath.c_str()); + batchFilename += UpdateBatchFilename; // make script executable From e82ada1026e12a3e897f7650e35329b166c2d9ff Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 13 Apr 2016 20:36:43 +0200 Subject: [PATCH 03/33] Fixed: Link to freetype when using Qt --HG-- branch : develop --- code/CMakeLists.txt | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 58c2d7db6..3d2cefe60 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -324,13 +324,19 @@ IF(WITH_QT5) ENDIF() # freetype is needed since Qt 5.5 - IF(UNIX) - SET(FREETYPE_LIB "${QT_LIBRARY_DIR}/libqtfreetype.a") - ELSEIF(WIN32) - SET(FREETYPE_LIB "${QT_LIBRARY_DIR}/qtfreetype.lib") - ENDIF() - IF(EXISTS ${FREETYPE_LIB}) - SET(QT_LIBRARIES ${QT_LIBRARIES} ${FREETYPE_LIB}) + FIND_PACKAGE(FreeType) + + IF(FREETYPE_FOUND) + SET(QT_LIBRARIES ${QT_LIBRARIES} ${FREETYPE_LIBRARIES}) + ELSE() + IF(UNIX) + SET(FREETYPE_LIB "${QT_LIBRARY_DIR}/libqtfreetype.a") + ELSEIF(WIN32) + SET(FREETYPE_LIB "${QT_LIBRARY_DIR}/qtfreetype.lib") + ENDIF() + IF(EXISTS ${FREETYPE_LIB}) + SET(QT_LIBRARIES ${QT_LIBRARIES} ${FREETYPE_LIB}) + ENDIF() ENDIF() ADD_QT_PLUGIN(accessible qtaccessiblewidgets) From d1d6f6da414adfa0dff5bb283b23d99676d309b0 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 15 Apr 2016 16:11:14 +0200 Subject: [PATCH 04/33] Fixed: Creation of sn_0_* folders under OS X 10.7 --HG-- branch : develop --- code/nel/src/misc/cmd_args.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/nel/src/misc/cmd_args.cpp b/code/nel/src/misc/cmd_args.cpp index 65aae5769..0abe8e5ce 100644 --- a/code/nel/src/misc/cmd_args.cpp +++ b/code/nel/src/misc/cmd_args.cpp @@ -220,6 +220,11 @@ bool CCmdArgs::parse(int argc, char **argv) for(sint i = 0; i < argc; ++i) { +#ifdef NL_OS_MAC + // get rid of -psn_* arguments under OS X + if (strncmp(argv[i], "-psn_", 5) == 0) continue; +#endif + args.push_back(argv[i]); } From ccb69f8b27d6cbd17530c20ed78237e38e2a33f2 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 15 Apr 2016 16:11:37 +0200 Subject: [PATCH 05/33] Changed: Signed/unsigned comparison --HG-- branch : develop --- code/nel/src/misc/cmd_args.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/misc/cmd_args.cpp b/code/nel/src/misc/cmd_args.cpp index 0abe8e5ce..d9370b831 100644 --- a/code/nel/src/misc/cmd_args.cpp +++ b/code/nel/src/misc/cmd_args.cpp @@ -250,7 +250,7 @@ bool CCmdArgs::parse(const std::vector &argv) uint argc = argv.size(); // process each argument - for (sint i = 1; i < argc; i++) + for (uint i = 1; i < argc; i++) { std::string name = argv[i]; From 5b53bbbe3fbf208d6c72ffb4023c1576d752edb8 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 18 Apr 2016 13:39:48 +0200 Subject: [PATCH 06/33] Fixed: Ignore "certificate already in hash table" errors --HG-- branch : develop --- code/ryzom/client/src/http_client_curl.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/ryzom/client/src/http_client_curl.cpp index 5056815d2..9501468d5 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/ryzom/client/src/http_client_curl.cpp @@ -20,6 +20,7 @@ #include #include +#include using namespace NLMISC; using namespace NLNET; @@ -91,6 +92,8 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) // get a BIO BIO *bio = BIO_new_mem_buf(&buffer[0], file.getFileSize()); + + char errorBuffer[1024]; if (bio) { @@ -113,8 +116,19 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) // add our certificate to this store if (X509_STORE_add_cert(store, itmp->x509) == 0) { - nlwarning("Error adding certificate"); - res = CURLE_SSL_CACERT; + uint errCode = ERR_get_error(); + + // ignore already in hash table errors + if (ERR_GET_LIB(errCode) != ERR_LIB_X509 || ERR_GET_REASON(errCode) != X509_R_CERT_ALREADY_IN_HASH_TABLE) + { + ERR_error_string_n(errCode, errorBuffer, 1024); + nlwarning("Error adding certificate %s: %s", itmp->x509->name, errorBuffer); + res = CURLE_SSL_CACERT; + } + } + else + { + nlinfo("Added certificate %s", itmp->x509->name); } } } From 631b7346c2cd518e7550146bcf566ffe670cd5a5 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 18 Apr 2016 13:40:02 +0200 Subject: [PATCH 07/33] Fixed: Warnings with clang --HG-- branch : develop --- code/ryzom/client/src/http_client_curl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/ryzom/client/src/http_client_curl.cpp index 9501468d5..c389f6319 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/ryzom/client/src/http_client_curl.cpp @@ -63,7 +63,7 @@ bool CCurlHttpClient::authenticate(const std::string &user, const std::string &p const char *CAFilename = "ssl_ca_cert.pem"; // this is the certificate "Thawte Server CA" // *************************************************************************** -static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) +static CURLcode sslctx_function(CURL * /* curl */, void *sslctx, void * /* parm */) { // look for certificate in search paths string path = CPath::lookup(CAFilename); From 811a39aa1a7bec3d58bde5e82b66bf85c32f5f40 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 18 Apr 2016 13:40:13 +0200 Subject: [PATCH 08/33] Changed: Display certificate path --HG-- branch : develop --- code/ryzom/client/src/http_client_curl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/ryzom/client/src/http_client_curl.cpp index c389f6319..92bf3e957 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/ryzom/client/src/http_client_curl.cpp @@ -67,7 +67,7 @@ static CURLcode sslctx_function(CURL * /* curl */, void *sslctx, void * /* parm { // look for certificate in search paths string path = CPath::lookup(CAFilename); - nldebug("Cert path '%s'", path.c_str()); + nlinfo("Cert path '%s'", path.c_str()); if (path.empty()) { From a8a697c5dd1fcfcffc4060b588f10200a839c557 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 19 Apr 2016 22:55:34 +0300 Subject: [PATCH 09/33] Fixed: bad commit (issue #143) --HG-- branch : develop --- code/ryzom/server/src/input_output_service/chat_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/server/src/input_output_service/chat_manager.cpp b/code/ryzom/server/src/input_output_service/chat_manager.cpp index e6dc5c254..872aa4501 100644 --- a/code/ryzom/server/src/input_output_service/chat_manager.cpp +++ b/code/ryzom/server/src/input_output_service/chat_manager.cpp @@ -488,7 +488,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) { // if( itCl->second->isMuted() ) CEntityId eid = TheDataset.getEntityId(sender); - if(_MutedUniverseUsers.find( eid ) != _MutedUniverseUsers.end()) + if(_MutedUsers.find( eid ) != _MutedUsers.end()) { nldebug("IOSCM: chat The player %s:%x is universe muted", TheDataset.getEntityId(sender).toString().c_str(), @@ -650,7 +650,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) // If universal channel check if player muted if (session->getChan()->UniversalChannel) { - if(_MutedUsers.find( eid ) != _MutedUsers.end()) + if(_MutedUniverseUsers.find( eid ) != _MutedUniverseUsers.end()) { nldebug("IOSCM: chat The player %s:%x is muted", TheDataset.getEntityId(sender).toString().c_str(), From a1e8408be0f9bb0f4edc39afc31adbf32d4a9ace Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 23 Apr 2016 18:49:36 +0300 Subject: [PATCH 10/33] Fixed: Tooltip position related to parent window --HG-- branch : develop --- code/nel/src/gui/widget_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 37a115965..f866594c9 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -1258,7 +1258,7 @@ namespace NLGUI getWindowForActiveMasterGroup(newCtrl->getContextHelpWindowName()); uint32 _ScreenH, _ScreenW; - CViewRenderer::getInstance()->getScreenSize( _ScreenH, _ScreenW ); + CViewRenderer::getInstance()->getScreenSize( _ScreenW, _ScreenH ); if(ttPosRef==Hotspot_TTAuto || ttParentRef==Hotspot_TTAuto) { From 7cd520445718758b5b92c3f1e2701b42cf5c3249 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 29 Apr 2016 12:16:43 +0300 Subject: [PATCH 11/33] Changed: When writing to icfg or keys files, write to temp file and then rename --HG-- branch : develop --- .../client/src/interface_v3/interface_manager.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 4d2248249..fab67d55e 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -1826,7 +1826,8 @@ bool CInterfaceManager::saveConfig (const string &filename) COFile f; - if (!f.open(filename)) return false; + // using temporary file, so no f.close() unless its a success + if (!f.open(filename, false, false, true)) return false; CInterfaceConfig ic; @@ -1873,7 +1874,6 @@ bool CInterfaceManager::saveConfig (const string &filename) { nlwarning("Config saving failed"); // couldn't save result so do not continue - f.close(); return false; } @@ -1929,14 +1929,14 @@ bool CInterfaceManager::saveConfig (const string &filename) nlwarning("Bad user dyn chat saving"); return false; } + + f.close(); } catch(const NLMISC::EStream &) { - f.close(); nlwarning("Config saving failed."); return false; } - f.close(); ContinentMngr.serialFOWMaps(); @@ -2645,7 +2645,8 @@ bool CInterfaceManager::saveKeys(const std::string &filename) try { COFile file; - if (file.open (filename)) + // using temporary file, so no file.close() unless its a success + if (file.open (filename, false, false, true)) { COXml xmlStream; xmlStream.init (&file); @@ -2675,8 +2676,7 @@ bool CInterfaceManager::saveKeys(const std::string &filename) } catch (const Exception &e) { - nlwarning ("Error while writing the file %s : %s. Remove it.", filename.c_str(), e.what ()); - CFile::deleteFile(filename); + nlwarning ("Error while writing the file %s : %s.", filename.c_str(), e.what ()); } return ret; } From 32e22ab2081c443cc1a15a16a26e4f6b15416913 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 4 May 2016 10:06:29 +0200 Subject: [PATCH 12/33] Changed: Simplify CMake end tags --HG-- branch : develop --- code/CMakeModules/FindLuabind.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/CMakeModules/FindLuabind.cmake b/code/CMakeModules/FindLuabind.cmake index 64fd5e1cf..c21d64e4f 100644 --- a/code/CMakeModules/FindLuabind.cmake +++ b/code/CMakeModules/FindLuabind.cmake @@ -124,7 +124,7 @@ IF(WITH_LUA51) IF(WITH_STLPORT) LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua51) LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua51d) - ENDIF(WITH_STLPORT) + ENDIF() LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua51) LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua51d) @@ -134,7 +134,7 @@ IF(WITH_LUA50) IF(WITH_STLPORT) LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua50) LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua50d) - ENDIF(WITH_STLPORT) + ENDIF() LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua50) LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua50d) @@ -195,7 +195,7 @@ IF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR) SET(LUABIND_FOUND TRUE) SET(LUABIND_LIBRARIES ${LUABIND_LIBRARY_DEBUG}) ENDIF(LUABIND_LIBRARY_RELEASE AND LUABIND_LIBRARY_DEBUG) -ENDIF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR) +ENDIF() IF(LUABIND_FOUND) SET(LUABIND_INCLUDE_DIR ${LUABIND_INCLUDE_DIR} ${Boost_INCLUDE_DIR}) @@ -203,17 +203,17 @@ IF(LUABIND_FOUND) FIND_FILE(LUABIND_VERSION_FILE luabind/version.hpp PATHS ${LUABIND_INCLUDE_DIR}) IF(LUABIND_VERSION_FILE) SET(LUABIND_DEFINITIONS "-DHAVE_LUABIND_VERSION") - ENDIF(LUABIND_VERSION_FILE) + ENDIF() FIND_CORRECT_LUA_VERSION() IF(NOT Luabind_FIND_QUIETLY) MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}") ENDIF(NOT Luabind_FIND_QUIETLY) -ELSE(LUABIND_FOUND) +ELSE() IF(NOT Luabind_FIND_QUIETLY) MESSAGE(STATUS "Warning: Unable to find Luabind!") - ENDIF(NOT Luabind_FIND_QUIETLY) + ENDIF() ENDIF(LUABIND_FOUND) MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG Boost_LIB_DIAGNOSTIC_DEFINITIONS) From 99b87b1128d0288f094c9f666624d96f26607659 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 4 May 2016 10:07:03 +0200 Subject: [PATCH 13/33] Changed: Update interfaces files with patchlet version --HG-- branch : develop --- .../data/gamedev/interfaces_v3/inventory.xml | 182 +++++++++++++++++- .../data/gamedev/interfaces_v3/webig.lua | 2 +- 2 files changed, 182 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/inventory.xml b/code/ryzom/client/data/gamedev/interfaces_v3/inventory.xml index 9c4b259da..b298467b1 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/inventory.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/inventory.xml @@ -27,6 +27,15 @@ + + + + + + + + + @@ -44,6 +53,83 @@ onclick_l="proc" params_l="inv_left_click_on_slot" auto_grayed="false" /> + + + + +