Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
[RunBuild] Removed hardcoded emulator executable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Helios747 committed Aug 21, 2016
1 parent 3c5f3bc commit 3857ad4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions DolphinBisectTool/RunBuild.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;

namespace DolphinBisectTool
{
class RunBuild
{
public void Run(string title = "")
{
string starting_directory = Directory.GetCurrentDirectory() + @"\dolphin\Dolphin-x64\";
string[] files = Directory.GetFiles(starting_directory).Select(file =>
Path.GetFileName(file)).ToArray();
string pattern = @"(^Dolphin.*)";
var match = files.Where(path => Regex.Match(path, pattern).Success);

using (var runner = new Process())
{
string starting_directory = Directory.GetCurrentDirectory() +
@"\dolphin\Dolphin-x64\";
runner.StartInfo.WorkingDirectory = starting_directory;
runner.StartInfo.FileName = starting_directory + "Dolphin.exe";
// This is probably gross.
runner.StartInfo.FileName = starting_directory + string.Join("", match);
runner.StartInfo.UseShellExecute = false;
if (!string.IsNullOrEmpty(title))
runner.StartInfo.Arguments = string.Format("/b /e \"{0}\"", title);
runner.Start();
Expand Down

0 comments on commit 3857ad4

Please sign in to comment.