Change download location of updater

This commit is contained in:
Travis Nickles 2018-12-28 19:25:43 -06:00
parent eae1d47ba6
commit d2324eabc5

View File

@ -63,7 +63,7 @@ namespace DS4Windows
{ "DS4Windows v" + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion,
string.Empty, string.Empty, string.Empty, string.Empty };
private const string UPDATER_VERSION = "1.2.9.0";
private const string UPDATER_VERSION = "1.2.9";
private const int WM_QUERYENDSESSION = 0x11;
private const int WM_CLOSE = 0x10;
internal string updaterExe = Environment.Is64BitProcess ? "DS4Updater.exe" : "DS4Updater_x86.exe";
@ -770,14 +770,14 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question
if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe")
&& (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo(UPDATER_VERSION) != 0)))
{
Uri url2 = new Uri($"http://23.239.26.40/ds4windows/files/{updaterExe}");
Uri url2 = new Uri($"http://github.com/Ryochan7/DS4Updater/releases/download/v{UPDATER_VERSION}/{updaterExe}");
WebClient wc2 = new WebClient();
if (appdatapath == exepath)
wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe");
else
{
this.BeginInvoke((System.Action)(() => MessageBox.Show(Properties.Resources.PleaseDownloadUpdater)));
Process.Start($"http://23.239.26.40/ds4windows/files/{updaterExe}");
Process.Start($"http://github.com/Ryochan7/DS4Updater/releases/download/v{UPDATER_VERSION}/{updaterExe}");
}
}
@ -2086,14 +2086,14 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question
if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe")
&& (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo(UPDATER_VERSION) != 0)))
{
Uri url2 = new Uri($"http://23.239.26.40/ds4windows/files/{updaterExe}");
Uri url2 = new Uri($"http://github.com/Ryochan7/DS4Updater/releases/download/v{UPDATER_VERSION}/{updaterExe}");
WebClient wc2 = new WebClient();
if (appdatapath == exepath)
wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe");
else
{
this.BeginInvoke((System.Action)(() => MessageBox.Show(Properties.Resources.PleaseDownloadUpdater)));
Process.Start($"http://23.239.26.40/ds4windows/files/{updaterExe}");
Process.Start($"http://github.com/Ryochan7/DS4Updater/releases/download/v{UPDATER_VERSION}/{updaterExe}");
}
}