Skip to content

Commit

Permalink
Download runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
frxctura authored and Fenopy committed Jan 5, 2023
1 parent ca74214 commit a9e11e3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a9e11e3

Please sign in to comment.