Merge with develop

--HG--
branch : compatibility-develop
hg/compatibility-develop
kervala 7 years ago
commit 016f9dae35

@ -211,6 +211,14 @@ bool strFindReplace(T &str, const char *strFind, const U &strReplace)
return strFindReplace(str, tempStr, strReplace);
}
template<class T>
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 <class T, class U>
inline void setFlags(T &dest, U mask, bool on)

@ -394,6 +394,9 @@ std::string expandEnvironmentVariables(const std::string &s);
bool explodeArguments(const std::string &str, std::vector<std::string> &args);
std::string joinArguments(const std::vector<std::string> &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);

@ -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);
}
// ***************************************************************************

@ -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<std::
int status = vfork ();
/////////////////////////////////////////////////////////
/// WARNING : NO MORE INSTRUCTION AFTER VFORK !
/// READ VFORK manual
// WARNING : NO MORE INSTRUCTION AFTER VFORK !
// READ VFORK manual
/////////////////////////////////////////////////////////
if (status == -1)
{
@ -1247,6 +1247,41 @@ std::string joinArguments(const std::vector<std::string> &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)
*/

@ -23,6 +23,156 @@
# include <tchar.h>
# include <intrin.h>
# 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 <sys/types.h>
# include <sys/stat.h>
@ -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);
}

@ -32,6 +32,10 @@
# include <netinet/in.h>
#endif
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NLMISC;
using namespace std;

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

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

@ -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 <WinSock2.h>
# include <Windows.h>
#if defined(_MSC_VER) && defined(_DEBUG)
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#endif
#include <map>
@ -55,6 +46,7 @@
#include <errno.h>
#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 <WinSock2.h>
# include <Windows.h>
#endif
#endif

@ -33,6 +33,9 @@
#include "nel/net/transport_class.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
//
// Namespace

@ -19,6 +19,10 @@
#include "nel/misc/file.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NLMISC;
using namespace std;

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

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

@ -14,9 +14,15 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#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 <stdlib.h>
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#endif
#include <cstdlib>
#include <cstdio>
@ -40,6 +46,11 @@
#include <libxml/parser.h>
#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

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

@ -45,6 +45,9 @@
#include "client_sheets/plant_sheet.h"
#include <memory>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
#define RZ_PRIM_ZEXT_BLOCK_AVOIDANCE 2.0f

@ -114,6 +114,10 @@ extern HWND SlashScreen;
#include <new>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //
///////////

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

@ -764,7 +764,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool
{
// don't check result, because it's possible the olk file doesn't exist
CFile::deleteFile(fullDstPath + FileName);
// try to move it, if fails move it later in a script
if (CFile::moveFile(fullDstPath + FileName, ClientPatchPath + FileName))
succeeded = true;
@ -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;
@ -893,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";
@ -904,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";
@ -928,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)
@ -951,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
@ -993,7 +997,7 @@ void CPatchManager::executeBatchFile()
std::string batchFilename;
std::vector<std::string> arguments;
std::string startupPath = Args.getStartupPath();
// 3 first parameters are Ryzom client full path, patch directory full path and client root directory full path

@ -37,6 +37,9 @@
//
#include "../r2/editor.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// Using //

@ -31,6 +31,9 @@
#include "nel/misc/debug.h"
#include "nel/misc/system_info.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //

@ -89,6 +89,9 @@
// Std.
#include <vector>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
#define OLD_STRING_SYSTEM
#define BAR_STEP_TP 2

@ -98,6 +98,11 @@ using namespace CLFECOMMON;
#include <nel/misc/path.h>
#include <nel/misc/time_nl.h>
#include <nel/misc/command.h>
#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;
@ -2965,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

@ -27,6 +27,10 @@
#include "ig_callback.h"
#include "ig_client.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //
///////////

@ -21,6 +21,10 @@
#include "time_client.h"
#include "nel/misc/time_nl.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// *************************************************************************************************
CScalableTime::CScalableTime()
{

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

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

@ -40,6 +40,9 @@
// Game Share
#include "game_share/visual_slot_manager.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //

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

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

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

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

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

@ -24,6 +24,9 @@
#include "stage.h"
#include "game_share/entity_types.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //

@ -19,6 +19,9 @@
#include "stdpch.h"
#include "streamable_entity.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
H_AUTO_DECL(RZ_StreamableEntity)

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

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

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

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

@ -25,6 +25,10 @@
#include "text_manager.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //
///////////

@ -34,6 +34,9 @@
#include "weather.h"
#include "game_share/light_cycle.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //

@ -32,8 +32,8 @@
#include "nel/misc/check_fpu.h"
#if defined(NL_DEBUG) && defined(NL_OS_WINDOWS)
#include <crtdbg.h>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std::rel_ops;

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

@ -80,6 +80,10 @@
// r2
#include "r2/editor.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //
///////////

@ -425,7 +425,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)

@ -37,6 +37,10 @@
#include "motion/user_controls.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using NL3D::UVisualCollisionManager;
extern UVisualCollisionManager *CollisionManager;

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

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

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

@ -36,6 +36,9 @@
//
#include "r2/editor.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
H_AUTO_DECL(RZ_Weather)

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

@ -25,6 +25,9 @@
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
H_AUTO_DECL(RZ_WeatherSetupClient)

@ -25,6 +25,9 @@
#include "world_database_manager.h"
#include "continent_manager.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
/////////////
// GLOBALS //

@ -23,6 +23,9 @@
using namespace std;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
bool getPosFromZoneName(const std::string &name,NLMISC::CVector2f &dest)
{

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

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

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

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

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

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

@ -25,6 +25,10 @@
#include <zlib.h>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace R2
{

@ -77,6 +77,9 @@
#include "stdpch.h"
#include "persistent_data_tree.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
//-----------------------------------------------------------------------------
// Namespaces

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

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

@ -60,6 +60,9 @@
//#include "server_admin_module.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;

@ -22,6 +22,10 @@
// Includes
//
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
//
// Using
//

@ -14,7 +14,15 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#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 <stdlib.h>
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#endif
#include <stdlib.h>
#include <stdio.h>
@ -38,6 +46,7 @@
#include <memory>
#include <functional>
#include "nel/misc/types_nl.h"
#include <nel/misc/common.h>
#include <nel/misc/debug.h>
@ -75,3 +84,5 @@
# include <WinSock2.h>
# include <Windows.h>
#endif
#endif

@ -30,6 +30,10 @@
#include "visual_slot_manager.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
////////////////////
// STATIC MEMBERS //
////////////////////

Loading…
Cancel
Save