public void RunProtobuild(string args) { Console.WriteLine("Running on {0}", ModuleInfo.DetectPlatform()); if (ModuleInfo.DetectPlatform() == "MacOS") { //call 'which mono' first to determine mono path var protobuildPath = System.IO.Path.Combine(this.Path, "Protobuild.exe"); if (File.Exists(protobuildPath)) { var pi = new ProcessStartInfo { FileName = "mono", Arguments = protobuildPath + " " + args, WorkingDirectory = this.Path, }; Console.WriteLine("Calling {0} with {1} in {2}", pi.FileName, pi.Arguments, pi.WorkingDirectory); var p = Process.Start(pi); p.WaitForExit(); } } else { var protobuildPath = System.IO.Path.Combine(this.Path, "Protobuild.exe"); if (File.Exists(protobuildPath)) { var pi = new ProcessStartInfo { FileName = protobuildPath, Arguments = args, WorkingDirectory = this.Path }; var p = Process.Start(pi); p.WaitForExit(); } } }