diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2008-10-16 03:24:33 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2008-10-16 03:24:33 (GMT) |
commit | ef93279573dcc7d3b15f919fbc70e025ae372a0d (patch) | |
tree | adc358606dae29b11e75b5429bb96c8ca7bc56a8 /Source/kwsys/SystemTools.cxx | |
parent | b82eb2b9b30be75bb7815d8773ae1481733d4cc5 (diff) | |
download | CMake-ef93279573dcc7d3b15f919fbc70e025ae372a0d.zip CMake-ef93279573dcc7d3b15f919fbc70e025ae372a0d.tar.gz CMake-ef93279573dcc7d3b15f919fbc70e025ae372a0d.tar.bz2 |
ENH: fix for Windows Vista
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index cc7db3c..2c2b0dc 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -4170,6 +4170,18 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion() // Test for the specific product family. + if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0) + { + if (osvi.wProductType == VER_NT_WORKSTATION) + { + res += "Microsoft Windows Vista"; + } + else + { + res += "Microsoft Windows Server 2008 family"; + } + } + if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) { res += "Microsoft Windows Server 2003 family"; @@ -4203,13 +4215,16 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion() { res += " Workstation 4.0"; } - else if (osvi.wSuiteMask & VER_SUITE_PERSONAL) - { - res += " Home Edition"; - } - else + else if (osvi.dwMajorVersion == 5) { - res += " Professional"; + if (osvi.wSuiteMask & VER_SUITE_PERSONAL) + { + res += " Home Edition"; + } + else + { + res += " Professional"; + } } } @@ -4253,7 +4268,7 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion() } } - else // Windows NT 4.0 + else if (osvi.dwMajorVersion <= 4) // Windows NT 4.0 { if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE) { |