Example #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();
        }
Example #2
0
 public Launcher(LauncherSetup setup, Builder builder) {
     _setup = setup;
     _builder = builder;
 }
Example #3
0
 public Launcher(LauncherSetup setup, Builder builder)
 {
     _setup   = setup;
     _builder = builder;
 }
Example #4
0
 public static void StartGame(LauncherSetup setup)
 {
     StartGame(setup, setup.ExecuteArgs);
 }