Skip to content

Commit

Permalink
Recognize Windows version 10.0.22631 as Windows 11 2023 Update (Versi…
Browse files Browse the repository at this point in the history
…on 23H2) (#15540)

Closes #15530

Summary of the issue:
Recognize Windows version 10.0.22631 as Windows 11 2023 Update (Version 23H2).

Description of user facing changes
None

Description of development approach
Edit the following files:

source/winVersion: add Windows 11 23H2 data, including build number, release name, and WIN11_23H2 constant.
Edit appx XML to state that last tested build is 10.0.22631.0.
Add type hints for builds to release names dictionary.
Testing strategy:
Tested manually - make sure that, on Windows build 10.0.22631, winVersion.getWinVer() says Windows 11 23H2, which is the release name for winVersion.WIN11_23H2.
  • Loading branch information
josephsl committed Sep 27, 2023
1 parent c52daa7 commit e4559f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion appx/manifest.xml.subst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<TargetDeviceFamily
Name="Windows.Desktop"
MinVersion="10.0.18990.0"
MaxVersionTested="10.0.22621.0"
MaxVersionTested="10.0.22631.0"
/>
</Dependencies>
<Capabilities>
Expand Down
8 changes: 5 additions & 3 deletions source/winVersion.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2006-2022 NV Access Limited, Bill Dengler, Joseph Lee
# Copyright (C) 2006-2023 NV Access Limited, Bill Dengler, Joseph Lee
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.

Expand All @@ -10,7 +10,7 @@
When working on this file, consider moving to winAPI.
"""

from typing import Optional
from typing import Optional, Dict
import sys
import os
import functools
Expand All @@ -21,7 +21,7 @@
# Records a mapping between Windows builds and release names.
# These include build 10240 for Windows 10 1507 and releases with multiple release builds.
# These are applicable to Windows 10 and later as they report the same system version (10.0).
_BUILDS_TO_RELEASE_NAMES = {
_BUILDS_TO_RELEASE_NAMES: Dict[int, str] = {
10240: "Windows 10 1507",
10586: "Windows 10 1511",
14393: "Windows 10 1607",
Expand All @@ -39,6 +39,7 @@
20348: "Windows Server 2022",
22000: "Windows 11 21H2",
22621: "Windows 11 22H2",
22631: "Windows 11 23H2",
}


Expand Down Expand Up @@ -165,6 +166,7 @@ def __ge__(self, other):
WINSERVER_2022 = WinVersion(major=10, minor=0, build=20348)
WIN11 = WIN11_21H2 = WinVersion(major=10, minor=0, build=22000)
WIN11_22H2 = WinVersion(major=10, minor=0, build=22621)
WIN11_23H2 = WinVersion(major=10, minor=0, build=22631)


@functools.lru_cache(maxsize=1)
Expand Down

0 comments on commit e4559f7

Please sign in to comment.