|
|
@ -34,20 +34,21 @@ public static class ProcessRunner |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
public static Process StartApp(string path, ProcessArgs args) |
|
|
|
public static Process StartApp(string path, ProcessArgs args) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
var startInfo = new ProcessStartInfo(); |
|
|
|
|
|
|
|
|
|
|
|
if (Compat.IsMacOS) |
|
|
|
if (Compat.IsMacOS) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var startInfo = new ProcessStartInfo |
|
|
|
startInfo.FileName = "open"; |
|
|
|
{ |
|
|
|
startInfo.Arguments = args.Prepend(path).ToString(); |
|
|
|
FileName = "open", |
|
|
|
startInfo.UseShellExecute = true; |
|
|
|
Arguments = args.Prepend([path, "--args"]), |
|
|
|
} |
|
|
|
UseShellExecute = true |
|
|
|
else |
|
|
|
}; |
|
|
|
{ |
|
|
|
|
|
|
|
startInfo.FileName = path; |
|
|
|
return Process.Start(startInfo) |
|
|
|
startInfo.Arguments = args; |
|
|
|
?? throw new NullReferenceException("Process.Start returned null"); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Process.Start(args.Prepend(path)); |
|
|
|
return Process.Start(startInfo) ?? throw new NullReferenceException("Process.Start returned null"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|