private void InstallModLoader() { try { string ManagedFolder = System.IO.Path.Combine(ModInfoTools.DataFolder, "Managed"); Patcher.PathToExe = System.IO.Path.Combine(ManagedFolder, "QModManager.exe"); if (!System.IO.File.Exists(Patcher.PathToExe)) { Patcher.UpdatePatcher(ManagedFolder); Patcher.RunExe("-i"); } else if (ConfigHandler.CacheValue("lastpatchversion", "0.0.0") != Tools.Version_Number) { Patcher.UpdatePatcher(ManagedFolder); Patcher.RunExe("-u"); Patcher.IsReinstalling = true; } else { Patcher.RunExe("-i"); } ConfigHandler.SetValue("lastpatchversion", Tools.Version_Number); } catch (Exception E) { _SupressGithubMessage = true; Log("Unable to use patcher! Game may not load mods!\n" + E.Message); } }
public MainWindow() : base(Gtk.WindowType.Toplevel) { //Kill running QModManager processes, if there are any KillPatcher(); Build(); SetupTree(); comboboxModState.RemoveText(1); SkipStartAction.Active = ConfigHandler.CacheValue("skipstart", false); inst = this; ServicePointManager.SecurityProtocol = (System.Net.SecurityProtocolType) 0x0FF0; //System.Net.SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; Tasks.AddToTaskQueue(new Task(SleepForTime)); Tasks.AddToTaskQueue(new Task(GetLocalMods)); Tasks.AddToTaskQueue(new Task(UpdateProgram.V_LookForProgramUpdate)); Tasks.AddToTaskQueue(new Task(InstallModLoader)); Tasks.AddToTaskQueue(new Task(GetGithubMods)); }