mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Added support for Windows 7 SDK and removed the others.
This commit is contained in:
parent
9e3c2bfd51
commit
f586166f35
1 changed files with 4 additions and 36 deletions
|
@ -85,40 +85,12 @@ public class WinEnvironmentVariableSupplier
|
|||
|
||||
public static String getSDKDir() {
|
||||
WindowsRegistry reg = WindowsRegistry.getRegistry();
|
||||
|
||||
String[] keys = {
|
||||
"SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.1",
|
||||
"SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A",
|
||||
"SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0",
|
||||
};
|
||||
|
||||
for (int i = 0; i < keys.length; ++i) {
|
||||
String sdkDir = reg.getLocalMachineValue(keys[i], "InstallationFolder");
|
||||
if (sdkDir != null)
|
||||
return sdkDir;
|
||||
}
|
||||
|
||||
return null;
|
||||
return reg.getLocalMachineValue("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.0", "InstallationFolder");
|
||||
}
|
||||
|
||||
public static String getVCDir() {
|
||||
WindowsRegistry reg = WindowsRegistry.getRegistry();
|
||||
|
||||
String vcDir = reg.getLocalMachineValue("SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7", "9.0");
|
||||
if (vcDir != null)
|
||||
return vcDir;
|
||||
|
||||
// Try full SDK with compiler
|
||||
String sdkDir = getSDKDir();
|
||||
if (sdkDir != null)
|
||||
return sdkDir.concat("VC\\");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getVSDir() {
|
||||
WindowsRegistry reg = WindowsRegistry.getRegistry();
|
||||
return reg.getLocalMachineValue("SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7", "9.0");
|
||||
return reg.getLocalMachineValue("SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7", "9.0");
|
||||
}
|
||||
|
||||
private void initvars() {
|
||||
|
@ -134,7 +106,6 @@ public class WinEnvironmentVariableSupplier
|
|||
// INCLUDE
|
||||
StringBuffer buff = new StringBuffer();
|
||||
buff.append(vcDir).append("Include;");
|
||||
buff.append(vcDir).append("Include\\Sys;");
|
||||
buff.append(sdkDir).append("Include;");
|
||||
buff.append(sdkDir).append("Include\\gl;");
|
||||
addvar(new WindowsBuildEnvironmentVariable("INCLUDE", buff.toString(), IBuildEnvironmentVariable.ENVVAR_PREPEND));
|
||||
|
@ -147,12 +118,9 @@ public class WinEnvironmentVariableSupplier
|
|||
|
||||
// PATH
|
||||
buff = new StringBuffer();
|
||||
|
||||
String vsDir = getVSDir();
|
||||
if (vsDir != null)
|
||||
buff.append(vsDir).append("Common7\\IDE;");
|
||||
|
||||
buff.append(vcDir).append("Bin;");
|
||||
buff.append(vcDir).append("vcpackages;");
|
||||
buff.append(vcDir).append("..\\Common7\\IDE;");
|
||||
buff.append(sdkDir).append("Bin;");
|
||||
addvar(new WindowsBuildEnvironmentVariable("PATH", buff.toString(), IBuildEnvironmentVariable.ENVVAR_PREPEND));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue