aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-04-13 15:37:25 -0700
committerMcCabe Maxsted2011-04-13 15:37:25 -0700
commit791a685c0ab4c4160593688d0fc3acb5da19efbb (patch)
tree5412781794a96023a56087d99403519a4edac2a4 /linden
parentFixed language prefs box being a weird height, and disallow text entry for it (diff)
downloadmeta-impy-791a685c0ab4c4160593688d0fc3acb5da19efbb.zip
meta-impy-791a685c0ab4c4160593688d0fc3acb5da19efbb.tar.gz
meta-impy-791a685c0ab4c4160593688d0fc3acb5da19efbb.tar.bz2
meta-impy-791a685c0ab4c4160593688d0fc3acb5da19efbb.tar.xz
Identify Windows Server 2008 and 2008 R2, added Win 8 detection for future-proofing. Ported from Phoenix, patch by Tank Master
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/llcommon/llsys.cpp58
1 files changed, 41 insertions, 17 deletions
diff --git a/linden/indra/llcommon/llsys.cpp b/linden/indra/llcommon/llsys.cpp
index d729d98..95dd2e5 100644
--- a/linden/indra/llcommon/llsys.cpp
+++ b/linden/indra/llcommon/llsys.cpp
@@ -177,39 +177,64 @@ LLOSInfo::LLOSInfo() :
177 case VER_PLATFORM_WIN32_NT: 177 case VER_PLATFORM_WIN32_NT:
178 { 178 {
179 // Test for the product. 179 // Test for the product.
180 if(osvi.dwMajorVersion <= 4) 180 if (osvi.dwMajorVersion <= 4)
181 { 181 {
182 mOSStringSimple = "Microsoft Windows NT "; 182 mOSStringSimple = "Microsoft Windows NT ";
183 } 183 }
184 else if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) 184 else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
185 { 185 {
186 mOSStringSimple = "Microsoft Windows 2000 "; 186 mOSStringSimple = "Microsoft Windows 2000 ";
187 } 187 }
188 else if(osvi.dwMajorVersion ==5 && osvi.dwMinorVersion == 1) 188 else if (osvi.dwMajorVersion ==5 && osvi.dwMinorVersion == 1)
189 { 189 {
190 mOSStringSimple = "Microsoft Windows XP "; 190 mOSStringSimple = "Microsoft Windows XP ";
191 } 191 }
192 else if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) 192 else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2)
193 { 193 {
194 if(osvi.wProductType == VER_NT_WORKSTATION) 194 if (osvi.wProductType == VER_NT_WORKSTATION)
195 {
195 mOSStringSimple = "Microsoft Windows XP x64 Edition "; 196 mOSStringSimple = "Microsoft Windows XP x64 Edition ";
196 else 197 }
197 mOSStringSimple = "Microsoft Windows Server 2003 "; 198 else
199 {
200 mOSStringSimple = "Microsoft Windows Server 2003 ";
201 }
198 } 202 }
199 else if(osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 1) 203 else if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 2)
200 { 204 {
201 if(osvi.dwMinorVersion == 0) 205 if (osvi.dwMinorVersion == 0)
202 { 206 {
203 mOSStringSimple = "Microsoft Windows Vista "; 207 if (osvi.wProductType == VER_NT_WORKSTATION)
208 {
209 mOSStringSimple = "Microsoft Windows Vista ";
210 }
211 else
212 {
213 mOSStringSimple = "Windows Server 2008 ";
214 }
215
204 } 216 }
205 else if(osvi.dwMinorVersion == 1) 217 else if (osvi.dwMinorVersion == 1)
206 { 218 {
207 mOSStringSimple = "Microsoft Windows 7 "; 219 if (osvi.wProductType == VER_NT_WORKSTATION)
220 {
221 mOSStringSimple = "Microsoft Windows 7 ";
222 }
223 else
224 {
225 mOSStringSimple = "Windows Server 2008 R2 ";
226 }
208 } 227 }
209 228 else if (osvi.dwMinorVersion == 2)
210 if(osvi.wProductType != VER_NT_WORKSTATION)
211 { 229 {
212 mOSStringSimple += "Server "; 230 if (osvi.wProductType == VER_NT_WORKSTATION)
231 {
232 mOSStringSimple = "Microsoft Windows 8 ";
233 }
234 else
235 {
236 mOSStringSimple = "Windows Server 2012 ";
237 }
213 } 238 }
214 239
215 ///get native system info if available.. 240 ///get native system info if available..
@@ -314,8 +339,7 @@ LLOSInfo::LLOSInfo() :
314 std::string compatibility_mode; 339 std::string compatibility_mode;
315 if(got_shell32_version) 340 if(got_shell32_version)
316 { 341 {
317 if(osvi.dwMajorVersion != shell32_major 342 if(osvi.dwMajorVersion != shell32_major || osvi.dwMinorVersion != shell32_minor)
318 || osvi.dwMinorVersion != shell32_minor)
319 { 343 {
320 compatibility_mode = llformat(" compatibility mode. real ver: %d.%d (Build %d)", 344 compatibility_mode = llformat(" compatibility mode. real ver: %d.%d (Build %d)",
321 shell32_major, 345 shell32_major,