Browse Source

C++ sample: x64 support

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3617 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
d06a875528
  1. 21
      samples/CppBackendBinding/CppProject.cs

21
samples/CppBackendBinding/CppProject.cs

@ -215,10 +215,15 @@ namespace CppBackendBinding @@ -215,10 +215,15 @@ namespace CppBackendBinding
{
string productDir = GetPathFromRegistry(@"SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VC", "ProductDir");
string batFile = "vcvars32.bat";
if (options.Platform == "x64") {
batFile = "vcvars64.bat";
}
string commonTools =
GetFile(productDir != null ? Path.Combine(productDir, "bin\\vcvars32.bat") : null)
?? GetFile("%VS90COMNTOOLS%\\vsvars32.bat")
?? GetFile("%VS80COMNTOOLS%\\vsvars32.bat");
GetFile(productDir != null ? Path.Combine(productDir, "bin\\" + batFile) : null)
?? GetFile("%VS90COMNTOOLS%\\" + batFile)
?? GetFile("%VS80COMNTOOLS%\\" + batFile);
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
@ -326,5 +331,15 @@ namespace CppBackendBinding @@ -326,5 +331,15 @@ namespace CppBackendBinding
return null;
}
}
public override ICollection<string> PlatformNames {
get {
List<string> l = new List<string>();
foreach (XmlElement platformElement in document.DocumentElement["Platforms"]) {
l.Add(platformElement.GetAttribute("Name"));
}
return l.AsReadOnly();
}
}
}
}

Loading…
Cancel
Save