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

Commit 3857ad4

Browse files
committed
[RunBuild] Removed hardcoded emulator executable name.
1 parent 3c5f3bc commit 3857ad4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

DolphinBisectTool/RunBuild.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
using System.Diagnostics;
22
using System.IO;
3+
using System.Linq;
4+
using System.Text.RegularExpressions;
35

46
namespace DolphinBisectTool
57
{
68
class RunBuild
79
{
810
public void Run(string title = "")
911
{
12+
string starting_directory = Directory.GetCurrentDirectory() + @"\dolphin\Dolphin-x64\";
13+
string[] files = Directory.GetFiles(starting_directory).Select(file =>
14+
Path.GetFileName(file)).ToArray();
15+
string pattern = @"(^Dolphin.*)";
16+
var match = files.Where(path => Regex.Match(path, pattern).Success);
17+
1018
using (var runner = new Process())
1119
{
12-
string starting_directory = Directory.GetCurrentDirectory() +
13-
@"\dolphin\Dolphin-x64\";
1420
runner.StartInfo.WorkingDirectory = starting_directory;
15-
runner.StartInfo.FileName = starting_directory + "Dolphin.exe";
21+
// This is probably gross.
22+
runner.StartInfo.FileName = starting_directory + string.Join("", match);
23+
runner.StartInfo.UseShellExecute = false;
1624
if (!string.IsNullOrEmpty(title))
1725
runner.StartInfo.Arguments = string.Format("/b /e \"{0}\"", title);
1826
runner.Start();

0 commit comments

Comments
 (0)