Detect and correctly report all Windows x86/x64 versions in System Information#18645
Conversation
|
Ah i forgot to add a fallback for Windows 10/11. It's finalised now. |
|
This is some next level dedication 🥇 |
|
Hi, I hate to have to revert this, but this breaks the MSVC 2005/2010 builds right now, and it's imperative that RetroArch builds right now as we are leading up to a major release. Here are the build errors While I have to revert this PR for now, I'd be excited to receive a new PR with these issues fixed. If you can provide that, then that new PR can be merged. |
|
@LibretroAdmin No worries. But that's strange... Those were already tested and did not produce build errors, but maybe i've used different settings or something. I'll look in to it and try to get a fix submitted soon! |
This fixes the incorrect Windows OS being reported in
System Information → Frontend OS.This issue has existed for a very long time, possibly since Windows 8.1, and has been mentioned in #4768, #17712 and #13110, which are now closed. But the problem was never fixed (see latest posts here). The latest stable and nightly builds are still affected.
Windows OSes affected by this issue:
Basically, it is all Windows OSes from 8.1 onwards. The problem is partly because of the compiler/manifest.
Here's some examples of OS misreporting with the latest buildbot builds:
Changes in this PR:
GetVersionExwas used, so OS reporting accuracy depended on manifest compatibility entries that can vary by toolchain and compiler. Windows 8.1+ will intentionally report an older OS when the manifest does not declare support for the OS. This is why Windows 10 shows Windows 8 with buildbot/MinGW 10.2.0 above, but newer MinGW versions will work.RtlGetVersionis now used for OS detection starting from NT 5.0 (Windows 2000), which always reports the actual Windows version regardless of the manifest.25H2). This is increasingly important given the long lifespan of modern Windows versions (10/11) and how often these feature updates now break/change/add components. Future releases should also be reported correctly without requiring any changes, as the feature version is read from the Windows registry.Windows MEtoWindows Me(official documentation always uses a lower-casee. So i've been typing it wrong for 25+ years...).-. For example:Windows 11 (25H2) x64 - Build 26200Windows NT kernel x.xorWindows 9x version x.x. Previously it would showWindows x.x, which could be mistaken for the OS name.Accurately reporting the Windows OS involves many edge cases and historical inconsistencies, so all Windows versions listed below were tested using x86/x64 builds from many different MSVC and MinGW compiler versions (yeah it took ages!).
(latest Dev channel build)
Now reported correctly.
(older Dev channel build)
Note: Windows Insider builds may report channel names (e.g. “Dev”), as this is
sometimes stored in the registry, instead of the feature version name.
Now reported correctly.
Newly added.
(24H2)
An example of a more obscure Windows edition. Different editions make no
difference to OS detection accuracy.
Now reported correctly.
Newly added.
Newly added.
Now reported correctly.
(first released version)
Note: Earlier Win10/Server releases used a different feature version format, e.g.
1507 (year/month) instead of the current year/half-year format.
Now reported correctly.
Now reported correctly.
Now reported correctly.
Now reported correctly.
Note: Pre-Vista Oses (below) lack reliable API support for x86/x64 detection.
Now reported correctly.
Now reported correctly. Note: XP x64 only had a single edition released, making
it safe/easy to use the full product name here.
Now reported correctly.
Now displays
Meinstead ofME.Newly added.
should be reported correctly if builds were made to work on them.