Skip to content

Commit 9f994ec

Browse files
MarkZ3jonahgraham
authored andcommitted
Detection for VS 2022 toolchain
This adds basic support for VS 2022 by detecting the toolchain. I.e. include paths, lib paths, and PATH env var are properly detected. The detection works the same as 2017 and 2019 since vswhere.exe works the same and the folder layout hasn't changed. Revived from https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/182202
1 parent 271041b commit 9f994ec

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

windows/org.eclipse.cdt.msw.build/META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %pluginName
44
Bundle-SymbolicName: org.eclipse.cdt.msw.build;singleton:=true
5-
Bundle-Version: 2.0.200.qualifier
5+
Bundle-Version: 2.0.300.qualifier
66
Bundle-Activator: org.eclipse.cdt.msw.build.Activator
77
Bundle-Localization: plugin
88
Require-Bundle: org.eclipse.core.runtime,

windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/IVSVersionConstants.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2020 Marc-Andre Laperle.
2+
* Copyright (c) 2020, 2021 Marc-Andre Laperle.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -16,4 +16,5 @@
1616
interface IVSVersionConstants {
1717
VSVersionNumber VS2017_BASE_VER = new VSVersionNumber(15);
1818
VSVersionNumber VS2019_BASE_VER = new VSVersionNumber(16);
19+
VSVersionNumber VS2022_BASE_VER = new VSVersionNumber(17);
1920
}

windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSInstallationRegistry.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ private static void detectVSInstallations() {
3535
fVsInstallations = new TreeMap<>();
3636
// We are opting-in which versions to detect instead of trying to detect even unknown ones in order
3737
// to allow proper testing for a new version before exposing it to users.
38-
Arrays.asList(IVSVersionConstants.VS2017_BASE_VER, IVSVersionConstants.VS2019_BASE_VER).forEach(version -> {
39-
VSInstallation insllation = detectVSInstallation(version);
40-
if (insllation != null)
41-
fVsInstallations.put(version, insllation);
42-
});
38+
Arrays.asList(IVSVersionConstants.VS2017_BASE_VER, IVSVersionConstants.VS2019_BASE_VER,
39+
IVSVersionConstants.VS2022_BASE_VER).forEach(version -> {
40+
VSInstallation insllation = detectVSInstallation(version);
41+
if (insllation != null)
42+
fVsInstallations.put(version, insllation);
43+
});
4344
}
4445

4546
private static VSInstallation detectVSInstallation(VSVersionNumber baseVersion) {

0 commit comments

Comments
 (0)