From 58d787fa19afe1d8ac806384cc4a90a32be9d598 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 --- 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 f36c73a9b15e6971c804f4224129a6ee344beb83 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 --- 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 b1368c6e53d220bf530c955820db298810949a78 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 --- 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 c1983fba0509e0cf41b7165d18f7a3f248a894b4 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 --- 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 b0934cabe46c4bb76a0a541b146b0dbb42cdd76c 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 --- 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 a9685f71b26de356da37671ab114d4897cdad6bc 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 --- 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 8aabb4fec702f2a5dba43f3013a279fb197ea9e2 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 --- 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 58347b935319d8b8e06340cb6a5ab678924320f6 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 --- 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 f023fa769ab5c46a71969152d99a90b2e58bc408 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) --- 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 6b75bdb0e141e6a44ebcd986771651829b5b2fb2 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 --- 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 8b767cabcd8f1f96201d17392439c94b2dd08d4c 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 --- .../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 c3cd4d9d0d9f2a566f43962d62013346cf31880e 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 --- 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 e1f8ac7d1baf7f19df01c605a83dd9d306bbe401 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 --- .../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" /> + + + + +