public static int Main(string[] args) { // Back up the cwd before DesktopGameHost changes it var cwd = Environment.CurrentDirectory; bool useSdl = args.Contains("--sdl"); using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true, useSdl: useSdl)) { host.ExceptionThrown += handleException; if (!host.IsPrimaryInstance) { if (args.Length > 0 && args[0].Contains('.')) // easy way to check for a file import in args { var importer = new ArchiveImportIPCChannel(host); // Restore the cwd so relative paths given at the command line work correctly Directory.SetCurrentDirectory(cwd); foreach (var file in args) { Console.WriteLine(@"Importing {0}", file); if (!importer.ImportAsync(Path.GetFullPath(file)).Wait(3000)) { throw new TimeoutException(@"IPC took too long to send"); } } return(0); } // we want to allow multiple instances to be started when in debug. if (!DebugUtils.IsDebugBuild) { return(0); } } switch (args.FirstOrDefault() ?? string.Empty) { default: host.Run(new OsuGameDesktop(args)); break; case "--tournament": host.Run(new TournamentGame()); break; } return(0); } }
public static void Main() { Game app = new GDEApp(); DesktopGameHost host = Host.GetSuitableHost("GDE"); host.Run(app); }
public static void Main() { //Estas tres lineas crean la ventana base del proyecto (en el lenguaje del framework, un "juego"), y crean una ventana para el using DesktopGameHost host = Host.GetSuitableHost(@"GamesToGo"); using Game program = new GamesToGoEditor(); host.Run(program); }
public static int Main(string[] args) { LegacyFilesystemReader.Register(); // Back up the cwd before DesktopGameHost changes it var cwd = Environment.CurrentDirectory; using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true)) { if (!host.IsPrimaryInstance) { var importer = new BeatmapIPCChannel(host); // Restore the cwd so relative paths given at the command line work correctly Directory.SetCurrentDirectory(cwd); foreach (var file in args) { Console.WriteLine(@"Importing {0}", file); if (!importer.ImportAsync(Path.GetFullPath(file)).Wait(3000)) { throw new TimeoutException(@"IPC took too long to send"); } } } else { host.Run(new OsuGameDesktop(args)); } return(0); } }
static void Main() { using (DesktopGameHost host = Host.GetSuitableHost(@"Tester", true)) { host.Run(new TestGame()); } }
public static void Main() { using (DesktopGameHost host = Host.GetSuitableHost(@"GDE Tests", true)) { host.Run(new GDETestBrowser()); } }
public static int Main(string[] args) { DesktopGameHost host = Host.GetSuitableHost(@"osu", true); if (!host.IsPrimaryInstance) { var importer = new BeatmapImporter(host); foreach (var file in args) { if (!importer.Import(file).Wait(1000)) { throw new TimeoutException(@"IPC took too long to send"); } } Console.WriteLine(@"Sent import requests to running instance"); } else { BaseGame osu = new OsuGame(args); host.Add(osu); host.Run(); } return(0); }
public static void Main(string[] args) { string cwd = CurrentDirectory; using (DesktopGameHost host = Host.GetSuitableHost("Rhythmic", true)) { host.ExceptionThrown += handleException; if (!host.IsPrimaryInstance) { ArchiveImportIPCChannel importer = new ArchiveImportIPCChannel(host); // Restore the cwd so relative paths given at the command line work correctly Directory.SetCurrentDirectory(cwd); foreach (string file in args) { Console.WriteLine(@"Importing {0}", file); if (!importer.ImportAsync(Path.GetFullPath(file)).Wait(3000)) { throw new TimeoutException(@"IPC took too long to send"); } } } else { switch (args.FirstOrDefault() ?? string.Empty) { default: host.Run(new RhythmicGameDesktop(args)); break; } } } }
public static int Main(string[] args) { LegacyFilesystemReader.Register(); using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true)) { if (!host.IsPrimaryInstance) { var importer = new BeatmapImporter(host); foreach (var file in args) { if (!importer.Import(file).Wait(1000)) { throw new TimeoutException(@"IPC took too long to send"); } } Console.WriteLine(@"Sent import requests to running instance"); } else { Ruleset.Register(new OsuRuleset()); Ruleset.Register(new TaikoRuleset()); Ruleset.Register(new ManiaRuleset()); Ruleset.Register(new CatchRuleset()); BaseGame osu = new OsuGame(args); host.Add(osu); host.Run(); } return(0); } }
public static int Main(string[] args) { using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu", new() { BindIPC = true })) { host.Run(new OsuTestBrowser()); return(0); } }
public static int Main(string[] args) { using (DesktopGameHost host = Host.GetSuitableHost(@"karaoke-visual-test-runner", true)) { host.Run(new OsuTestBrowser()); return(0); } }
public static int Main(string[] args) { using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true)) { host.Run(new TournamentTestBrowser()); return(0); } }
public static int Main(string[] args) { // required to initialise native SQLite libraries on some platforms. if (!RuntimeInfo.IsMono) { useMulticoreJit(); } // Back up the cwd before DesktopGameHost changes it var cwd = Environment.CurrentDirectory; using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true)) { if (!host.IsPrimaryInstance) { var importer = new ArchiveImportIPCChannel(host); // Restore the cwd so relative paths given at the command line work correctly Directory.SetCurrentDirectory(cwd); foreach (var file in args) { Console.WriteLine(@"Importing {0}", file); if (!importer.ImportAsync(Path.GetFullPath(file)).Wait(3000)) { throw new TimeoutException(@"IPC took too long to send"); } } } else { switch (args.FirstOrDefault() ?? string.Empty) { case "--tests": host.Run(new OsuTestBrowser()); break; default: host.Run(new OsuGameDesktop(args)); break; } } return(0); } }
static int Main(string[] args) { using (DesktopGameHost host = Host.GetSuitableHost(@"FX2", true)) { BaseGame osu = new FXGame(args); host.Add(osu); host.Run(); return(0); } }
public static int Main(string[] args) { // Back up the cwd before DesktopGameHost changes it var cwd = Environment.CurrentDirectory; using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true)) { host.ExceptionThrown += handleException; if (!host.IsPrimaryInstance) { var importer = new ArchiveImportIPCChannel(host); // Restore the cwd so relative paths given at the command line work correctly Directory.SetCurrentDirectory(cwd); foreach (var file in args) { Console.WriteLine(@"Importing {0}", file); if (!importer.ImportAsync(Path.GetFullPath(file)).Wait(3000)) { throw new TimeoutException(@"IPC took too long to send"); } } } else { switch (args.FirstOrDefault() ?? string.Empty) { default: host.Run(new OsuGameDesktop(args)); break; case "--tournament": host.Run(new TournamentGame()); break; } } return(0); } }
public static void Main(string[] args) { var cwd = Environment.CurrentDirectory; using (DesktopGameHost host = Host.GetSuitableHost("Touhou Online")) { if (host.IsPrimaryInstance) { host.Run(new TouhouOnlineGame(args)); //test branch2 } } }
public static void Main(params string[] args) { string server; if ((server = args.FirstOrDefault(a => a.StartsWith(@"--server="))) != null) { APIController.AlternativeServer = server.Substring(server.IndexOf('=') + 1); } //Estas tres lineas crean la ventana base del proyecto (en el lenguaje del framework, un "juego"), y crean una ventana para el using DesktopGameHost host = Host.GetSuitableHost(@"GamesToGo"); using Game program = new GamesToGoEditor(); host.Run(program); }
public static void Main(string[] args) { foreach (string arg in args) { ParseFlags(arg); } using (DesktopGameHost host = Host.GetSuitableHost(@"Circles!Galore")) { host.ExceptionThrown += handleException; host.Run(new CirclesGame()); } }
public static int Main(string[] args) { // Back up the cwd before DesktopGameHost changes it var cwd = Environment.CurrentDirectory; string gameName = base_game_name; bool tournamentClient = false; foreach (var arg in args) { var split = arg.Split('='); var key = split[0]; var val = split.Length > 1 ? split[1] : string.Empty; switch (key) { case "--tournament": tournamentClient = true; break; case "--debug-client-id": if (!DebugUtils.IsDebugBuild) { throw new InvalidOperationException("Cannot use this argument in a non-debug build."); } if (!int.TryParse(val, out int clientID)) { throw new ArgumentException("Provided client ID must be an integer."); } gameName = $"{base_game_name}-{clientID}"; break; } } using (DesktopGameHost host = Host.GetSuitableHost(gameName, true)) { host.ExceptionThrown += handleException; if (!host.IsPrimaryInstance) { if (args.Length > 0 && args[0].Contains('.')) // easy way to check for a file import in args { var importer = new ArchiveImportIPCChannel(host); foreach (var file in args) { Console.WriteLine(@"Importing {0}", file); if (!importer.ImportAsync(Path.GetFullPath(file, cwd)).Wait(3000)) { throw new TimeoutException(@"IPC took too long to send"); } } return(0); } // we want to allow multiple instances to be started when in debug. if (!DebugUtils.IsDebugBuild) { return(0); } } if (tournamentClient) { host.Run(new TournamentGame()); } else { host.Run(new OsuGameDesktop(args)); } return(0); } }
public static void Main(string[] args) { // Back up the cwd before DesktopGameHost changes it string cwd = Environment.CurrentDirectory; string gameName = base_game_name; bool tournamentClient = false; foreach (string arg in args) { string[] split = arg.Split('='); string key = split[0]; string val = split.Length > 1 ? split[1] : string.Empty; switch (key) { case "--tournament": tournamentClient = true; break; case "--debug-client-id": if (!DebugUtils.IsDebugBuild) { throw new InvalidOperationException("Cannot use this argument in a non-debug build."); } if (!int.TryParse(val, out int clientID)) { throw new ArgumentException("Provided client ID must be an integer."); } gameName = $"{base_game_name}-{clientID}"; break; } } using (DesktopGameHost host = Host.GetSuitableDesktopHost(gameName, new HostOptions { BindIPC = true })) { host.ExceptionThrown += handleException; if (!host.IsPrimaryInstance) { if (args.Length > 0 && args[0].Contains('.')) // easy way to check for a file import in args { var importer = new ArchiveImportIPCChannel(host); foreach (string file in args) { Console.WriteLine(@"Importing {0}", file); if (!importer.ImportAsync(Path.GetFullPath(file, cwd)).Wait(3000)) { throw new TimeoutException(@"IPC took too long to send"); } } return; } // we want to allow multiple instances to be started when in debug. if (!DebugUtils.IsDebugBuild) { Logger.Log(@"osu! does not support multiple running instances.", LoggingTarget.Runtime, LogLevel.Error); return; } } if (host.IsPrimaryInstance) { try { Logger.Log("Starting legacy IPC provider..."); legacyIpc = new LegacyTcpIpcProvider(); legacyIpc.Bind(); } catch (Exception ex) { Logger.Error(ex, "Failed to start legacy IPC provider"); } } if (tournamentClient) { host.Run(new TournamentGame()); } else { host.Run(new OsuGameDesktop(args)); } } }
public static void Main() { using (DesktopGameHost host = Host.GetSuitableHost(@"Rhythmic", true)) host.Run(new RhythmicTestBrowser()); }