static Integration() { CosturaUtility.Initialize(); }
public UpdateChecker() { CosturaUtility.Initialize(); }
public static void Initialize() { CosturaUtility.Initialize(); }
static Program() { CosturaUtility.Initialize(); AssemblyResolver.Instance.Initialize(); }
public static void Initialize() { ExtractBrowserDependencies.ExtractContent(); CosturaUtility.Initialize(); }
static VolumeBoundPropertyProvider() { CosturaUtility.Initialize(); }
/// <summary> /// Initializes the <see cref="Program"/> class. /// </summary> static Program() { // Load embedded resources CosturaUtility.Initialize(); }
public ProxyPlugin() { CosturaUtility.Initialize(); }
public App() { CosturaUtility.Initialize(); }
public Plugin() { CosturaUtility.Initialize(); AssemblyResolver.Instance.Initialize(this); }
private static int Main(string[] args) { CosturaUtility.Initialize(); ModType modType; bool launchGame = false; if (args.Length == 0) { if (File.Exists("GettingOverIt.exe") && Directory.Exists("GettingOverIt_Data")) { Console.WriteLine("client/server not specified, but found client specific files. Updating client."); modType = ModType.Client; } else { Console.WriteLine("client/server not specified, could not find client specific files. Updating server."); modType = ModType.Server; } } else { modType = args[0] == "server" ? ModType.Server : args[0] == "client" ? ModType.Client : ModType.Invalid; if (modType == ModType.Client && args.Length >= 2 && args[1] == "launch") { launchGame = true; } } if (modType == ModType.Invalid) { Console.WriteLine("Invalid mod type specified. Please specify 'client' or 'server'."); return(2); } string currentModuleFileName = Directory.GetCurrentDirectory(); if (modType == ModType.Client) { currentModuleFileName = Path.Combine(currentModuleFileName, "GettingOverIt.exe"); } else if (modType == ModType.Server) { currentModuleFileName = Path.Combine(currentModuleFileName, "GettingOverIt.Server.exe"); } var waitingProcesses = FindProcesses(currentModuleFileName, "GettingOverIt", "GettingOverIt.Server"); if (waitingProcesses.Length > 0) { Console.WriteLine("Waiting for processes to exit..."); foreach (var process in waitingProcesses) { process.WaitForExit(); } } if (!LocalData.Load()) { Console.Error.WriteLine("Failed to load local version info. Press any key to close the updater."); Console.ReadKey(true); return(1); } using (var client = new ApiClient()) { ModVersion latestVersion; try { latestVersion = client.QueryLatestVersion(modType); } catch (Exception ex) when(ex is WebException || ex is ApiRequestFailedException) { Console.Error.WriteLine($"Failed to query latest version: {ex.Message}. Press any key to close the updater."); Console.ReadKey(true); return(1); } int retries = 0; while (retries < MaxRetries) { bool success = DownloadVersionAsync(latestVersion).Result; if (success) { Console.WriteLine("Update downloaded successfully."); Thread.Sleep(2000); break; } ++retries; if (retries < MaxRetries) { Console.Error.WriteLine($"Failed to download some files, retrying update in 3 seconds (attempt {retries}/{MaxRetries})..."); Thread.Sleep(3000); Console.Clear(); } else { Console.Error.WriteLine("Failed to download all files successfully, aborting update. Press any key to close the updater."); Console.ReadKey(true); return(1); } } } if (launchGame) { Console.WriteLine("Launching game..."); Process.Start("GettingOverIt.exe"); } return(0); }
public XIVLogPlugin() { instance = this; CosturaUtility.Initialize(); AssemblyResolver.Instance.Initialize(this); }
public ModuleWeaver() { CosturaUtility.Initialize(); }
static KagamiAddon() { CosturaUtility.Initialize(); AssemblyResolver.Initialize(); }
/// <summary> /// 静态构造函数, 注册依赖注入回调 /// </summary> static XLZMain() { // 初始化 Costura.Fody CosturaUtility.Initialize(); }
/// <summary> /// Preps the updater for run /// </summary> private void Init() { CosturaUtility.Initialize(); updater = new ASBUpdater(); }
public static void Main() { CosturaUtility.Initialize(); App.Main(); }
static Program() { CosturaUtility.Initialize(); }
private ForgefierApp() { InitializeComponent(); CosturaUtility.Initialize(); }