private static void LaunchConfigurationUtility() { var gameUtility = Process.Start(new ProcessStartInfo { FileName = Utilities.BackupConfigExecutableName, Arguments = Utilities.ConfigTriggerSwitch, }); gameUtility.WaitForExit(); if (gameUtility.ExitCode == (int)ExitCodes.Success) { try { GameLauncher.Launch(); } catch (UnsupportedGameVariantException) { _ = MessageBox.Show( Properties.Resources.MessageUnsupportedGameVariant, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error ); } } }
static Task Main() { #if PORTABLE LoadNativeDependencies(); NativeLibrary.SetDllImportResolver(typeof(NitroSharp.Game).Assembly, ResolveDllImport); NativeLibrary.SetDllImportResolver(typeof(FreeTypeBindings.FT).Assembly, ResolveDllImport); NativeLibrary.SetDllImportResolver(typeof(OpenAL.NativeLib).Assembly, ResolveDllImport); NativeLibrary.SetDllImportResolver(typeof(FFmpeg.AutoGen.ffmpeg).Assembly, ResolveDllImport); #endif Console.OutputEncoding = Encoding.UTF8; return(GameLauncher.Launch("COWS;HEAD NOAH", "Game.json")); }
private void LaunchGame(object sender, RoutedEventArgs e) { var restClient = AionShardApiRestClient.GetInstance(ApiInfos.AionShard); var gamePath = GamePath.Text; try { var versionApi = restClient.GetVersionLauncher(); if (!versionApi.Equals(Version.Launcher)) { MessageBox.Show("Launcher is not up to date"); return; } var aionServer = ServerInfos.Aion; var finalGamePath = ResolvePath(gamePath, aionServer); if (!File.Exists(finalGamePath)) { throw new PathException(); } using (var writer = new StreamWriter(ConfigTxt)) { writer.Write(finalGamePath.Replace("/" + aionServer.Path, "")); } GameLauncher.Launch(finalGamePath, aionServer.Parameters); } catch (VersionException ve) { MessageBox.Show(ve.Message); } catch (PathException pe) { MessageBox.Show(pe.Message + " in " + gamePath); } }
public static void Main(string[] args) { GameLauncher.Launch(); }