From d06a8755283cb5d345b2674ed272bdf99991f937 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 26 Oct 2008 18:33:15 +0000 Subject: [PATCH] C++ sample: x64 support git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3617 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- samples/CppBackendBinding/CppProject.cs | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/samples/CppBackendBinding/CppProject.cs b/samples/CppBackendBinding/CppProject.cs index a8b1492629..75ceb667f6 100644 --- a/samples/CppBackendBinding/CppProject.cs +++ b/samples/CppBackendBinding/CppProject.cs @@ -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 return null; } } + + public override ICollection PlatformNames { + get { + List l = new List(); + foreach (XmlElement platformElement in document.DocumentElement["Platforms"]) { + l.Add(platformElement.GetAttribute("Name")); + } + return l.AsReadOnly(); + } + } } }