Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 public static void StartGame(LauncherSetup setup)
 {
     StartGame(setup, setup.ExecuteArgs);
 }
Exemplo n.º 3
0
 public Launcher(LauncherSetup setup)
 {
     _setup = setup;
 }
Exemplo n.º 4
0
 public Launcher(LauncherSetup setup)
 {
     _setup = setup;
 }
Exemplo n.º 5
0
        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();
        }
Exemplo n.º 6
0
 public static void StartGame(LauncherSetup setup)
 {
     StartGame(setup, setup.ExecuteArgs);
 }