1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26:01 +02:00

Improved MSVC detection fixes #929

This commit is contained in:
Azuo Lee 2024-11-02 17:55:47 +08:00 committed by GitHub
parent be92da8f3b
commit 2d117232e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,6 +49,7 @@ public class VSInstallationRegistry {
String versionFilterRange = "[" + baseVersion.toString() + "," + upperBound + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
String vsInstallationLocation[] = ProcessOutputUtil.getAllOutputFromCommand("cmd", "/c", //$NON-NLS-1$//$NON-NLS-2$
"\"\"%ProgramFiles(x86)%\\Microsoft Visual Studio\\Installer\\vswhere.exe\"\"", //$NON-NLS-1$
"-products", "*", "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"-version", versionFilterRange, "-property", "installationPath"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (vsInstallationLocation == null || vsInstallationLocation.length == 0
|| vsInstallationLocation[0].isEmpty()) {