From ab3261f901d34fab154c63edd3248c6231dc0798 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 14 Sep 2021 18:30:57 +0300 Subject: SL-15997 Windows 11 version detection --- indra/llcommon/llsys.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/llcommon/llsys.cpp') diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 4e61fb8a58..94f669b0f9 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -140,7 +140,13 @@ LLOSInfo::LLOSInfo() : #if LL_WINDOWS - if (IsWindowsVersionOrGreater(10, 0, 0)) + if (IsWindowsVersionOrGreater(11, 0, 0)) + { + mMajorVer = 11; + mMinorVer = 0; + mOSStringSimple = "Microsoft Windows 11 "; + } + else if (IsWindows10OrGreater()) { mMajorVer = 10; mMinorVer = 0; -- cgit v1.2.3 From 4be6981c6d8eefb28383358b7a0beaeca8100a0d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 19 Oct 2021 00:41:19 +0300 Subject: SL-15964 Fix gzip failing to compress files into unicode paths --- indra/llcommon/llsys.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'indra/llcommon/llsys.cpp') diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 94f669b0f9..e94973ac29 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -1261,7 +1261,12 @@ BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile) LLFILE *dst = NULL; S32 bytes = 0; tmpfile = dstfile + ".t"; - src = gzopen(srcfile.c_str(), "rb"); +#ifdef LL_WINDOWS + llutf16string utf16filename = utf8str_to_utf16str(srcfile); + src = gzopen_w(utf16filename.c_str(), "rb"); +#else + src = gzopen(srcfile.c_str(), "rb"); +#endif if (! src) goto err; dst = LLFile::fopen(tmpfile, "wb"); /* Flawfinder: ignore */ if (! dst) goto err; @@ -1295,7 +1300,14 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile) LLFILE *src = NULL; S32 bytes = 0; tmpfile = dstfile + ".t"; - dst = gzopen(tmpfile.c_str(), "wb"); /* Flawfinder: ignore */ + +#ifdef LL_WINDOWS + llutf16string utf16filename = utf8str_to_utf16str(tmpfile); + dst = gzopen_w(utf16filename.c_str(), "wb"); +#else + dst = gzopen(tmpfile.c_str(), "wb"); +#endif + if (! dst) goto err; src = LLFile::fopen(srcfile, "rb"); /* Flawfinder: ignore */ if (! src) goto err; -- cgit v1.2.3 From 1b5d151c156f0528e58c02b494d4b515ea9cb11c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 20 Oct 2021 23:57:48 +0300 Subject: SL-15997 Windows 11 detection --- indra/llcommon/llsys.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'indra/llcommon/llsys.cpp') diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index e94973ac29..4fe5b6bf20 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -140,13 +140,7 @@ LLOSInfo::LLOSInfo() : #if LL_WINDOWS - if (IsWindowsVersionOrGreater(11, 0, 0)) - { - mMajorVer = 11; - mMinorVer = 0; - mOSStringSimple = "Microsoft Windows 11 "; - } - else if (IsWindows10OrGreater()) + if (IsWindows10OrGreater()) { mMajorVer = 10; mMinorVer = 0; @@ -279,6 +273,21 @@ LLOSInfo::LLOSInfo() : ubr = data; } } + + if (mBuild >= 22000) + { + // At release Windows 11 version was 10.0.22000.194 + // Windows 10 version was 10.0.19043.1266 + // There is no warranty that Win10 build won't increase, + // so until better solution is found or Microsoft updates + // SDK with IsWindows11OrGreater(), indicate "10/11" + // + // Current alternatives: + // Query WMI's Win32_OperatingSystem for OS string. Slow + // and likely to return 'compatibility' string. + // Check presence of dlls/libs or may be their version. + mOSStringSimple = "Microsoft Windows 10/11"; + } } mOSString = mOSStringSimple; -- cgit v1.2.3