Skip to content

Commit c956f10

Browse files
Merge a8ee8b2 into 2bfc3c2
2 parents 2bfc3c2 + a8ee8b2 commit c956f10

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Many more options available, see docs:
33
# https://www.appveyor.com/docs/appveyor-yml/
44

5-
os: Visual Studio 2019
5+
os: Visual Studio 2022
66
version: "{branch}-{build}"
77

88
branches:

nvdaHelper/microsoft-ui-uiautomation/sconscript

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ env = env.Clone()
4141
# otherwise the build fails with Visual Studio 2022
4242
env['ENV']['windir'] = os.environ['windir']
4343

44+
45+
# We must ensure that msbuild uses the same platform toolset as the rest of NVDA.
46+
# Thus we must fetch this info from the MSVC_VERSION SCons variable,
47+
# Formatting it as vMajorMinor (e.g. v143 for 14.3).
48+
platformToolset = "v" + "".join(env.get('MSVC_VERSION').split('.')[:2])
49+
4450
MSUIA_sourceDir = Dir('#include/microsoft-ui-uiautomation/src/uiAutomation')
4551
MSUIA_lib_outDir = Dir('lib')
4652
MSUIA_include_outDir = Dir('include')
@@ -66,11 +72,14 @@ MSUIA_wrapper_libs = env.Command(
6672
],
6773
action = [
6874
# Fetch any required NuGet packages
69-
f"msbuild {MSUIA_solutionFile} /t:Restore /p:RestorePackagesConfig=true,Configuration=Release,Platform=x86",
75+
f"msbuild {MSUIA_solutionFile} /t:Restore /p:RestorePackagesConfig=true,Configuration=Release,Platform=x86,PlatformToolset={platformToolset}",
7076
# Remove any old generated files
7177
Delete(MSUIA_sourceDir.Dir('microsoft.ui.uiautomation/Generated Files')),
7278
# Do the actual build
73-
"msbuild /t:Build /p:Configuration=Release,Platform=x86,OutDir={outDir}/ $SOURCE".format(outDir=MSUIA_lib_outDir.abspath)
79+
"msbuild /t:Build /p:Configuration=Release,Platform=x86,PlatformToolset={platformToolset},OutDir={outDir}/ $SOURCE".format(
80+
outDir=MSUIA_lib_outDir.abspath,
81+
platformToolset=platformToolset
82+
)
7483
],
7584
)
7685
env.Ignore(MSUIA_wrapper_libs,MSUIA_sourceDir.File('microsoft.ui.uiautomation/Microsoft.UI.UIAutomation_h.h'))
@@ -88,7 +97,10 @@ MSUIA_abstraction_libs = env.Command(
8897
glob.glob(os.path.join(MSUIA_sourceDir.abspath, 'UiaOperationAbstraction', '*.h')),
8998
],
9099
action = [
91-
"msbuild /t:Build /p:Configuration=Release,Platform=x86,OutDir={outDir}/ $SOURCE".format(outDir=MSUIA_lib_outDir.abspath),
100+
"msbuild /t:Build /p:Configuration=Release,Platform=x86,PlatformToolset={platformToolset},OutDir={outDir}/ $SOURCE".format(
101+
outDir=MSUIA_lib_outDir.abspath,
102+
platformToolset=platformToolset
103+
),
92104
]
93105
)
94106

readme.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,24 @@ The following dependencies need to be installed on your system:
6060

6161
* [Python](https://www.python.org/), version 3.7, 32 bit
6262
* Use latest minor version if possible.
63-
* Microsoft Visual Studio 2019 or 2022:
64-
* To replicate the production build environment, use the [version of Visual Studio 2019 that AppVeyor is using](https://www.appveyor.com/docs/windows-images-software/#visual-studio-2019).
65-
* When you do not use the Visual Studio IDE itself, you can download the [build tools](https://aka.ms/vs/16/release/vs_BuildTools.exe)
66-
* When you are intending to use the Visual Studio IDE (not required for NVDA development), you can download [the community version](https://aka.ms/vs/16/release/vs_Community.exe), which is also used by appveyor
63+
* Microsoft Visual Studio 2022:
64+
* To replicate the production build environment, use the [version of Visual Studio 2022 that AppVeyor is using](https://www.appveyor.com/docs/windows-images-software/#visual-studio-2022).
65+
* When you do not use the Visual Studio IDE itself, you can download the [build tools](https://aka.ms/vs/17/release/vs_BuildTools.exe)
66+
* When you are intending to use the Visual Studio IDE (not required for NVDA development), you can download [the community version](https://aka.ms/vs/17/release/vs_Community.exe), which is also used by appveyor
6767
* The Professional and Enterprise versions are also supported
6868
* Preview versions are *not* supported
69-
* Building with Visual Studio 2022 explicitly requires the MSVC v142 - VS 2019 C++ build tools to be installed (see below)
7069
* When installing Visual Studio, you need to enable the following:
7170
* In the list on the Workloads tab
7271
* in the Windows grouping:
7372
* Desktop development with C++
7473
* Then in the Installation details tree view, under Desktop for C++, Optional, ensure the following are selected:
75-
* MSVC v142 - VS 2019 C++ x64/x86 build tools
76-
* Windows 11 SDK (10.0.22000.0)
77-
* C++ ATL for v142 build tools (x86 & x64)
74+
* MSVC v143 - VS 2022 C++ x64/x86 build tools
75+
* Windows 11 SDK (10.0.22621.0)
76+
* C++ ATL for v143 build tools (x86 & x64)
7877
* C++ Clang tools for Windows
7978
* On the Individual components tab, ensure the following items are selected:
80-
* MSVC v142 - VS 2019 C++ ARM64 build tools
81-
* C++ ATL for v142 build tools (ARM64)
79+
* MSVC v143 - VS 2022 C++ ARM64 build tools
80+
* C++ ATL for v143 build tools (ARM64)
8281

8382

8483
### Git Submodules

0 commit comments

Comments
 (0)