public static void StartGame(LauncherSetup setup, string args) { var gamePath = Path.Combine( Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), setup.GameFolder, setup.GameExecutable ); if (IsUnix) { gamePath = Path.Combine( Directory.GetParent(Assembly.GetEntryAssembly().Location).Parent.Parent.ToString(), setup.GameFolder, setup.GameExecutable ); Process.Start(new ProcessStartInfo( "open", "-a '" + gamePath + "' -n --args " + args) { UseShellExecute = false }); } else { Process.Start(gamePath, args); } Process.GetCurrentProcess().Kill(); }
public static void StartGame(LauncherSetup setup) { StartGame(setup, setup.ExecuteArgs); }
public Launcher(LauncherSetup setup) { _setup = setup; }
public static void StartGame(LauncherSetup setup, string args) { var gamePath = Path.Combine( Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), setup.GameFolder, setup.GameExecutable ); if (IsUnix) { gamePath = Path.Combine( Directory.GetParent(Assembly.GetEntryAssembly().Location).Parent.Parent.ToString(), setup.GameFolder, setup.GameExecutable ); Process.Start(new ProcessStartInfo( "open", "-a '" + gamePath + "' -n --args " + args) { UseShellExecute = false }); } else Process.Start(gamePath, args); Process.GetCurrentProcess().Kill(); }