Commits

Anonymous committed 98379ad

Removed some redundant code from BoostBuildProcess class.

Comments (0)

Files changed (2)

Binary file modified.
         private void buildBoost_1_51_0_x64(string destinationFolder)
         {
             Process p = new Process();
-            ProcessStartInfo info = null;
-
-            if (platform == ePlatform.x64)
-            {
-                info = new ProcessStartInfo("cmd.exe", @"%comspec% /k """ + Compiler.GetCompilerPath(compilerType) + @"\VC\vcvarsall.bat"" amd64");
-            }
-            else
-            {
-                info = new ProcessStartInfo("cmd.exe", @"%comspec% /k """ + Compiler.GetCompilerPath(compilerType) + @"\VC\vcvarsall.bat"" x86");
-            }
+            ProcessStartInfo info = CreateVisualStudioCommandPromptProcessStartInfo(compilerType, platform);
 
             info.RedirectStandardInput = true;
             info.UseShellExecute = false;
         private void buildBoost_1_52_0_x64(string destinationFolder)
         {
             Process p = new Process();
-            ProcessStartInfo info = null;
-            if (platform == ePlatform.x64)
-            {
-                info = new ProcessStartInfo("cmd.exe", @"%comspec% /k """ + Compiler.GetCompilerPath(compilerType) + @"\VC\vcvarsall.bat"" amd64");
-            }
-            else
-            {
-                info = new ProcessStartInfo("cmd.exe", @"%comspec% /k """ + Compiler.GetCompilerPath(compilerType) + @"\VC\vcvarsall.bat"" x86");
-            }
-
+            ProcessStartInfo info = CreateVisualStudioCommandPromptProcessStartInfo(compilerType, platform);
 
             info.RedirectStandardInput = true;
             info.UseShellExecute = false;
         private void buildBoost_x642(string destinationFolder)
         {
             Process p = new Process();
-            ProcessStartInfo info = null;
-
-            if (compilerType == eCompiler.VS2012)
-                info = new ProcessStartInfo("cmd.exe", @"%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" amd64");
-            if (compilerType == eCompiler.VS2010)
-                info = new ProcessStartInfo("cmd.exe", @"%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"" amd64");
+            ProcessStartInfo info = CreateVisualStudioCommandPromptProcessStartInfo(compilerType, platform);
 
             info.RedirectStandardInput = true;
             info.UseShellExecute = false;