From c1188a9e25694f584813909ccb2f93b5d9040998 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 25 Oct 2017 21:35:12 +0200 Subject: [PATCH 1/9] Fixed: Use our own defines for Windows editions to not rely on Windows 10 SDKs (not compatible with Windows XP) --HG-- branch : develop --- code/nel/src/misc/system_info.cpp | 711 ++++++++++++++++-------------- 1 file changed, 389 insertions(+), 322 deletions(-) diff --git a/code/nel/src/misc/system_info.cpp b/code/nel/src/misc/system_info.cpp index 545de0cc6..2afa8da09 100644 --- a/code/nel/src/misc/system_info.cpp +++ b/code/nel/src/misc/system_info.cpp @@ -23,6 +23,156 @@ # include # include # define nlcpuid(regs, idx) __cpuid(regs, idx) + +// define them here to not rely on Windows 10 SDKs +# define NL_PRODUCT_UNDEFINED 0x00000000 +# define NL_PRODUCT_ULTIMATE 0x00000001 +# define NL_PRODUCT_HOME_BASIC 0x00000002 +# define NL_PRODUCT_HOME_PREMIUM 0x00000003 +# define NL_PRODUCT_ENTERPRISE 0x00000004 +# define NL_PRODUCT_HOME_BASIC_N 0x00000005 +# define NL_PRODUCT_BUSINESS 0x00000006 +# define NL_PRODUCT_STANDARD_SERVER 0x00000007 +# define NL_PRODUCT_DATACENTER_SERVER 0x00000008 +# define NL_PRODUCT_SMALLBUSINESS_SERVER 0x00000009 +# define NL_PRODUCT_ENTERPRISE_SERVER 0x0000000A +# define NL_PRODUCT_STARTER 0x0000000B +# define NL_PRODUCT_DATACENTER_SERVER_CORE 0x0000000C +# define NL_PRODUCT_STANDARD_SERVER_CORE 0x0000000D +# define NL_PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E +# define NL_PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F +# define NL_PRODUCT_BUSINESS_N 0x00000010 +# define NL_PRODUCT_WEB_SERVER 0x00000011 +# define NL_PRODUCT_CLUSTER_SERVER 0x00000012 +# define NL_PRODUCT_HOME_SERVER 0x00000013 +# define NL_PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014 +# define NL_PRODUCT_STORAGE_STANDARD_SERVER 0x00000015 +# define NL_PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016 +# define NL_PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017 +# define NL_PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018 +# define NL_PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019 +# define NL_PRODUCT_HOME_PREMIUM_N 0x0000001A +# define NL_PRODUCT_ENTERPRISE_N 0x0000001B +# define NL_PRODUCT_ULTIMATE_N 0x0000001C +# define NL_PRODUCT_WEB_SERVER_CORE 0x0000001D +# define NL_PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E +# define NL_PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F +# define NL_PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020 +# define NL_PRODUCT_SERVER_FOUNDATION 0x00000021 +# define NL_PRODUCT_HOME_PREMIUM_SERVER 0x00000022 +# define NL_PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023 +# define NL_PRODUCT_STANDARD_SERVER_V 0x00000024 +# define NL_PRODUCT_DATACENTER_SERVER_V 0x00000025 +# define NL_PRODUCT_ENTERPRISE_SERVER_V 0x00000026 +# define NL_PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027 +# define NL_PRODUCT_STANDARD_SERVER_CORE_V 0x00000028 +# define NL_PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029 +# define NL_PRODUCT_HYPERV 0x0000002A +# define NL_PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x0000002B +# define NL_PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x0000002C +# define NL_PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x0000002D +# define NL_PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x0000002E +# define NL_PRODUCT_STARTER_N 0x0000002F +# define NL_PRODUCT_PROFESSIONAL 0x00000030 +# define NL_PRODUCT_PROFESSIONAL_N 0x00000031 +# define NL_PRODUCT_SB_SOLUTION_SERVER 0x00000032 +# define NL_PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x00000033 +# define NL_PRODUCT_STANDARD_SERVER_SOLUTIONS 0x00000034 +# define NL_PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x00000035 +# define NL_PRODUCT_SB_SOLUTION_SERVER_EM 0x00000036 +# define NL_PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x00000037 +# define NL_PRODUCT_SOLUTION_EMBEDDEDSERVER 0x00000038 +# define NL_PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE 0x00000039 +# define NL_PRODUCT_PROFESSIONAL_EMBEDDED 0x0000003A +# define NL_PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x0000003B +# define NL_PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x0000003C +# define NL_PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x0000003D +# define NL_PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x0000003E +# define NL_PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x0000003F +# define NL_PRODUCT_CLUSTER_SERVER_V 0x00000040 +# define NL_PRODUCT_EMBEDDED 0x00000041 +# define NL_PRODUCT_STARTER_E 0x00000042 +# define NL_PRODUCT_HOME_BASIC_E 0x00000043 +# define NL_PRODUCT_HOME_PREMIUM_E 0x00000044 +# define NL_PRODUCT_PROFESSIONAL_E 0x00000045 +# define NL_PRODUCT_ENTERPRISE_E 0x00000046 +# define NL_PRODUCT_ULTIMATE_E 0x00000047 +# define NL_PRODUCT_ENTERPRISE_EVALUATION 0x00000048 +# define NL_PRODUCT_MULTIPOINT_STANDARD_SERVER 0x0000004C +# define NL_PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x0000004D +# define NL_PRODUCT_STANDARD_EVALUATION_SERVER 0x0000004F +# define NL_PRODUCT_DATACENTER_EVALUATION_SERVER 0x00000050 +# define NL_PRODUCT_ENTERPRISE_N_EVALUATION 0x00000054 +# define NL_PRODUCT_EMBEDDED_AUTOMOTIVE 0x00000055 +# define NL_PRODUCT_EMBEDDED_INDUSTRY_A 0x00000056 +# define NL_PRODUCT_THINPC 0x00000057 +# define NL_PRODUCT_EMBEDDED_A 0x00000058 +# define NL_PRODUCT_EMBEDDED_INDUSTRY 0x00000059 +# define NL_PRODUCT_EMBEDDED_E 0x0000005A +# define NL_PRODUCT_EMBEDDED_INDUSTRY_E 0x0000005B +# define NL_PRODUCT_EMBEDDED_INDUSTRY_A_E 0x0000005C +# define NL_PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x0000005F +# define NL_PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x00000060 +# define NL_PRODUCT_CORE_ARM 0x00000061 +# define NL_PRODUCT_CORE_N 0x00000062 +# define NL_PRODUCT_CORE_COUNTRYSPECIFIC 0x00000063 +# define NL_PRODUCT_CORE_SINGLELANGUAGE 0x00000064 +# define NL_PRODUCT_CORE 0x00000065 +# define NL_PRODUCT_PROFESSIONAL_WMC 0x00000067 +# define NL_PRODUCT_MOBILE_CORE 0x00000068 +# define NL_PRODUCT_EMBEDDED_INDUSTRY_EVAL 0x00000069 +# define NL_PRODUCT_EMBEDDED_INDUSTRY_E_EVAL 0x0000006A +# define NL_PRODUCT_EMBEDDED_EVAL 0x0000006B +# define NL_PRODUCT_EMBEDDED_E_EVAL 0x0000006C +# define NL_PRODUCT_CORE_SERVER 0x0000006D +# define NL_PRODUCT_CLOUD_STORAGE_SERVER 0x0000006E +# define NL_PRODUCT_CORE_CONNECTED 0x0000006F +# define NL_PRODUCT_PROFESSIONAL_STUDENT 0x00000070 +# define NL_PRODUCT_CORE_CONNECTED_N 0x00000071 +# define NL_PRODUCT_PROFESSIONAL_STUDENT_N 0x00000072 +# define NL_PRODUCT_CORE_CONNECTED_SINGLELANGUAGE 0x00000073 +# define NL_PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC 0x00000074 +# define NL_PRODUCT_CONNECTED_CAR 0x00000075 +# define NL_PRODUCT_INDUSTRY_HANDHELD 0x00000076 +# define NL_PRODUCT_PPI_PRO 0x00000077 +# define NL_PRODUCT_ARM64_SERVER 0x00000078 +# define NL_PRODUCT_EDUCATION 0x00000079 +# define NL_PRODUCT_EDUCATION_N 0x0000007A +# define NL_PRODUCT_IOTUAP 0x0000007B +# define NL_PRODUCT_CLOUD_HOST_INFRASTRUCTURE_SERVER 0x0000007C +# define NL_PRODUCT_ENTERPRISE_S 0x0000007D +# define NL_PRODUCT_ENTERPRISE_S_N 0x0000007E +# define NL_PRODUCT_PROFESSIONAL_S 0x0000007F +# define NL_PRODUCT_PROFESSIONAL_S_N 0x00000080 +# define NL_PRODUCT_ENTERPRISE_S_EVALUATION 0x00000081 +# define NL_PRODUCT_ENTERPRISE_S_N_EVALUATION 0x00000082 +# define NL_PRODUCT_HOLOGRAPHIC 0x00000087 +# define NL_PRODUCT_PRO_SINGLE_LANGUAGE 0x0000008A +# define NL_PRODUCT_PRO_CHINA 0x0000008B +# define NL_PRODUCT_ENTERPRISE_SUBSCRIPTION 0x0000008C +# define NL_PRODUCT_ENTERPRISE_SUBSCRIPTION_N 0x0000008D +# define NL_PRODUCT_DATACENTER_NANO_SERVER 0x0000008F +# define NL_PRODUCT_STANDARD_NANO_SERVER 0x00000090 +# define NL_PRODUCT_DATACENTER_A_SERVER_CORE 0x00000091 +# define NL_PRODUCT_STANDARD_A_SERVER_CORE 0x00000092 +# define NL_PRODUCT_DATACENTER_WS_SERVER_CORE 0x00000093 +# define NL_PRODUCT_STANDARD_WS_SERVER_CORE 0x00000094 +# define NL_PRODUCT_UTILITY_VM 0x00000095 +# define NL_PRODUCT_DATACENTER_EVALUATION_SERVER_CORE 0x0000009F +# define NL_PRODUCT_STANDARD_EVALUATION_SERVER_CORE 0x000000A0 +# define NL_PRODUCT_PRO_WORKSTATION 0x000000A1 +# define NL_PRODUCT_PRO_WORKSTATION_N 0x000000A2 +# define NL_PRODUCT_PRO_FOR_EDUCATION 0x000000A4 +# define NL_PRODUCT_PRO_FOR_EDUCATION_N 0x000000A5 +# define NL_PRODUCT_AZURE_SERVER_CORE 0x000000A8 +# define NL_PRODUCT_AZURE_NANO_SERVER 0x000000A9 +# define NL_PRODUCT_ENTERPRISEG 0x000000AB +# define NL_PRODUCT_ENTERPRISEGN 0x000000AC +# define NL_PRODUCT_SERVERRDSH 0x000000AF +# define NL_PRODUCT_CLOUD 0x000000B2 +# define NL_PRODUCT_CLOUDN 0x000000B3 +# define NL_PRODUCT_UNLICENSED 0xABCDABCD + #else # include # include @@ -443,544 +593,461 @@ string CSystemInfo::getOS() if (pGetProductInfo && pGetProductInfo(osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.wServicePackMajor, osvi.wServicePackMinor, &dwType)) { // Test for the specific product family. + // see https://msdn.microsoft.com/fr-fr/library/windows/desktop/ms724358(v=vs.85).aspx switch (dwType) { -#ifdef PRODUCT_UNLICENSED - case PRODUCT_UNLICENSED: + case NL_PRODUCT_UNLICENSED: OSString += " Unlicensed"; break; -#endif -#ifdef PRODUCT_ULTIMATE - case PRODUCT_ULTIMATE: + case NL_PRODUCT_ULTIMATE: OSString += " Ultimate"; break; -#endif -#ifdef PRODUCT_HOME_BASIC - case PRODUCT_HOME_BASIC: + case NL_PRODUCT_HOME_BASIC: OSString += " Home Basic"; break; -#endif -#ifdef PRODUCT_HOME_PREMIUM - case PRODUCT_HOME_PREMIUM: + case NL_PRODUCT_HOME_PREMIUM: OSString += " Home Premium"; break; -#endif -#ifdef PRODUCT_ENTERPRISE - case PRODUCT_ENTERPRISE: + case NL_PRODUCT_ENTERPRISE: OSString += " Enterprise"; break; -#endif -#ifdef PRODUCT_HOME_BASIC_N - case PRODUCT_HOME_BASIC_N: + case NL_PRODUCT_HOME_BASIC_N: OSString += " Home Basic N"; break; -#endif -#ifdef PRODUCT_BUSINESS - case PRODUCT_BUSINESS: + case NL_PRODUCT_BUSINESS: OSString += " Business"; break; -#endif -#ifdef PRODUCT_STANDARD_SERVER - case PRODUCT_STANDARD_SERVER: + case NL_PRODUCT_STANDARD_SERVER: OSString += " Server Standard"; break; -#endif -#ifdef PRODUCT_DATACENTER_SERVER - case PRODUCT_DATACENTER_SERVER: + case NL_PRODUCT_DATACENTER_SERVER: OSString += " Server Datacenter (full installation)"; break; -#endif -#ifdef PRODUCT_SMALLBUSINESS_SERVER - case PRODUCT_SMALLBUSINESS_SERVER: + case NL_PRODUCT_SMALLBUSINESS_SERVER: OSString += " Small Business Server"; break; -#endif -#ifdef PRODUCT_ENTERPRISE_SERVER - case PRODUCT_ENTERPRISE_SERVER: + case NL_PRODUCT_ENTERPRISE_SERVER: OSString += " Server Enterprise (full installation)"; break; -#endif -#ifdef PRODUCT_STARTER - case PRODUCT_STARTER: + case NL_PRODUCT_STARTER: OSString += " Starter"; break; -#endif -#ifdef PRODUCT_DATACENTER_SERVER_CORE - case PRODUCT_DATACENTER_SERVER_CORE: + case NL_PRODUCT_DATACENTER_SERVER_CORE: OSString += " Server Datacenter (core installation)"; break; -#endif -#ifdef PRODUCT_STANDARD_SERVER_CORE - case PRODUCT_STANDARD_SERVER_CORE: + case NL_PRODUCT_STANDARD_SERVER_CORE: OSString += " Server Standard (core installation)"; break; -#endif -#ifdef PRODUCT_ENTERPRISE_SERVER_CORE - case PRODUCT_ENTERPRISE_SERVER_CORE: + case NL_PRODUCT_ENTERPRISE_SERVER_CORE: OSString += " Server Enterprise (core installation)"; break; -#endif -#ifdef PRODUCT_ENTERPRISE_SERVER_IA64 - case PRODUCT_ENTERPRISE_SERVER_IA64: + case NL_PRODUCT_ENTERPRISE_SERVER_IA64: OSString += " Server Enterprise for Itanium-based Systems"; break; -#endif -#ifdef PRODUCT_BUSINESS_N - case PRODUCT_BUSINESS_N: + case NL_PRODUCT_BUSINESS_N: OSString += " Business N"; break; -#endif -#ifdef PRODUCT_WEB_SERVER - case PRODUCT_WEB_SERVER: + case NL_PRODUCT_WEB_SERVER: OSString += " Web Server (full installation)"; break; -#endif -#ifdef PRODUCT_CLUSTER_SERVER - case PRODUCT_CLUSTER_SERVER: + case NL_PRODUCT_CLUSTER_SERVER: OSString += " Server Hyper Core"; break; -#endif -#ifdef PRODUCT_HOME_SERVER - case PRODUCT_HOME_SERVER: + case NL_PRODUCT_HOME_SERVER: OSString += " Home Server"; break; -#endif -#ifdef PRODUCT_STORAGE_EXPRESS_SERVER - case PRODUCT_STORAGE_EXPRESS_SERVER: + case NL_PRODUCT_STORAGE_EXPRESS_SERVER: OSString += " Storage Server Express"; break; -#endif -#ifdef PRODUCT_STORAGE_STANDARD_SERVER - case PRODUCT_STORAGE_STANDARD_SERVER: + case NL_PRODUCT_STORAGE_STANDARD_SERVER: OSString += " Storage Server Standard"; break; -#endif -#ifdef PRODUCT_STORAGE_WORKGROUP_SERVER - case PRODUCT_STORAGE_WORKGROUP_SERVER: + case NL_PRODUCT_STORAGE_WORKGROUP_SERVER: OSString += " Storage Server Workgroup"; break; -#endif -#ifdef PRODUCT_STORAGE_ENTERPRISE_SERVER - case PRODUCT_STORAGE_ENTERPRISE_SERVER: + case NL_PRODUCT_STORAGE_ENTERPRISE_SERVER: OSString += " Storage Server Enterprise"; break; -#endif -#ifdef PRODUCT_SERVER_FOR_SMALLBUSINESS - case PRODUCT_SERVER_FOR_SMALLBUSINESS: + case NL_PRODUCT_SERVER_FOR_SMALLBUSINESS: OSString += " Essential Server Solutions"; break; -#endif -#ifdef PRODUCT_SMALLBUSINESS_SERVER_PREMIUM - case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM: + case NL_PRODUCT_SMALLBUSINESS_SERVER_PREMIUM: OSString += " Small Business Server Premium"; break; -#endif -#ifdef PRODUCT_HOME_PREMIUM_N - case PRODUCT_HOME_PREMIUM_N: + case NL_PRODUCT_HOME_PREMIUM_N: OSString += " Home Premium N"; break; -#endif -#ifdef PRODUCT_ENTERPRISE_N - case PRODUCT_ENTERPRISE_N: + case NL_PRODUCT_ENTERPRISE_N: OSString += " Enterprise N"; break; -#endif -#ifdef PRODUCT_ULTIMATE_N - case PRODUCT_ULTIMATE_N: + case NL_PRODUCT_ULTIMATE_N: OSString += " Ultimate N"; break; -#endif -#ifdef PRODUCT_WEB_SERVER_CORE - case PRODUCT_WEB_SERVER_CORE: + case NL_PRODUCT_WEB_SERVER_CORE: OSString += " Web Server (core installation)"; break; -#endif -#ifdef PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT - case PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT: + case NL_PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT: OSString += " Essential Business Server Management Server"; break; -#endif -#ifdef PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY - case PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY: + case NL_PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY: OSString += " Essential Business Server Security Server"; break; -#endif -#ifdef PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING - case PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING: + case NL_PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING: OSString += " Essential Business Server Messaging Server"; break; -#endif -#ifdef PRODUCT_SERVER_FOUNDATION - case PRODUCT_SERVER_FOUNDATION: + case NL_PRODUCT_SERVER_FOUNDATION: OSString += " Server Foundation"; break; -#endif -#ifdef PRODUCT_HOME_PREMIUM_SERVER - case PRODUCT_HOME_PREMIUM_SERVER: + case NL_PRODUCT_HOME_PREMIUM_SERVER: OSString += " Home Server"; break; -#endif -#ifdef PRODUCT_SERVER_FOR_SMALLBUSINESS_V - case PRODUCT_SERVER_FOR_SMALLBUSINESS_V: + case NL_PRODUCT_SERVER_FOR_SMALLBUSINESS_V: OSString += " Server without Hyper-V for Windows Essential Server Solutions"; break; -#endif -#ifdef PRODUCT_STANDARD_SERVER_V - case PRODUCT_STANDARD_SERVER_V: + case NL_PRODUCT_STANDARD_SERVER_V: OSString += " Server Standard without Hyper-V"; break; -#endif -#ifdef PRODUCT_DATACENTER_SERVER_V - case PRODUCT_DATACENTER_SERVER_V: + case NL_PRODUCT_DATACENTER_SERVER_V: OSString += " Server Datacenter without Hyper-V (full installation)"; break; -#endif -#ifdef PRODUCT_ENTERPRISE_SERVER_V - case PRODUCT_ENTERPRISE_SERVER_V: + case NL_PRODUCT_ENTERPRISE_SERVER_V: OSString += " Enterprise without Hyper-V (full installation)"; break; -#endif -#ifdef PRODUCT_DATACENTER_SERVER_CORE_V - case PRODUCT_DATACENTER_SERVER_CORE_V: + case NL_PRODUCT_DATACENTER_SERVER_CORE_V: OSString += " Datacenter without Hyper-V (core installation)"; break; -#endif -#ifdef PRODUCT_STANDARD_SERVER_CORE_V - case PRODUCT_STANDARD_SERVER_CORE_V: + case NL_PRODUCT_STANDARD_SERVER_CORE_V: OSString += " Standard without Hyper-V (core installation)"; break; -#endif -#ifdef PRODUCT_ENTERPRISE_SERVER_CORE_V - case PRODUCT_ENTERPRISE_SERVER_CORE_V: + case NL_PRODUCT_ENTERPRISE_SERVER_CORE_V: OSString += " Enterprise without Hyper-V (core installation)"; break; -#endif -#ifdef PRODUCT_HYPERV - case PRODUCT_HYPERV: + case NL_PRODUCT_HYPERV: OSString += " Hyper-V Server"; break; -#endif -#ifdef PRODUCT_STORAGE_EXPRESS_SERVER_CORE - case PRODUCT_STORAGE_EXPRESS_SERVER_CORE: + case NL_PRODUCT_STORAGE_EXPRESS_SERVER_CORE: OSString += " Storage Server Express (core installation)"; break; -#endif -#ifdef PRODUCT_STORAGE_STANDARD_SERVER_CORE - case PRODUCT_STORAGE_STANDARD_SERVER_CORE: + case NL_PRODUCT_STORAGE_STANDARD_SERVER_CORE: OSString += " Storage Server Standard (core installation)"; break; -#endif -#ifdef PRODUCT_STORAGE_WORKGROUP_SERVER_CORE - case PRODUCT_STORAGE_WORKGROUP_SERVER_CORE: + case NL_PRODUCT_STORAGE_WORKGROUP_SERVER_CORE: OSString += " Storage Server Workgroup (core installation)"; break; -#endif -#ifdef PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE - case PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE: + case NL_PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE: OSString += " Storage Server Enterprise (core installation)"; break; -#endif -#ifdef PRODUCT_STARTER_N - case PRODUCT_STARTER_N: + case NL_PRODUCT_STARTER_N: OSString += " Starter N Edition"; break; -#endif -#ifdef PRODUCT_PROFESSIONAL - case PRODUCT_PROFESSIONAL: + case NL_PRODUCT_PROFESSIONAL: OSString += " Professional"; break; -#endif -#ifdef PRODUCT_PROFESSIONAL_N - case PRODUCT_PROFESSIONAL_N: + case NL_PRODUCT_PROFESSIONAL_N: OSString += " Professional N"; break; -#endif -#ifdef PRODUCT_SB_SOLUTION_SERVER - case PRODUCT_SB_SOLUTION_SERVER: + case NL_PRODUCT_SB_SOLUTION_SERVER: OSString += " Small Business Server"; break; -#endif -#ifdef PRODUCT_SERVER_FOR_SB_SOLUTIONS - case PRODUCT_SERVER_FOR_SB_SOLUTIONS: + case NL_PRODUCT_SERVER_FOR_SB_SOLUTIONS: OSString += " Server For Small Business Solutions"; break; -#endif -#ifdef PRODUCT_STANDARD_SERVER_SOLUTIONS - case PRODUCT_STANDARD_SERVER_SOLUTIONS: + case NL_PRODUCT_STANDARD_SERVER_SOLUTIONS: OSString += " Server Solutions Premium"; break; -#endif -#ifdef PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE - case PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE: + case NL_PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE: OSString += " Server Solutions Premium (core installation)"; break; -#endif -#ifdef PRODUCT_SB_SOLUTION_SERVER_EM - case PRODUCT_SB_SOLUTION_SERVER_EM: + case NL_PRODUCT_SB_SOLUTION_SERVER_EM: OSString += " Server For Small Business Solutions EM"; break; -#endif -#ifdef PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM - case PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM: + case NL_PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM: OSString += " Server For Small Business Solutions EM"; break; -#endif - -#ifdef PRODUCT_SOLUTION_EMBEDDEDSERVER - case PRODUCT_SOLUTION_EMBEDDEDSERVER: + case NL_PRODUCT_SOLUTION_EMBEDDEDSERVER: OSString += " Solution Embedded Server (full installation)"; break; -#endif -#ifdef PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE - case PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE: + case NL_PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE: OSString += " Solution Embedded Server (core installation)"; break; -#endif -#ifdef PRODUCT_PROFESSIONAL_EMBEDDED - case PRODUCT_PROFESSIONAL_EMBEDDED: + case NL_PRODUCT_PROFESSIONAL_EMBEDDED: OSString += " Professional Embedded"; break; -#endif -#ifdef PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT - case PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT: + case NL_PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT: OSString += " Essential Server Solution Management"; break; -#endif -#ifdef PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL - case PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL: + case NL_PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL: OSString += " Essential Server Solution Additional"; break; -#endif -#ifdef PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC - case PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC: + case NL_PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC: OSString += " Essential Server Solution Management SVC"; break; -#endif -#ifdef PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC - case PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC: + case NL_PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC: OSString += " Essential Server Solution Additional SVC"; break; -#endif -#ifdef PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE - case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE: + case NL_PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE: OSString += " Small Business Server Premium (core installation)"; break; -#endif -#ifdef PRODUCT_CLUSTER_SERVER_V - case PRODUCT_CLUSTER_SERVER_V: + case NL_PRODUCT_CLUSTER_SERVER_V: OSString += " Server Hyper Core V"; break; -#endif -#ifdef PRODUCT_EMBEDDED - case PRODUCT_EMBEDDED: + case NL_PRODUCT_EMBEDDED: OSString += " Embedded"; break; -#endif -#ifdef PRODUCT_STARTER_E - case PRODUCT_STARTER_E: + case NL_PRODUCT_STARTER_E: OSString += " Starter E"; break; -#endif -#ifdef PRODUCT_HOME_BASIC_E - case PRODUCT_HOME_BASIC_E: + case NL_PRODUCT_HOME_BASIC_E: OSString += " Home Basic E"; break; -#endif -#ifdef PRODUCT_HOME_PREMIUM_E - case PRODUCT_HOME_PREMIUM_E: + case NL_PRODUCT_HOME_PREMIUM_E: OSString += " Home Premium E"; break; -#endif -#ifdef PRODUCT_PROFESSIONAL_E - case PRODUCT_PROFESSIONAL_E: + case NL_PRODUCT_PROFESSIONAL_E: OSString += " Professional E"; break; -#endif -#ifdef PRODUCT_ENTERPRISE_E - case PRODUCT_ENTERPRISE_E: + case NL_PRODUCT_ENTERPRISE_E: OSString += " Enterprise E"; break; -#endif -#ifdef PRODUCT_ULTIMATE_E - case PRODUCT_ULTIMATE_E: + case NL_PRODUCT_ULTIMATE_E: OSString += " Ultimate E"; break; -#endif -#ifdef PRODUCT_ENTERPRISE_EVALUATION - case PRODUCT_ENTERPRISE_EVALUATION: + case NL_PRODUCT_ENTERPRISE_EVALUATION: OSString += " Enterprise Evaluation"; break; -#endif -#ifdef PRODUCT_MULTIPOINT_STANDARD_SERVER - case PRODUCT_MULTIPOINT_STANDARD_SERVER: + // nothing from 0x49 to 0x4b + case NL_PRODUCT_MULTIPOINT_STANDARD_SERVER: OSString += " MultiPoint Server Standard (full installation)"; break; -#endif -#ifdef PRODUCT_MULTIPOINT_PREMIUM_SERVER - case PRODUCT_MULTIPOINT_PREMIUM_SERVER: + case NL_PRODUCT_MULTIPOINT_PREMIUM_SERVER: OSString += " MultiPoint Server Premium (full installation)"; break; -#endif -#ifdef PRODUCT_STANDARD_EVALUATION_SERVER - case PRODUCT_STANDARD_EVALUATION_SERVER: + case NL_PRODUCT_STANDARD_EVALUATION_SERVER: OSString += " Server Standard (evaluation installation)"; break; -#endif -#ifdef PRODUCT_DATACENTER_EVALUATION_SERVER - case PRODUCT_DATACENTER_EVALUATION_SERVER: + case NL_PRODUCT_DATACENTER_EVALUATION_SERVER: OSString += " Server Datacenter (evaluation installation)"; break; -#endif -#ifdef PRODUCT_ENTERPRISE_N_EVALUATION - case PRODUCT_ENTERPRISE_N_EVALUATION: + // nothing from 0x51 to 0x53 + case NL_PRODUCT_ENTERPRISE_N_EVALUATION: OSString += " Enterprise N (evaluation installation)"; break; -#endif -#ifdef PRODUCT_EMBEDDED_AUTOMOTIVE - case PRODUCT_EMBEDDED_AUTOMOTIVE: + case NL_PRODUCT_EMBEDDED_AUTOMOTIVE: OSString += " Embedded Automotive"; break; -#endif -#ifdef PRODUCT_EMBEDDED_INDUSTRY_A - case PRODUCT_EMBEDDED_INDUSTRY_A: + case NL_PRODUCT_EMBEDDED_INDUSTRY_A: OSString += " Embedded Industry A"; break; -#endif -#ifdef PRODUCT_THINPC - case PRODUCT_THINPC: + case NL_PRODUCT_THINPC: OSString += " Thin PC"; break; -#endif -#ifdef PRODUCT_EMBEDDED_A - case PRODUCT_EMBEDDED_A: + case NL_PRODUCT_EMBEDDED_A: OSString += " Embedded A"; break; -#endif -#ifdef PRODUCT_EMBEDDED_INDUSTRY - case PRODUCT_EMBEDDED_INDUSTRY: + case NL_PRODUCT_EMBEDDED_INDUSTRY: OSString += " Embedded Industry"; break; -#endif -#ifdef PRODUCT_EMBEDDED_E - case PRODUCT_EMBEDDED_E: + case NL_PRODUCT_EMBEDDED_E: OSString += " Embedded E"; break; -#endif -#ifdef PRODUCT_EMBEDDED_INDUSTRY_E - case PRODUCT_EMBEDDED_INDUSTRY_E: + case NL_PRODUCT_EMBEDDED_INDUSTRY_E: OSString += " Embedded Industry E"; break; -#endif -#ifdef PRODUCT_EMBEDDED_INDUSTRY_A_E - case PRODUCT_EMBEDDED_INDUSTRY_A_E: + case NL_PRODUCT_EMBEDDED_INDUSTRY_A_E: OSString += " Embedded Industry A E"; break; -#endif -#ifdef PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER - case PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER: + // nothing from 0x5d to 0x5e + case NL_PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER: OSString += " Storage Server Workgroup (evaluation installation)"; break; -#endif -#ifdef PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER - case PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER: + case NL_PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER: OSString += " Storage Server Standard (evaluation installation)"; break; -#endif -#ifdef PRODUCT_CORE_ARM - case PRODUCT_CORE_ARM: + case NL_PRODUCT_CORE_ARM: OSString += " RT"; break; -#endif -#ifdef PRODUCT_CORE_N - case PRODUCT_CORE_N: + case NL_PRODUCT_CORE_N: OSString += " Home N"; break; -#endif -#ifdef PRODUCT_CORE_COUNTRYSPECIFIC - case PRODUCT_CORE_COUNTRYSPECIFIC: + case NL_PRODUCT_CORE_COUNTRYSPECIFIC: OSString += " Home China"; break; -#endif -#ifdef PRODUCT_CORE_SINGLELANGUAGE - case PRODUCT_CORE_SINGLELANGUAGE: + case NL_PRODUCT_CORE_SINGLELANGUAGE: OSString += " Home Single Language"; break; -#endif -#ifdef PRODUCT_CORE - case PRODUCT_CORE: + case NL_PRODUCT_CORE: OSString += " Home"; break; -#endif -#ifdef PRODUCT_PROFESSIONAL_WMC - case PRODUCT_PROFESSIONAL_WMC: + // nothing at 0x66 + case NL_PRODUCT_PROFESSIONAL_WMC: OSString += " Professional with Media Center"; break; -#endif -#ifdef PRODUCT_MOBILE_CORE - case PRODUCT_MOBILE_CORE: + case NL_PRODUCT_MOBILE_CORE: OSString += " Mobile"; break; -#endif -#ifdef PRODUCT_EMBEDDED_INDUSTRY_EVAL - case PRODUCT_EMBEDDED_INDUSTRY_EVAL: + case NL_PRODUCT_EMBEDDED_INDUSTRY_EVAL: OSString += " Embedded Industry (evaluation installation)"; break; -#endif -#ifdef PRODUCT_EMBEDDED_INDUSTRY_E_EVAL - case PRODUCT_EMBEDDED_INDUSTRY_E_EVAL: + case NL_PRODUCT_EMBEDDED_INDUSTRY_E_EVAL: OSString += " Embedded Industry E (evaluation installation)"; break; -#endif -#ifdef PRODUCT_EMBEDDED_EVAL - case PRODUCT_EMBEDDED_EVAL: + case NL_PRODUCT_EMBEDDED_EVAL: OSString += " Embedded (evaluation installation)"; break; -#endif -#ifdef PRODUCT_EMBEDDED_E_EVAL - case PRODUCT_EMBEDDED_E_EVAL: + case NL_PRODUCT_EMBEDDED_E_EVAL: OSString += " Embedded E (evaluation installation)"; break; -#endif -#ifdef PRODUCT_CORE_SERVER - case PRODUCT_CORE_SERVER: + case NL_PRODUCT_CORE_SERVER: OSString += " Server"; break; -#endif -#ifdef PRODUCT_CLOUD_STORAGE_SERVER - case PRODUCT_CLOUD_STORAGE_SERVER: + case NL_PRODUCT_CLOUD_STORAGE_SERVER: OSString += " Server Could Storage"; break; -#endif -#ifdef PRODUCT_CORE_CONNECTED - case PRODUCT_CORE_CONNECTED: + case NL_PRODUCT_CORE_CONNECTED: OSString += " Home Connected"; break; -#endif -#ifdef PRODUCT_PROFESSIONAL_STUDENT - case PRODUCT_PROFESSIONAL_STUDENT: + case NL_PRODUCT_PROFESSIONAL_STUDENT: OSString += " Professional Student"; break; -#endif -#ifdef PRODUCT_CORE_CONNECTED_N - case PRODUCT_CORE_CONNECTED_N: + case NL_PRODUCT_CORE_CONNECTED_N: OSString += " Home N Connected"; break; -#endif -#ifdef PRODUCT_PROFESSIONAL_STUDENT_N - case PRODUCT_PROFESSIONAL_STUDENT_N: + case NL_PRODUCT_PROFESSIONAL_STUDENT_N: OSString += " Professional Student N"; break; -#endif -#ifdef PRODUCT_CORE_CONNECTED_SINGLELANGUAGE - case PRODUCT_CORE_CONNECTED_SINGLELANGUAGE: + case NL_PRODUCT_CORE_CONNECTED_SINGLELANGUAGE: OSString += " Home Single Language Connected"; break; -#endif -#ifdef PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC - case PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC: + case NL_PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC: OSString += " Home China Connected"; break; -#endif + case NL_PRODUCT_CONNECTED_CAR: + OSString += " Connected Car"; + break; + case NL_PRODUCT_INDUSTRY_HANDHELD: + OSString += " Industry Handheld"; + break; + case NL_PRODUCT_PPI_PRO: + OSString += " PPI Pro"; + break; + case NL_PRODUCT_ARM64_SERVER: + OSString += " ARM64 Server"; + break; + case NL_PRODUCT_EDUCATION: + OSString += " Education"; + break; + case NL_PRODUCT_EDUCATION_N: + OSString += " Education N"; + break; + case NL_PRODUCT_IOTUAP: + OSString += " IoT Core"; + break; + case NL_PRODUCT_CLOUD_HOST_INFRASTRUCTURE_SERVER: + OSString += " Cloud Host Infrastructure Server"; + break; + case NL_PRODUCT_ENTERPRISE_S: + OSString += " Product Enterprise S"; + break; + case NL_PRODUCT_ENTERPRISE_S_N: + OSString += " Enterprise S N"; + break; + case NL_PRODUCT_PROFESSIONAL_S: + OSString += " Professional S"; + break; + case NL_PRODUCT_PROFESSIONAL_S_N: + OSString += " Professional S N"; + break; + case NL_PRODUCT_ENTERPRISE_S_EVALUATION: + OSString += " Enterprise S Evaluation"; + break; + case NL_PRODUCT_ENTERPRISE_S_N_EVALUATION: + OSString += " Enterprise S N Evaluation"; + break; + // nothing from x83 to 0x86 + case NL_PRODUCT_HOLOGRAPHIC: + OSString += " Holographic"; + break; + // nothing from x88 to 0x89 + case NL_PRODUCT_PRO_SINGLE_LANGUAGE: + OSString += " Pro Single Language"; + break; + case NL_PRODUCT_PRO_CHINA: + OSString += " Pro China"; + break; + case NL_PRODUCT_ENTERPRISE_SUBSCRIPTION: + OSString += " Enterprise Subscription"; + break; + case NL_PRODUCT_ENTERPRISE_SUBSCRIPTION_N: + OSString += " Enterprise Subscription N"; + break; + // nothing at 0x8e + case NL_PRODUCT_DATACENTER_NANO_SERVER: + OSString += " Datacenter Nano Server"; + break; + case NL_PRODUCT_STANDARD_NANO_SERVER: + OSString += " Standard Nano Server"; + break; + case NL_PRODUCT_DATACENTER_A_SERVER_CORE: + OSString += " Datacenter A Server Core"; + break; + case NL_PRODUCT_STANDARD_A_SERVER_CORE: + OSString += " Standard A Server Core"; + break; + case NL_PRODUCT_DATACENTER_WS_SERVER_CORE: + OSString += " Datacenter WS Server Core"; + break; + case NL_PRODUCT_STANDARD_WS_SERVER_CORE: + OSString += " Standard WS Server Core"; + break; + case NL_PRODUCT_UTILITY_VM: + OSString += " Utility VM"; + break; + // nothing from 0x96 to 0x9e + case NL_PRODUCT_DATACENTER_EVALUATION_SERVER_CORE: + OSString += " Datacenter_evaluation_server_core"; + break; + case NL_PRODUCT_STANDARD_EVALUATION_SERVER_CORE: + OSString += " Standard Evaluation Server Core"; + break; + case NL_PRODUCT_PRO_WORKSTATION: + OSString += " Pro Workstation"; + break; + case NL_PRODUCT_PRO_WORKSTATION_N: + OSString += " Pro Workstation N"; + break; + // nothing at 0xa3 + case NL_PRODUCT_PRO_FOR_EDUCATION: + OSString += " Pro for Education"; + break; + case NL_PRODUCT_PRO_FOR_EDUCATION_N: + OSString += " Pro for Education N"; + break; + // nothing from 0xa6 to 0xa7 + case NL_PRODUCT_AZURE_SERVER_CORE: + OSString += " Azure Server Core"; + break; + case NL_PRODUCT_AZURE_NANO_SERVER: + OSString += " Azure Nano Server"; + break; + // nothing at 0xaa + case NL_PRODUCT_ENTERPRISEG: + OSString += " Enterprise G"; + break; + case NL_PRODUCT_ENTERPRISEGN: + OSString += " Enterprise GN"; + break; + // nothing from 0xad to 0xae + case NL_PRODUCT_SERVERRDSH: + OSString += " Server RDSH"; + break; + // nothing from 0xb0 to 0xb1 + case NL_PRODUCT_CLOUD: + OSString += " Cloud"; + break; + case NL_PRODUCT_CLOUDN: + OSString += " Cloud N"; + break; + default: OSString += toString(" Unknown Edition (0x%04x)", dwType); } From f1cdcd1654e9522e347001a0c1918f36b23b506a Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Nov 2017 18:30:30 +0100 Subject: [PATCH 2/9] Changed: More memory leaks detection --HG-- branch : develop --- code/nel/src/net/buf_client.cpp | 4 +++ code/nel/src/net/inet_address.cpp | 4 +++ code/nel/src/net/module.cpp | 4 +++ code/nel/src/net/stdnet.h | 34 +++++++++++-------- code/nel/src/net/transport_class.cpp | 3 ++ code/nel/src/pacs/surface_quad.cpp | 4 +++ code/nel/src/sound/audio_mixer_user.cpp | 4 +++ code/nel/src/sound/sound_bank.cpp | 4 +++ code/nel/src/sound/stdsound.h | 17 ++++++++-- code/ryzom/client/src/far_tp.cpp | 6 ++++ code/ryzom/client/src/ig_callback.cpp | 3 ++ code/ryzom/client/src/init.cpp | 4 +++ .../src/interface_v3/action_phrase_faber.cpp | 4 +++ .../ryzom/client/src/motion/user_controls.cpp | 3 ++ code/ryzom/client/src/movie_shooter.cpp | 3 ++ code/ryzom/client/src/net_manager.cpp | 3 ++ code/ryzom/client/src/network_connection.cpp | 11 ++++++ code/ryzom/client/src/pacs_client.cpp | 4 +++ code/ryzom/client/src/scalable_time.cpp | 4 +++ code/ryzom/client/src/session_browser.cpp | 4 +++ .../ryzom/client/src/session_browser_impl.cpp | 4 +++ code/ryzom/client/src/sheet_manager.cpp | 3 ++ code/ryzom/client/src/sky.cpp | 4 +++ code/ryzom/client/src/sky_material_setup.cpp | 4 +++ code/ryzom/client/src/sky_object.cpp | 4 +++ code/ryzom/client/src/sky_render.cpp | 3 ++ code/ryzom/client/src/sound_manager.cpp | 4 +++ code/ryzom/client/src/stage.cpp | 3 ++ code/ryzom/client/src/streamable_entity.cpp | 3 ++ .../src/streamable_entity_composite.cpp | 4 +++ code/ryzom/client/src/streamable_ig.cpp | 4 +++ .../client/src/string_manager_client.cpp | 4 +++ code/ryzom/client/src/teleport.cpp | 3 ++ code/ryzom/client/src/text_manager.cpp | 4 +++ code/ryzom/client/src/time_client.cpp | 3 ++ code/ryzom/client/src/timed_fx_manager.cpp | 4 +-- code/ryzom/client/src/user_agent.cpp | 4 +++ code/ryzom/client/src/user_entity.cpp | 4 +++ code/ryzom/client/src/view.cpp | 4 +++ code/ryzom/client/src/village.cpp | 4 +++ code/ryzom/client/src/water_env_map_rdr.cpp | 4 +++ code/ryzom/client/src/water_map.cpp | 3 ++ code/ryzom/client/src/weather.cpp | 3 ++ .../client/src/weather_manager_client.cpp | 4 +++ .../ryzom/client/src/weather_setup_client.cpp | 3 ++ .../client/src/world_database_manager.cpp | 3 ++ code/ryzom/client/src/zone_util.cpp | 3 ++ code/ryzom/common/src/game_share/dms.cpp | 3 ++ code/ryzom/common/src/game_share/dyn_chat.cpp | 4 +++ code/ryzom/common/src/game_share/fame.cpp | 4 +++ .../src/game_share/generic_xml_msg_mngr.cpp | 4 +++ code/ryzom/common/src/game_share/mirror.cpp | 4 +++ .../src/game_share/mirror_prop_value.cpp | 3 ++ code/ryzom/common/src/game_share/object.cpp | 4 +++ .../src/game_share/persistent_data_tree.cpp | 3 ++ .../common/src/game_share/ring_access.cpp | 3 ++ code/ryzom/common/src/game_share/scenario.cpp | 4 +++ .../src/game_share/server_edition_module.cpp | 3 ++ code/ryzom/common/src/game_share/simlag.cpp | 4 +++ code/ryzom/common/src/game_share/stdpch.h | 13 ++++++- .../src/game_share/visual_slot_manager.cpp | 4 +++ 61 files changed, 264 insertions(+), 20 deletions(-) diff --git a/code/nel/src/net/buf_client.cpp b/code/nel/src/net/buf_client.cpp index 350b2d6db..18ce7babf 100644 --- a/code/nel/src/net/buf_client.cpp +++ b/code/nel/src/net/buf_client.cpp @@ -32,6 +32,10 @@ # include #endif +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace NLMISC; using namespace std; diff --git a/code/nel/src/net/inet_address.cpp b/code/nel/src/net/inet_address.cpp index 093bf8dcb..13ae02c39 100644 --- a/code/nel/src/net/inet_address.cpp +++ b/code/nel/src/net/inet_address.cpp @@ -121,6 +121,10 @@ BOOLEAN IN6_IS_ADDR_UNSPECIFIED(CONST IN6_ADDR *a) using namespace std; using namespace NLMISC; +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + #ifndef NI_MAXHOST # define NI_MAXHOST 1025 #endif diff --git a/code/nel/src/net/module.cpp b/code/nel/src/net/module.cpp index 73a1c7867..1b5e03bec 100644 --- a/code/nel/src/net/module.cpp +++ b/code/nel/src/net/module.cpp @@ -24,6 +24,10 @@ #include "nel/net/module_gateway.h" #include "nel/net/module_socket.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace std; using namespace NLMISC; using namespace NLNET; diff --git a/code/nel/src/net/stdnet.h b/code/nel/src/net/stdnet.h index 16e87c9f8..6ced991a5 100644 --- a/code/nel/src/net/stdnet.h +++ b/code/nel/src/net/stdnet.h @@ -17,20 +17,11 @@ #ifndef NL_STDNET_H #define NL_STDNET_H -#include "nel/misc/types_nl.h" - -#ifdef NL_OS_WINDOWS -# define WIN32_LEAN_AND_MEAN -# define _WIN32_WINDOWS 0x0500 -# ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0500 -# endif -# ifndef NL_COMP_MINGW -# define WINVER 0x0500 -# define NOMINMAX -# endif -# include -# include +#if defined(_MSC_VER) && defined(_DEBUG) +#define _CRTDBG_MAP_ALLOC +#include +#include +#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) #endif #include @@ -55,6 +46,7 @@ #include +#include "nel/misc/types_nl.h" #include "nel/misc/debug.h" #include "nel/misc/common.h" #include "nel/misc/stream.h" @@ -64,4 +56,18 @@ #include "nel/misc/mem_stream.h" #include "nel/misc/hierarchical_timer.h" +#ifdef NL_OS_WINDOWS +# define WIN32_LEAN_AND_MEAN +# define _WIN32_WINDOWS 0x0500 +# ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0500 +# endif +# ifndef NL_COMP_MINGW +# define WINVER 0x0500 +# define NOMINMAX +# endif +# include +# include +#endif + #endif diff --git a/code/nel/src/net/transport_class.cpp b/code/nel/src/net/transport_class.cpp index 810ea6928..9dade0190 100644 --- a/code/nel/src/net/transport_class.cpp +++ b/code/nel/src/net/transport_class.cpp @@ -33,6 +33,9 @@ #include "nel/net/transport_class.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif // // Namespace diff --git a/code/nel/src/pacs/surface_quad.cpp b/code/nel/src/pacs/surface_quad.cpp index dade8462c..308dc0054 100644 --- a/code/nel/src/pacs/surface_quad.cpp +++ b/code/nel/src/pacs/surface_quad.cpp @@ -19,6 +19,10 @@ #include "nel/misc/file.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace NLMISC; using namespace std; diff --git a/code/nel/src/sound/audio_mixer_user.cpp b/code/nel/src/sound/audio_mixer_user.cpp index 5a21650e0..854a2c1dc 100644 --- a/code/nel/src/sound/audio_mixer_user.cpp +++ b/code/nel/src/sound/audio_mixer_user.cpp @@ -56,6 +56,10 @@ #include "nel/sound/containers.h" #include "nel/sound/audio_decoder.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace std; using namespace NLMISC; diff --git a/code/nel/src/sound/sound_bank.cpp b/code/nel/src/sound/sound_bank.cpp index ee00e1742..29621d337 100644 --- a/code/nel/src/sound/sound_bank.cpp +++ b/code/nel/src/sound/sound_bank.cpp @@ -33,6 +33,10 @@ #include "nel/georges/load_form.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace std; using namespace NLMISC; using namespace NLGEORGES; diff --git a/code/nel/src/sound/stdsound.h b/code/nel/src/sound/stdsound.h index 071e2c70c..474e64441 100644 --- a/code/nel/src/sound/stdsound.h +++ b/code/nel/src/sound/stdsound.h @@ -14,9 +14,15 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "nel/misc/types_nl.h" -#include "nel/misc/common.h" -#include "nel/misc/debug.h" +#ifndef SOUND_STDPCH_H +#define SOUND_STDPCH_H + +#if defined(_MSC_VER) && defined(_DEBUG) +#define _CRTDBG_MAP_ALLOC +#include +#include +#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) +#endif #include #include @@ -40,6 +46,11 @@ #include +#include "nel/misc/types_nl.h" +#include "nel/misc/common.h" +#include "nel/misc/debug.h" #include "nel/misc/vector.h" #include "nel/misc/path.h" #include "nel/misc/file.h" + +#endif diff --git a/code/ryzom/client/src/far_tp.cpp b/code/ryzom/client/src/far_tp.cpp index bafb62103..577477ea2 100644 --- a/code/ryzom/client/src/far_tp.cpp +++ b/code/ryzom/client/src/far_tp.cpp @@ -45,6 +45,12 @@ #include "login_progress_post_thread.h" #include "interface_v3/action_handler_base.h" #include "item_group_manager.h" + +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + + using namespace NLMISC; using namespace NLNET; using namespace NL3D; diff --git a/code/ryzom/client/src/ig_callback.cpp b/code/ryzom/client/src/ig_callback.cpp index 49b790d77..bf7b41625 100644 --- a/code/ryzom/client/src/ig_callback.cpp +++ b/code/ryzom/client/src/ig_callback.cpp @@ -45,6 +45,9 @@ #include "client_sheets/plant_sheet.h" #include +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif #define RZ_PRIM_ZEXT_BLOCK_AVOIDANCE 2.0f diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 244ef3384..6fc794d52 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -114,6 +114,10 @@ extern HWND SlashScreen; #include +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + /////////// // USING // /////////// diff --git a/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp b/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp index d872f4553..11f0b1b88 100644 --- a/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp +++ b/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp @@ -35,6 +35,10 @@ #include "skill_manager.h" #include "game_share/bot_chat_types.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace std; using namespace NLMISC; diff --git a/code/ryzom/client/src/motion/user_controls.cpp b/code/ryzom/client/src/motion/user_controls.cpp index 897cba9c1..a3a4751e7 100644 --- a/code/ryzom/client/src/motion/user_controls.cpp +++ b/code/ryzom/client/src/motion/user_controls.cpp @@ -37,6 +37,9 @@ // #include "../r2/editor.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif /////////// // Using // diff --git a/code/ryzom/client/src/movie_shooter.cpp b/code/ryzom/client/src/movie_shooter.cpp index 0bf6015bf..1358a20c4 100644 --- a/code/ryzom/client/src/movie_shooter.cpp +++ b/code/ryzom/client/src/movie_shooter.cpp @@ -31,6 +31,9 @@ #include "nel/misc/debug.h" #include "nel/misc/system_info.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif /////////// // USING // diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 42285a167..d2789d2b9 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -89,6 +89,9 @@ // Std. #include +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif #define OLD_STRING_SYSTEM #define BAR_STEP_TP 2 diff --git a/code/ryzom/client/src/network_connection.cpp b/code/ryzom/client/src/network_connection.cpp index 2638f4162..730cb3477 100644 --- a/code/ryzom/client/src/network_connection.cpp +++ b/code/ryzom/client/src/network_connection.cpp @@ -98,6 +98,11 @@ using namespace CLFECOMMON; #include #include #include + +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + // Stat: array of vectors of cycles when a pos is received, indexed by TCLEntityId struct TRDateState { @@ -215,6 +220,12 @@ NLMISC_COMMAND( displayReceiveLog, "Flush the receive log into ReceiveLog.log", return true; } +#else + +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + #endif // MEASURE_RECEIVE_DATES extern NL3D::UDriver *Driver; diff --git a/code/ryzom/client/src/pacs_client.cpp b/code/ryzom/client/src/pacs_client.cpp index 8e622d410..c021f7c1c 100644 --- a/code/ryzom/client/src/pacs_client.cpp +++ b/code/ryzom/client/src/pacs_client.cpp @@ -27,6 +27,10 @@ #include "ig_callback.h" #include "ig_client.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + /////////// // USING // /////////// diff --git a/code/ryzom/client/src/scalable_time.cpp b/code/ryzom/client/src/scalable_time.cpp index dac59e198..9beb70795 100644 --- a/code/ryzom/client/src/scalable_time.cpp +++ b/code/ryzom/client/src/scalable_time.cpp @@ -21,6 +21,10 @@ #include "time_client.h" #include "nel/misc/time_nl.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + // ************************************************************************************************* CScalableTime::CScalableTime() { diff --git a/code/ryzom/client/src/session_browser.cpp b/code/ryzom/client/src/session_browser.cpp index 46ef37a0a..e2fa97c6d 100644 --- a/code/ryzom/client/src/session_browser.cpp +++ b/code/ryzom/client/src/session_browser.cpp @@ -20,6 +20,10 @@ #include "game_share/r2_share_itf.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace std; using namespace NLMISC; using namespace NLNET; diff --git a/code/ryzom/client/src/session_browser_impl.cpp b/code/ryzom/client/src/session_browser_impl.cpp index 9e82a6d15..9762c4a90 100644 --- a/code/ryzom/client/src/session_browser_impl.cpp +++ b/code/ryzom/client/src/session_browser_impl.cpp @@ -34,6 +34,10 @@ // #include "game_share/shard_names.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace std; using namespace NLMISC; using namespace RSMGR; diff --git a/code/ryzom/client/src/sheet_manager.cpp b/code/ryzom/client/src/sheet_manager.cpp index 38a185d15..1c7f1f5ca 100644 --- a/code/ryzom/client/src/sheet_manager.cpp +++ b/code/ryzom/client/src/sheet_manager.cpp @@ -40,6 +40,9 @@ // Game Share #include "game_share/visual_slot_manager.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif /////////// // USING // diff --git a/code/ryzom/client/src/sky.cpp b/code/ryzom/client/src/sky.cpp index 9b3474ada..eb7f70d7c 100644 --- a/code/ryzom/client/src/sky.cpp +++ b/code/ryzom/client/src/sky.cpp @@ -19,6 +19,10 @@ #include "sky.h" #include "client_sheets/sky_sheet.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace NL3D; using namespace NLMISC; diff --git a/code/ryzom/client/src/sky_material_setup.cpp b/code/ryzom/client/src/sky_material_setup.cpp index 8ee2d2a27..10074ba6b 100644 --- a/code/ryzom/client/src/sky_material_setup.cpp +++ b/code/ryzom/client/src/sky_material_setup.cpp @@ -22,6 +22,10 @@ #include "nel/3d/u_instance_material.h" #include "sky_material_setup.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace NL3D; H_AUTO_DECL(RZ_SkyMaterialSetup) diff --git a/code/ryzom/client/src/sky_object.cpp b/code/ryzom/client/src/sky_object.cpp index ad6b7615f..94185ef93 100644 --- a/code/ryzom/client/src/sky_object.cpp +++ b/code/ryzom/client/src/sky_object.cpp @@ -26,6 +26,10 @@ #include "sky_object.h" #include "sky.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace NLMISC; using namespace NL3D; diff --git a/code/ryzom/client/src/sky_render.cpp b/code/ryzom/client/src/sky_render.cpp index fc3f3b09f..e917d3680 100644 --- a/code/ryzom/client/src/sky_render.cpp +++ b/code/ryzom/client/src/sky_render.cpp @@ -32,6 +32,9 @@ #include "light_cycle_manager.h" #include "global.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif H_AUTO_DECL(RZ_SkyRender) diff --git a/code/ryzom/client/src/sound_manager.cpp b/code/ryzom/client/src/sound_manager.cpp index 5c1f49b1c..8a91c81ff 100644 --- a/code/ryzom/client/src/sound_manager.cpp +++ b/code/ryzom/client/src/sound_manager.cpp @@ -53,6 +53,10 @@ # include "view.h" #endif +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + extern CLightCycleManager LightCycleManager; extern NL3D::UDriver *Driver; extern NL3D::UCamera MainCam; diff --git a/code/ryzom/client/src/stage.cpp b/code/ryzom/client/src/stage.cpp index 9211f3d6c..05db01768 100644 --- a/code/ryzom/client/src/stage.cpp +++ b/code/ryzom/client/src/stage.cpp @@ -24,6 +24,9 @@ #include "stage.h" #include "game_share/entity_types.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif /////////// // USING // diff --git a/code/ryzom/client/src/streamable_entity.cpp b/code/ryzom/client/src/streamable_entity.cpp index f1c19efd9..1bba624dc 100644 --- a/code/ryzom/client/src/streamable_entity.cpp +++ b/code/ryzom/client/src/streamable_entity.cpp @@ -19,6 +19,9 @@ #include "stdpch.h" #include "streamable_entity.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif H_AUTO_DECL(RZ_StreamableEntity) diff --git a/code/ryzom/client/src/streamable_entity_composite.cpp b/code/ryzom/client/src/streamable_entity_composite.cpp index ae9f1998e..01e4aff17 100644 --- a/code/ryzom/client/src/streamable_entity_composite.cpp +++ b/code/ryzom/client/src/streamable_entity_composite.cpp @@ -21,6 +21,10 @@ #include "streamable_entity_composite.h" #include "nel/misc/progress_callback.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + H_AUTO_DECL(RZ_StremableEntityComposite) //=============================================================================== diff --git a/code/ryzom/client/src/streamable_ig.cpp b/code/ryzom/client/src/streamable_ig.cpp index e93b62c4c..eaaea24f5 100644 --- a/code/ryzom/client/src/streamable_ig.cpp +++ b/code/ryzom/client/src/streamable_ig.cpp @@ -28,6 +28,10 @@ #include "streamable_ig.h" #include "continent_manager.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + extern CContinentManager ContinentMngr; H_AUTO_DECL(RZ_StremableIG) diff --git a/code/ryzom/client/src/string_manager_client.cpp b/code/ryzom/client/src/string_manager_client.cpp index b4edce7e1..cf83a1e0a 100644 --- a/code/ryzom/client/src/string_manager_client.cpp +++ b/code/ryzom/client/src/string_manager_client.cpp @@ -27,6 +27,10 @@ #include "misc.h" #include "entity_cl.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace std; using namespace NLMISC; diff --git a/code/ryzom/client/src/teleport.cpp b/code/ryzom/client/src/teleport.cpp index c85c938fa..60d96c794 100644 --- a/code/ryzom/client/src/teleport.cpp +++ b/code/ryzom/client/src/teleport.cpp @@ -29,6 +29,9 @@ #include "nel/georges/u_form_elm.h" #include "nel/georges/u_form_loader.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif /////////// // USING // diff --git a/code/ryzom/client/src/text_manager.cpp b/code/ryzom/client/src/text_manager.cpp index 9d152dcc9..bb78bffff 100644 --- a/code/ryzom/client/src/text_manager.cpp +++ b/code/ryzom/client/src/text_manager.cpp @@ -25,6 +25,10 @@ #include "text_manager.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + /////////// // USING // /////////// diff --git a/code/ryzom/client/src/time_client.cpp b/code/ryzom/client/src/time_client.cpp index 495e0af66..c67f70d05 100644 --- a/code/ryzom/client/src/time_client.cpp +++ b/code/ryzom/client/src/time_client.cpp @@ -34,6 +34,9 @@ #include "weather.h" #include "game_share/light_cycle.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif /////////// // USING // diff --git a/code/ryzom/client/src/timed_fx_manager.cpp b/code/ryzom/client/src/timed_fx_manager.cpp index d37ab782f..8741e5197 100644 --- a/code/ryzom/client/src/timed_fx_manager.cpp +++ b/code/ryzom/client/src/timed_fx_manager.cpp @@ -32,8 +32,8 @@ #include "nel/misc/check_fpu.h" -#if defined(NL_DEBUG) && defined(NL_OS_WINDOWS) - #include +#ifdef DEBUG_NEW +#define new DEBUG_NEW #endif using namespace std::rel_ops; diff --git a/code/ryzom/client/src/user_agent.cpp b/code/ryzom/client/src/user_agent.cpp index 7ba2b4e38..25e84bcb7 100644 --- a/code/ryzom/client/src/user_agent.cpp +++ b/code/ryzom/client/src/user_agent.cpp @@ -47,6 +47,10 @@ #define RYZOM_CLIENT_ICON "ryzom_client" #endif +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + std::string getUserAgent() { return getUserAgentName() + "/" + getUserAgentVersion(); diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index cad200aeb..80fccf07c 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -80,6 +80,10 @@ // r2 #include "r2/editor.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + /////////// // USING // /////////// diff --git a/code/ryzom/client/src/view.cpp b/code/ryzom/client/src/view.cpp index 4bc52af08..8d097d142 100644 --- a/code/ryzom/client/src/view.cpp +++ b/code/ryzom/client/src/view.cpp @@ -37,6 +37,10 @@ #include "motion/user_controls.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using NL3D::UVisualCollisionManager; extern UVisualCollisionManager *CollisionManager; diff --git a/code/ryzom/client/src/village.cpp b/code/ryzom/client/src/village.cpp index 5a94d93d3..41d698782 100644 --- a/code/ryzom/client/src/village.cpp +++ b/code/ryzom/client/src/village.cpp @@ -33,6 +33,10 @@ #include "pacs_client.h" #include "client_cfg.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace NLMISC; using namespace std; diff --git a/code/ryzom/client/src/water_env_map_rdr.cpp b/code/ryzom/client/src/water_env_map_rdr.cpp index a5294a74d..a1d87ae23 100644 --- a/code/ryzom/client/src/water_env_map_rdr.cpp +++ b/code/ryzom/client/src/water_env_map_rdr.cpp @@ -27,6 +27,10 @@ #include "nel/misc/matrix.h" #include "nel/misc/vectord.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace NL3D; using namespace NLMISC; diff --git a/code/ryzom/client/src/water_map.cpp b/code/ryzom/client/src/water_map.cpp index 76a4119f7..727b48311 100644 --- a/code/ryzom/client/src/water_map.cpp +++ b/code/ryzom/client/src/water_map.cpp @@ -31,6 +31,9 @@ #include "nel/misc/path.h" #include "nel/misc/file.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif extern NL3D::UScene *Scene; extern NL3D::UDriver *Driver; diff --git a/code/ryzom/client/src/weather.cpp b/code/ryzom/client/src/weather.cpp index 91fad6f7c..5891ecb9f 100644 --- a/code/ryzom/client/src/weather.cpp +++ b/code/ryzom/client/src/weather.cpp @@ -36,6 +36,9 @@ // #include "r2/editor.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif H_AUTO_DECL(RZ_Weather) diff --git a/code/ryzom/client/src/weather_manager_client.cpp b/code/ryzom/client/src/weather_manager_client.cpp index 8c0018fdf..81bf0236f 100644 --- a/code/ryzom/client/src/weather_manager_client.cpp +++ b/code/ryzom/client/src/weather_manager_client.cpp @@ -31,6 +31,10 @@ #include "sound_manager.h" #include "client_cfg.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + H_AUTO_DECL(RZ_WeatherManagerClient) using namespace NLMISC; diff --git a/code/ryzom/client/src/weather_setup_client.cpp b/code/ryzom/client/src/weather_setup_client.cpp index 54df5d05f..519b29d3a 100644 --- a/code/ryzom/client/src/weather_setup_client.cpp +++ b/code/ryzom/client/src/weather_setup_client.cpp @@ -25,6 +25,9 @@ using namespace NLMISC; +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif H_AUTO_DECL(RZ_WeatherSetupClient) diff --git a/code/ryzom/client/src/world_database_manager.cpp b/code/ryzom/client/src/world_database_manager.cpp index a735ab982..72add4415 100644 --- a/code/ryzom/client/src/world_database_manager.cpp +++ b/code/ryzom/client/src/world_database_manager.cpp @@ -25,6 +25,9 @@ #include "world_database_manager.h" #include "continent_manager.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif ///////////// // GLOBALS // diff --git a/code/ryzom/client/src/zone_util.cpp b/code/ryzom/client/src/zone_util.cpp index c5616d0e0..33b7fdf68 100644 --- a/code/ryzom/client/src/zone_util.cpp +++ b/code/ryzom/client/src/zone_util.cpp @@ -23,6 +23,9 @@ using namespace std; +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif bool getPosFromZoneName(const std::string &name,NLMISC::CVector2f &dest) { diff --git a/code/ryzom/common/src/game_share/dms.cpp b/code/ryzom/common/src/game_share/dms.cpp index 8f8af5b51..3619c294c 100644 --- a/code/ryzom/common/src/game_share/dms.cpp +++ b/code/ryzom/common/src/game_share/dms.cpp @@ -45,6 +45,9 @@ #include "server_edition_module.h" #include "server_animation_module.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif using namespace R2; using namespace NLNET; diff --git a/code/ryzom/common/src/game_share/dyn_chat.cpp b/code/ryzom/common/src/game_share/dyn_chat.cpp index aae0015d7..eed4f33b0 100644 --- a/code/ryzom/common/src/game_share/dyn_chat.cpp +++ b/code/ryzom/common/src/game_share/dyn_chat.cpp @@ -17,6 +17,10 @@ #include "stdpch.h" #include "dyn_chat.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace NLMISC; NL_INSTANCE_COUNTER_IMPL(CDynChatSession); diff --git a/code/ryzom/common/src/game_share/fame.cpp b/code/ryzom/common/src/game_share/fame.cpp index 919ee3c93..a0e633199 100644 --- a/code/ryzom/common/src/game_share/fame.cpp +++ b/code/ryzom/common/src/game_share/fame.cpp @@ -24,6 +24,10 @@ //#include "../entities_game_service/egs_variables.h" //#include "pvp_clan.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace std; using namespace NLMISC; using namespace STRING_MANAGER; diff --git a/code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp b/code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp index b3c002015..fd30af70d 100644 --- a/code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp +++ b/code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp @@ -22,6 +22,10 @@ #include "nel/misc/file.h" #include "nel/misc/xml_auto_ptr.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace std; using namespace NLMISC; diff --git a/code/ryzom/common/src/game_share/mirror.cpp b/code/ryzom/common/src/game_share/mirror.cpp index 0e634afaf..23e975831 100644 --- a/code/ryzom/common/src/game_share/mirror.cpp +++ b/code/ryzom/common/src/game_share/mirror.cpp @@ -21,6 +21,10 @@ #include "synchronised_message.h" #include "tick_proxy_time_measure.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace NLMISC; using namespace NLNET; using namespace std; diff --git a/code/ryzom/common/src/game_share/mirror_prop_value.cpp b/code/ryzom/common/src/game_share/mirror_prop_value.cpp index 5383a2443..5bb63e2d0 100644 --- a/code/ryzom/common/src/game_share/mirror_prop_value.cpp +++ b/code/ryzom/common/src/game_share/mirror_prop_value.cpp @@ -19,6 +19,9 @@ #include "stdpch.h" #include "mirror_prop_value.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif sint32 NbAllocdListCells = 0; sint32 MaxNbAllocdListCells = 0; diff --git a/code/ryzom/common/src/game_share/object.cpp b/code/ryzom/common/src/game_share/object.cpp index f914085e4..326e6dd1f 100644 --- a/code/ryzom/common/src/game_share/object.cpp +++ b/code/ryzom/common/src/game_share/object.cpp @@ -25,6 +25,10 @@ #include +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + namespace R2 { diff --git a/code/ryzom/common/src/game_share/persistent_data_tree.cpp b/code/ryzom/common/src/game_share/persistent_data_tree.cpp index d10f01013..a8a15f06a 100644 --- a/code/ryzom/common/src/game_share/persistent_data_tree.cpp +++ b/code/ryzom/common/src/game_share/persistent_data_tree.cpp @@ -77,6 +77,9 @@ #include "stdpch.h" #include "persistent_data_tree.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif //----------------------------------------------------------------------------- // Namespaces diff --git a/code/ryzom/common/src/game_share/ring_access.cpp b/code/ryzom/common/src/game_share/ring_access.cpp index 9e0ba8ce4..479b69291 100644 --- a/code/ryzom/common/src/game_share/ring_access.cpp +++ b/code/ryzom/common/src/game_share/ring_access.cpp @@ -35,6 +35,9 @@ #include "nel/misc/xml_auto_ptr.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif using namespace std; using namespace R2; diff --git a/code/ryzom/common/src/game_share/scenario.cpp b/code/ryzom/common/src/game_share/scenario.cpp index e2437eac2..3782c45cf 100644 --- a/code/ryzom/common/src/game_share/scenario.cpp +++ b/code/ryzom/common/src/game_share/scenario.cpp @@ -31,6 +31,10 @@ #include "nel/misc/file.h" #include "nel/misc/algo.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + using namespace R2; //---------------------------------------------------------------- namespace R2 diff --git a/code/ryzom/common/src/game_share/server_edition_module.cpp b/code/ryzom/common/src/game_share/server_edition_module.cpp index b3e4c6b53..79cf9a6f2 100644 --- a/code/ryzom/common/src/game_share/server_edition_module.cpp +++ b/code/ryzom/common/src/game_share/server_edition_module.cpp @@ -60,6 +60,9 @@ //#include "server_admin_module.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif using namespace std; using namespace NLMISC; diff --git a/code/ryzom/common/src/game_share/simlag.cpp b/code/ryzom/common/src/game_share/simlag.cpp index 0468caa2b..86f61b60b 100644 --- a/code/ryzom/common/src/game_share/simlag.cpp +++ b/code/ryzom/common/src/game_share/simlag.cpp @@ -22,6 +22,10 @@ // Includes // +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + // // Using // diff --git a/code/ryzom/common/src/game_share/stdpch.h b/code/ryzom/common/src/game_share/stdpch.h index cdec993d9..46c71bcfe 100644 --- a/code/ryzom/common/src/game_share/stdpch.h +++ b/code/ryzom/common/src/game_share/stdpch.h @@ -14,7 +14,15 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "nel/misc/types_nl.h" +#ifndef GAMESHARE_STDPCH_H +#define GAMESHARE_STDPCH_H + +#if defined(_MSC_VER) && defined(_DEBUG) +#define _CRTDBG_MAP_ALLOC +#include +#include +#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) +#endif #include #include @@ -38,6 +46,7 @@ #include #include +#include "nel/misc/types_nl.h" #include #include @@ -75,3 +84,5 @@ # include # include #endif + +#endif diff --git a/code/ryzom/common/src/game_share/visual_slot_manager.cpp b/code/ryzom/common/src/game_share/visual_slot_manager.cpp index bc2410eea..4c4470a5b 100644 --- a/code/ryzom/common/src/game_share/visual_slot_manager.cpp +++ b/code/ryzom/common/src/game_share/visual_slot_manager.cpp @@ -30,6 +30,10 @@ #include "visual_slot_manager.h" +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif + //////////////////// // STATIC MEMBERS // //////////////////// From 7f1168293a82f1714a2c6deee1539c73d2d68fd2 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Nov 2017 19:05:14 +0100 Subject: [PATCH 3/9] Fixed: Compilation --HG-- branch : develop --- code/ryzom/client/src/network_connection.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/ryzom/client/src/network_connection.cpp b/code/ryzom/client/src/network_connection.cpp index 730cb3477..133f92af1 100644 --- a/code/ryzom/client/src/network_connection.cpp +++ b/code/ryzom/client/src/network_connection.cpp @@ -2976,7 +2976,15 @@ void CNetworkConnection::reinit() // Reuse the udp socket _Connection.~CUdpSimSock(); + +#ifdef new +#undef new +#endif new (&_Connection) CUdpSimSock(); + +#ifdef DEBUG_NEW +#define new DEBUG_NEW +#endif } // sends system sync acknowledge From d099e98dae6674e7689cbe72a93a82b95c2985e5 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Nov 2017 19:06:03 +0100 Subject: [PATCH 4/9] Changed: Moved strFindReplaceAll to algo.h --HG-- branch : develop --- code/nel/include/nel/misc/algo.h | 8 ++++++++ code/nel/src/gui/lua_ihm.cpp | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/code/nel/include/nel/misc/algo.h b/code/nel/include/nel/misc/algo.h index 72d9ae3ae..50493538f 100644 --- a/code/nel/include/nel/misc/algo.h +++ b/code/nel/include/nel/misc/algo.h @@ -211,6 +211,14 @@ bool strFindReplace(T &str, const char *strFind, const U &strReplace) return strFindReplace(str, tempStr, strReplace); } +template +T strFindReplaceAll(const T &str, const T &search, const T &replace) +{ + T ret = str; + while (strFindReplace(ret, search, replace)); + return ret; +} + // set flags in a bit set template inline void setFlags(T &dest, U mask, bool on) diff --git a/code/nel/src/gui/lua_ihm.cpp b/code/nel/src/gui/lua_ihm.cpp index fed1340a0..0b4a1d0dc 100644 --- a/code/nel/src/gui/lua_ihm.cpp +++ b/code/nel/src/gui/lua_ihm.cpp @@ -1817,9 +1817,7 @@ namespace NLGUI ucstring CLuaIHM::findReplaceAll(const ucstring &str, const ucstring &search, const ucstring &replace) { //H_AUTO(Lua_CLuaIHM_findReplaceAll) - ucstring ret= str; - while(strFindReplace(ret, search, replace)); - return ret; + return strFindReplaceAll(str, search, replace); } // *************************************************************************** From 93c2f55290101bcfba2f2f0927de592c583e639d Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Nov 2017 19:07:19 +0100 Subject: [PATCH 5/9] Changed: Minor changes --HG-- branch : develop --- code/nel/src/misc/common.cpp | 8 ++++---- code/ryzom/client/src/login_patch.cpp | 4 ++-- code/ryzom/client/src/user_entity.h | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 7eebdafbf..4d849b2d5 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -894,8 +894,8 @@ bool launchProgram(const std::string &programName, const std::string &arguments, int status = vfork (); ///////////////////////////////////////////////////////// - /// WARNING : NO MORE INSTRUCTION AFTER VFORK ! - /// READ VFORK manual + // WARNING : NO MORE INSTRUCTION AFTER VFORK ! + // READ VFORK manual ///////////////////////////////////////////////////////// if (status == -1) { @@ -1000,8 +1000,8 @@ bool launchProgramArray (const std::string &programName, const std::vector arguments; - + std::string startupPath = Args.getStartupPath(); // 3 first parameters are Ryzom client full path, patch directory full path and client root directory full path diff --git a/code/ryzom/client/src/user_entity.h b/code/ryzom/client/src/user_entity.h index 7e693536b..1b2745cdd 100644 --- a/code/ryzom/client/src/user_entity.h +++ b/code/ryzom/client/src/user_entity.h @@ -423,6 +423,7 @@ public: void tp(const NLMISC::CVectorD &dest); /// Teleport the player to correct his position. void correctPos(const NLMISC::CVectorD &dest); + /// Skill Up void skillUp(); /// get the level of the player (max of all skills) From 3e4a873429d56fc24a5ae37871cd11cef90b6cdc Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Nov 2017 19:07:51 +0100 Subject: [PATCH 6/9] Changed: Implement escapeArgument function --HG-- branch : develop --- code/nel/include/nel/misc/common.h | 3 +++ code/nel/src/misc/common.cpp | 35 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index 4c2b38cca..180139ec0 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -394,6 +394,9 @@ std::string expandEnvironmentVariables(const std::string &s); bool explodeArguments(const std::string &str, std::vector &args); std::string joinArguments(const std::vector &args); +/// Escape an argument to not evaluate environment variables or special cases +std::string escapeArgument(const std::string &arg); + /// This function kills a program using his pid (on unix, it uses the kill() POSIX function) bool killProgram(uint32 pid); diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 4d849b2d5..23b02e668 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -1247,6 +1247,41 @@ std::string joinArguments(const std::vector &args) return res; } +std::string escapeArgument(const std::string &arg) +{ +#ifdef NL_OS_WINDOWS + // we can't escape %VARIABLE% on command-line under Windows + return arg; +#else + // characters to escapce, only " and $ (to prevent a $something replaced by an environment variable) + static const char s_charsToEscape[] = "\"$"; + + std::string res; + std::string::size_type pos = 0, lastPos = 0; + + // to avoid reallocations + res.reserve(arg.size() * 2); + + while ((pos = arg.find_first_of(s_charsToEscape, lastPos)) != std::string::npos) + { + // add previous part + res += arg.substr(lastPos, pos - lastPos); + + // not already escaped + if (!pos || arg[pos - 1] != '\\') res += '\\'; + + // add escaped character + res += arg[pos]; + + lastPos = pos+1; + } + + res += arg.substr(lastPos); + + return res; +#endif +} + /* * Display the bits (with 0 and 1) composing a byte (from right to left) */ From ed884644af83c55a561ac454736da2807d121c3f Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Nov 2017 19:08:47 +0100 Subject: [PATCH 7/9] Changed: Merged changes from compatibility-develop --HG-- branch : develop --- code/ryzom/client/src/net_manager.cpp | 19 +++++++++++++------ code/ryzom/client/src/user_entity.cpp | 10 ++++++++++ code/ryzom/client/src/user_entity.h | 16 +++++++++++++++- 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index d2789d2b9..2d5a4e2be 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -1407,12 +1407,19 @@ void impulseCorrectPos(NLMISC::CBitMemStream &impulse) if(UserEntity->mode() != MBEHAV::COMBAT_FLOAT) { - // Compute the destination. - CVectorD dest = CVectorD((float)x/1000.0f, (float)y/1000.0f, (float)z/1000.0f); - // Update the position for the vision. - NetMngr.setReferencePosition(dest); - // Change the user poisition. - UserEntity->correctPos(dest); + if (x == 0) // Get SpeedAdjustement + { + UserEntity->setSpeedServerAdjust(-0.2f); + } + else + { + // Compute the destination. + CVectorD dest = CVectorD((float)x/1000.0f, (float)y/1000.0f, (float)z/1000.0f); + // Update the position for the vision. + NetMngr.setReferencePosition(dest); + // Change the user poisition. + UserEntity->correctPos(dest); + } } }// impulseCorrectPos // diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index 80fccf07c..180832d7d 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -148,6 +148,8 @@ CUserEntity::CUserEntity() _FrontVelocity = 0.0f; _LateralVelocity = 0.0f; + _SpeedServerAdjust = 1.0f; + // \todo GUIGUI : do it more generic. _First_Pos = false; @@ -1209,7 +1211,11 @@ void CUserEntity::applyMotion(CEntityCL *target) speed = CVectorD::Null; } else + { speed = getVelocity()*_SpeedFactor.getValue(); + _SpeedFactor.addFactorValue(0.005f); + } + // SPEED VECTOR NULL -> NO MOVE if(speed == CVectorD::Null) return; @@ -1231,6 +1237,9 @@ void CUserEntity::applyMotion(CEntityCL *target) // Third Person View else { + double modif = (100.0f/(float)NetMngr.getMsPerTick()); + clamp(modif, 0.0, 1.0); + speed *= modif; speed += pos(); sint64 x = (sint64)((sint32)(speed.x * 1000.0)); sint64 y = (sint64)((sint32)(speed.y * 1000.0)); @@ -3483,6 +3492,7 @@ void CUserEntity::light() void CUserEntity::CSpeedFactor::init() { _Value = 1.0f; // Default speed factor is 1. + _ServerFactor = 1.0f; CInterfaceManager *IM = CInterfaceManager::getInstance (); CCDBNodeLeaf *pNodeLeaf = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:SPEED_FACTOR", false); if(pNodeLeaf) diff --git a/code/ryzom/client/src/user_entity.h b/code/ryzom/client/src/user_entity.h index 1b2745cdd..11501d2a0 100644 --- a/code/ryzom/client/src/user_entity.h +++ b/code/ryzom/client/src/user_entity.h @@ -297,6 +297,8 @@ public: // get the velocity vector of the entity NLMISC::CVector getVelocity() const; + inline void setSpeedServerAdjust(float speed) {_SpeedFactor.addFactorValue(speed);} + /// Check if the mount is able to run, and force walking mode if not void checkMountAbleToRun(); @@ -497,13 +499,23 @@ protected: /// Release void release(); /// Return the speed factor. - float getValue() const {return _Value;} + float getValue() const { return _Value * _ServerFactor; } + void setFactorValue(float value) {_ServerFactor = value;} + void addFactorValue(float value) { + _ServerFactor += value; + if (_ServerFactor > 1.0) + _ServerFactor = 1.0; + if (_ServerFactor < 0.1) + _ServerFactor = 0.1; + } + virtual void serial(class NLMISC::IStream &f) throw(NLMISC::EStream) {f.serial(_Value);} protected: /// Method called when the ping message is back. virtual void update(NLMISC::ICDBNode* leaf); private: float _Value; + float _ServerFactor; }; class CMountHunger @@ -546,6 +558,8 @@ protected: /// Velocity : Front and Lateral float _FrontVelocity; float _LateralVelocity; + /// Speed adjustement from gpms + float _SpeedServerAdjust; /// Head Pitch double _HeadPitch; /// Height of the eyes (camera). From 8c4cf11534fcca2ccb49c36bedbda186a841e06d Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Nov 2017 19:09:29 +0100 Subject: [PATCH 8/9] Changed: Write a message in log to tell that we're creating the patch script --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index ca19036e7..d2620af9c 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -881,6 +881,10 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool string err = toString("Can't open file '%s' for writing: code=%d %s (error code 29)", batchFilename.c_str(), errno, strerror(errno)); throw Exception (err); } + else + { + nlinfo("Creating %s...", batchFilename.c_str()); + } string contentPrefix; From bea0240cbba0af22d82facffdc454afc441fe6d0 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Nov 2017 19:11:27 +0100 Subject: [PATCH 9/9] Fixed: Escape password and login to prevent errors with special characters (such as | or &) --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index d2620af9c..a7b4fa43f 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -897,9 +897,9 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool contentPrefix += "set STARTUPPATH=%~4\n"; contentPrefix += toString("set UPGRADE_FILE=%%ROOTPATH%%\\%s\n", UpgradeBatchFilename.c_str()); contentPrefix += "\n"; - contentPrefix += "set LOGIN=%5\n"; - contentPrefix += "set PASSWORD=%6\n"; - contentPrefix += "set SHARDID=%7\n"; + contentPrefix += "set LOGIN=%~5\n"; + contentPrefix += "set PASSWORD=%~6\n"; + contentPrefix += "set SHARDID=%~7\n"; #else contentPrefix += "#!/bin/sh\n"; contentPrefix += "export RYZOM_CLIENT=\"$1\"\n"; @@ -908,9 +908,9 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool contentPrefix += "export STARTUPPATH=\"$4\"\n"; contentPrefix += toString("export UPGRADE_FILE=$ROOTPATH/%s\n", UpgradeBatchFilename.c_str()); contentPrefix += "\n"; - contentPrefix += "LOGIN=$5\n"; - contentPrefix += "PASSWORD=$6\n"; - contentPrefix += "SHARDID=$7\n"; + contentPrefix += "LOGIN=\"$5\"\n"; + contentPrefix += "PASSWORD=\"$6\"\n"; + contentPrefix += "SHARDID=\"$7\"\n"; #endif contentPrefix += "\n"; @@ -932,7 +932,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool if (wantRyzomRestart) { // client shouldn't be in memory anymore else it couldn't be overwritten - contentSuffix += toString("start \"\" /D \"%%STARTUPPATH%%\" \"%%RYZOM_CLIENT%%\" %s %%LOGIN%% %%PASSWORD%% %%SHARDID%%\n", additionalParams.c_str()); + contentSuffix += toString("start \"\" /D \"%%STARTUPPATH%%\" \"%%RYZOM_CLIENT%%\" %s \"%%LOGIN%%\ \"%%PASSWORD%%\" \"%%SHARDID%%\"\n", additionalParams.c_str()); } #else if (wantRyzomRestart) @@ -955,9 +955,9 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool // launch new client #ifdef NL_OS_MAC // use exec command under OS X - contentSuffix += toString("exec \"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID\n", additionalParams.c_str()); + contentSuffix += toString("exec \"$RYZOM_CLIENT\" %s \"$LOGIN\" \"$PASSWORD\" \"$SHARDID\"\n", additionalParams.c_str()); #else - contentSuffix += toString("\"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID &\n", additionalParams.c_str()); + contentSuffix += toString("\"$RYZOM_CLIENT\" %s \"$LOGIN\" \"$PASSWORD\" \"$SHARDID\" &\n", additionalParams.c_str()); #endif } #endif