diff --git a/MainForm.cs b/MainForm.cs index c8811dd8..a63248b8 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -3386,6 +3386,25 @@ public async void gamesListView_SelectedIndexChanged(object sender, EventArgs e) } else { + if (!Directory.Exists(Environment.CurrentDirectory + "\\runtimes")) + { + WebClient client = new WebClient(); + ServicePointManager.Expect100Continue = true; + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + try + { + client.DownloadFile("https://wiki.vrpirates.club/downloads/runtimes.7z", "runtimes.7z"); + Utilities.Zip.ExtractFile(Environment.CurrentDirectory + "\\runtimes.7z", Environment.CurrentDirectory); + File.Delete("runtimes.7z"); + } + catch (Exception ex) + { + _ = FlexibleMessageBox.Show($"You are unable to access the wiki page with the Exception: {ex.Message}\n"); + _ = FlexibleMessageBox.Show("Required files for the Trailers were unable to be downloaded, please use Thumbnails instead"); + enviromentCreated= true; + webView21.Hide(); + } + } if (!enviromentCreated) { await CreateEnviroment();