Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2012-10-27 15:02:57 -0400
committerMarc-Andre Laperle2012-10-27 15:02:57 -0400
commitc7cc50c93e7fe3a2111184784b7bf3ea74d4f154 (patch)
tree79f978b2726496973283559562ec5f3dd9d52818 /windows/org.eclipse.cdt.msw.build
parent8194410514f1d38d1d045b9a88e5613605a8c6a1 (diff)
downloadorg.eclipse.cdt-c7cc50c93e7fe3a2111184784b7bf3ea74d4f154.tar.gz
org.eclipse.cdt-c7cc50c93e7fe3a2111184784b7bf3ea74d4f154.tar.xz
org.eclipse.cdt-c7cc50c93e7fe3a2111184784b7bf3ea74d4f154.zip
Bug 385608 - Eclipse Juno 64 bits don't discover the visual studio paths
Diffstat (limited to 'windows/org.eclipse.cdt.msw.build')
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/WinEnvironmentVariableSupplier.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/WinEnvironmentVariableSupplier.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/WinEnvironmentVariableSupplier.java
index 73736ca5f9..5cbde63a03 100644
--- a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/WinEnvironmentVariableSupplier.java
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/WinEnvironmentVariableSupplier.java
@@ -81,22 +81,31 @@ public class WinEnvironmentVariableSupplier
return envvars.values().toArray(new IBuildEnvironmentVariable[envvars.size()]);
}
+ private static String getSoftwareKey(WindowsRegistry reg, String subkey, String name) {
+ String value = reg.getLocalMachineValue("SOFTWARE\\" + subkey, name);
+ // Visual Studio is a 32 bit application so on Windows 64 the keys will be in Wow6432Node
+ if (value == null) {
+ value = reg.getLocalMachineValue("SOFTWARE\\Wow6432Node\\" + subkey, name);
+ }
+ return value;
+ }
+
// Current support is for Windows SDK 7.1 with Visual C++ 10.0
// Secondary support for Windows SDK 7.0 with Visual C++ 9.0
private static String getSDKDir() {
WindowsRegistry reg = WindowsRegistry.getRegistry();
- String sdkDir = reg.getLocalMachineValue("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1", "InstallationFolder");
+ String sdkDir = getSoftwareKey(reg, "Microsoft\\Microsoft SDKs\\Windows\\v7.1", "InstallationFolder");
if (sdkDir != null)
return sdkDir;
- return reg.getLocalMachineValue("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.0", "InstallationFolder");
+ return getSoftwareKey(reg, "Microsoft SDKs\\Windows\\v7.0", "InstallationFolder");
}
private static String getVCDir() {
WindowsRegistry reg = WindowsRegistry.getRegistry();
- String vcDir = reg.getLocalMachineValue("SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7", "10.0");
+ String vcDir = getSoftwareKey(reg, "Microsoft\\VisualStudio\\SxS\\VC7", "10.0");
if (vcDir != null)
return vcDir;
- return reg.getLocalMachineValue("SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7", "9.0");
+ return getSoftwareKey(reg, "Microsoft\\VisualStudio\\SxS\\VC7", "9.0");
}
public static IPath[] getIncludePath() {

Back to the top