summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsys.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-02-28 22:01:18 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-02-28 22:01:18 +0200
commite70fe3a50d43bd5276f80c9f82fcfb2de02109cb (patch)
treec35ab61e94d7b93e0e8be63f60c439d3b6a8c4b9 /indra/llcommon/llsys.cpp
parent15861d8dec096de57b0b51fa55a61a199a0f4337 (diff)
parent6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff)
Merge branch 'master' into DRTVWR-483
# Conflicts: # indra/newview/llviewermenu.cpp
Diffstat (limited to 'indra/llcommon/llsys.cpp')
-rw-r--r--indra/llcommon/llsys.cpp33
1 files changed, 30 insertions, 3 deletions
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 2ca15a31c6..8df818559d 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -107,7 +107,7 @@ LLOSInfo::LLOSInfo() :
#if LL_WINDOWS
- if (IsWindowsVersionOrGreater(10, 0, 0))
+ if (IsWindows10OrGreater())
{
mMajorVer = 10;
mMinorVer = 0;
@@ -240,6 +240,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;
@@ -1222,7 +1237,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;
@@ -1256,7 +1276,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;