Skip to content
This repository has been archived by the owner on Oct 24, 2021. It is now read-only.

Commit

Permalink
Fixes for previously broken Updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Jays2Kings committed Dec 5, 2015
1 parent b528f3e commit f567bfb
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion DS4Windows/DS4Forms/DS4Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,23 @@ private async void UpdateTheUpdater()
File.Move(exepath + "\\Update Files\\DS4Updater.exe", exepath + "\\DS4Updater.exe");
Directory.Delete(exepath + "\\Update Files");
}

if(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileBuildPart == 32 &&
(!File.Exists(exepath + "\\DS4Updater.exe") ||
(File.Exists(exepath + "\\DS4Updater.exe") && FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileBuildPart < 32)))
{
Uri url2 = new Uri("https://github.com/Jays2Kings/DS4Windows/releases/download/v1.4.32/DS4Updater.exe");
WebClient wc2 = new WebClient();
if (appdatapath == exepath || !AdminNeeded())
{
File.Delete(exepath + "\\DS4Updater.exe");
wc2.DownloadFileAsync(url2, exepath + "\\DS4Updater.exe");
}
else
{
MessageBox.Show(Properties.Resources.PleaseDownloadUpdater);
Process.Start("https://github.com/Jays2Kings/DS4Windows/releases/download/v1.4.32/DS4Updater.exe");
}
}
}

void NewVersion()
Expand Down

0 comments on commit f567bfb

Please sign in to comment.