29 lines
1,023 B
C#
29 lines
1,023 B
C#
using System;
|
|
using System.Diagnostics;
|
|
|
|
class Program
|
|
{
|
|
static void Main()
|
|
{
|
|
string smExe = @"d:\JDRelated\JD22SRC_Build\main\build\sharpmake\sharpmake_1.8.0\Sharpmake.Application.exe";
|
|
string sourceFile = @"d:\JDRelated\JD22SRC_Build\main\build\sharpmake\main.cs";
|
|
// Notice: NO backslash before quotes!
|
|
string args = "/sources(@\"" + sourceFile + "\") /project(\"JD2022\") /branch(\"TU1\")";
|
|
|
|
Console.WriteLine("Executing: " + smExe + " " + args);
|
|
|
|
var psi = new ProcessStartInfo(smExe, args)
|
|
{
|
|
UseShellExecute = false,
|
|
RedirectStandardOutput = true,
|
|
RedirectStandardError = true,
|
|
WorkingDirectory = @"d:\JDRelated\JD22SRC_Build\main"
|
|
};
|
|
|
|
var p = Process.Start(psi);
|
|
Console.WriteLine(p.StandardOutput.ReadToEnd());
|
|
Console.WriteLine(p.StandardError.ReadToEnd());
|
|
p.WaitForExit();
|
|
Console.WriteLine("Exit code: " + p.ExitCode);
|
|
}
|
|
}
|