diff --git a/SystemTools.cxx b/SystemTools.cxx index ddf42b6c8c62667211a553797233eb1726957093..3857e415e226188c9ecdc0519b01eae5c5473a26 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -4906,10 +4906,56 @@ std::string SystemTools::GetOperatingSystemNameAndVersion() case VER_PLATFORM_WIN32_NT: // Test for the specific product family. + if (osvi.dwMajorVersion == 10 && osvi.dwMinorVersion == 0) + { + if (osvi.wProductType == VER_NT_WORKSTATION) + { + res += "Microsoft Windows 10"; + } + else + { + res += "Microsoft Windows Server 2016 family"; + } + } + + if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 3) + { + if (osvi.wProductType == VER_NT_WORKSTATION) + { + res += "Microsoft Windows 8.1"; + } + else + { + res += "Microsoft Windows Server 2012 R2 family"; + } + } + + if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 2) + { + if (osvi.wProductType == VER_NT_WORKSTATION) + { + res += "Microsoft Windows 8"; + } + else + { + res += "Microsoft Windows Server 2012 family"; + } + } + + if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1) + { + if (osvi.wProductType == VER_NT_WORKSTATION) + { + res += "Microsoft Windows 7"; + } + else + { + res += "Microsoft Windows Server 2008 R2 family"; + } + } if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0) { -#if (_MSC_VER >= 1300) if (osvi.wProductType == VER_NT_WORKSTATION) { res += "Microsoft Windows Vista"; @@ -4918,9 +4964,6 @@ std::string SystemTools::GetOperatingSystemNameAndVersion() { res += "Microsoft Windows Server 2008 family"; } -#else - res += "Microsoft Windows Vista or Windows Server 2008"; -#endif } if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) @@ -4949,7 +4992,6 @@ std::string SystemTools::GetOperatingSystemNameAndVersion() { // Test for the workstation type. -#if (_MSC_VER >= 1300) if (osvi.wProductType == VER_NT_WORKSTATION) { if (osvi.dwMajorVersion == 4) @@ -5021,7 +5063,6 @@ std::string SystemTools::GetOperatingSystemNameAndVersion() } } } -#endif // Visual Studio 7 and up } // Test for specific product on Windows NT 4.0 SP5 and earlier