| 6 | namespace PenguLoader |
| 7 | { |
| 8 | public static class Program |
| 9 | { |
| 10 | public static string Name => "Pengu Loader"; |
| 11 | public static string HomepageUrl => "https://pengu.lol"; |
| 12 | public static string DiscordUrl => "https://chat.pengu.lol"; |
| 13 | public static string GithubRepo => "PenguLoader/PenguLoader"; |
| 14 | public static string GithubUrl => $"https://github.com/{GithubRepo}"; |
| 15 | public static string GithubIssuesUrl => $"https://github.com/{GithubRepo}/issues"; |
| 16 | |
| 17 | public const string VERSION = "1.1.6"; |
| 18 | |
| 19 | [STAThread] |
| 20 | private static int Main(string[] args) |
| 21 | { |
| 22 | var arg = args.Length > 0 ? args[0] : null; |
| 23 | |
| 24 | if (DataStore.IsDataStore(arg)) |
| 25 | { |
| 26 | DataStore.DumpDataStore(arg); |
| 27 | return 0; |
| 28 | } |
| 29 | |
| 30 | using (var mutex = new Mutex(true, "989d2110-46da-4c8d-84c1-c4a42e43c424", out var createdNew)) |
| 31 | { |
| 32 | if (arg != null) |
| 33 | { |
| 34 | switch (arg) |
| 35 | { |
| 36 | case "--install": |
| 37 | return HandleInstall(createdNew, true); |
| 38 | case "--uninstall": |
| 39 | return HandleInstall(createdNew, false); |
| 40 | default: |
| 41 | break; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | return RunApplication(createdNew); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | private static int RunApplication(bool createdNew) |
| 50 | { |
| 51 | if (!createdNew) |
| 52 | { |
| 53 | Native.SetFocusToPreviousInstance(); |
| 54 | return 0; |
| 55 | } |
| 56 | |
| 57 | if (!Environment.Is64BitOperatingSystem) |
| 58 | { |
| 59 | MessageBox.Show("32-BIT CLIENT DEPRECATION\n\nStarting with LoL patch 13.8, 32-bit Windows is no longer supported. Please upgrade your Windows to 64-bit.", |
| 60 | Name, MessageBoxButton.OK, MessageBoxImage.Warning); |
| 61 | return 1; |
| 62 | } |
| 63 | |
| 64 | App.Main(); |
| 65 | return 0; |
nothing calls this directly
no outgoing calls
no test coverage detected