-
-
Notifications
You must be signed in to change notification settings - Fork 732
Description
Hi,
Closing a gap with unknown Windows release detection and to serve as a testbed for structural pattern matching:
Is your feature request related to a problem? Please describe.
Currently, when instantiating Windows version object (winVersion.WinVersion), passing an unknown build (Insider Preview and other unreleased builds) will casue NVDA to say "Windows 10 unknown" when in fact the build could be a Windows 11 build (such as build 22635 which is current beta channel build as of time of this post). For example, using winVersion.WinVersion(major=10, minor=0, build=26021) (which I assume is the latest build compiled inside Microsoft) would be seen as "Windows 10 unknown" when in fact this is a potential Windows Insider canary build (Widnows 11 build range).
Describe the solution you'd like
Return "Windows 11 unknown" if running on 10.0.22000 or later and an unknown build is passed to winVersion.WinVersion constructor. The solution would involve structural pattern matching for future proofing purposes and would follow the below algorithm:
match major.minor:
- 6.3: Windows 8.1
- 10.0 and a known build is passed in: return the release name recognied by NVDA
- 10.0 with unknown build >= 22000: Windows 11 unknown
- 10.0: Windows 10
- Everything else: unknown release
Notice the case order: structural pattern matching tests cases (including guards) from top to bottom, thus checking for known releases and build range early is crucial.
Describe alternatives you've considered
Leave code as is, or if implementing changes, use ternary operation to specify build ranges and default release name at the cost of scaled down future proofing.
Additional context
I mention future proofing because of Windows release plans in 2024 (Windows 11 24H2/LTSC/12 (tentative) or whatever Microsoft announces in a few months) provided that the kernel version remains 10.0.
Thanks.