Skip to content

Commit 403bab3

Browse files
authored
Merge 99f5bc8 into bf96860
2 parents bf96860 + 99f5bc8 commit 403bab3

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

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 2022
5+
os: Visual Studio 2019
66
version: "{branch}-{build}"
77

88
branches:

nvdaHelper/localWin10/sconscript

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import os
1616
import glob
1717

18-
from SCons.Tool.MSCommon.vc import find_vc_pdir
18+
from SCons.Tool.MSCommon.vc import find_vc_pdir, msvc_toolset_versions
1919

2020
Import(
2121
'env',
@@ -43,16 +43,18 @@ localWin10Lib = env.SharedLibrary(
4343
# UWP dlls can only be dynamically linked with the CRT,
4444
# but some systems might not have this version of the CRT.
4545
# Therefore, we must include it.
46-
# VS 2017 keeps changing the path to reflect the latest major.minor.build version which we canot easily find out.
47-
# Therefore Search these versioned directories from newest to oldest to collect all the files we need.
46+
# Search available toolset directories from newest to oldest to collect all the files we need.
4847
msvc = env.get('MSVC_VERSION')
49-
vcRedistDirs = glob.glob(os.path.join(
50-
find_vc_pdir(env, msvc),
51-
rf"Redist\MSVC\{msvc}*\x86\Microsoft.VC{msvc.replace('.', '')}.CRT"
52-
))
48+
toolsets = msvc_toolset_versions(msvc, full=True)
49+
vcRedistDirs = [
50+
os.path.join(
51+
find_vc_pdir(env, msvc),
52+
rf"Redist\MSVC\{toolset}\x86\Microsoft.VC{msvc.replace('.', '')}.CRT"
53+
)
54+
for toolset in reversed(toolsets)
55+
]
5356
if len(vcRedistDirs)==0:
5457
raise RuntimeError("Could not locate vc redistributables. Perhaps the Universal Windows Platform component in visual Studio is not installed")
55-
vcRedistDirs.sort(reverse=True)
5658
for fn in ("msvcp140.dll", "vccorlib140.dll", "vcruntime140.dll"):
5759
for vcRedistDir in vcRedistDirs:
5860
path = os.path.join(vcRedistDir, fn)

0 commit comments

Comments
 (0)