From fc143ad1714f37093bfe115ad4a90de3e5528f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=B2=D0=B8=D0=B4=20=D0=A7=D0=B5=D1=80=D0=BD?= =?UTF-8?q?=D0=BE=D0=BF=D1=8F=D1=82=D0=BE=D0=B2?= Date: Thu, 1 Feb 2024 03:06:51 +0200 Subject: [PATCH] 1.4.4 auto-update added --- NebulaAuth/Core/UpdateManager.cs | 16 ++++++++++++---- NebulaAuth/MainWindow.xaml | 2 +- NebulaAuth/NebulaAuth.csproj | 2 +- NebulaAuth/update.xml | 6 +++--- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/NebulaAuth/Core/UpdateManager.cs b/NebulaAuth/Core/UpdateManager.cs index eda4b78..d6424ef 100644 --- a/NebulaAuth/Core/UpdateManager.cs +++ b/NebulaAuth/Core/UpdateManager.cs @@ -1,16 +1,24 @@ -using System.Threading.Tasks; -using AutoUpdaterDotNET; - +using AutoUpdaterDotNET; +using NebulaAuth.Model; +using System; +using System.IO; namespace NebulaAuth.Core; public static class UpdateManager { - private const string UPDATE_URL = "https://raw.githubusercontent.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/master/NebulaAuth/update.json"; + private const string UPDATE_URL = "https://raw.githubusercontent.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/master/NebulaAuth/update.xml"; public static void CheckForUpdates() { + string jsonPath = Path.Combine(Environment.CurrentDirectory, "update-settings.json"); + AutoUpdater.PersistenceProvider = new JsonFilePersistenceProvider(jsonPath); + AutoUpdater.ShowSkipButton = false; + if (Settings.Instance.AllowAutoUpdate) + AutoUpdater.UpdateMode = Mode.ForcedDownload; AutoUpdater.Start(UPDATE_URL); + } + } \ No newline at end of file diff --git a/NebulaAuth/MainWindow.xaml b/NebulaAuth/MainWindow.xaml index 44b26a8..be104af 100644 --- a/NebulaAuth/MainWindow.xaml +++ b/NebulaAuth/MainWindow.xaml @@ -200,7 +200,7 @@ - by achies + by achies diff --git a/NebulaAuth/NebulaAuth.csproj b/NebulaAuth/NebulaAuth.csproj index 1efe64a..71e6dfa 100644 --- a/NebulaAuth/NebulaAuth.csproj +++ b/NebulaAuth/NebulaAuth.csproj @@ -10,7 +10,7 @@ en;ru;ua Theme\nebula lock.ico 7.0 - 1.4.3 + 1.4.4 diff --git a/NebulaAuth/update.xml b/NebulaAuth/update.xml index 83a8f9f..b3d2466 100644 --- a/NebulaAuth/update.xml +++ b/NebulaAuth/update.xml @@ -1,7 +1,7 @@  - 1.4.3.0 - https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/download/Release/NebulaAuth.1.4.3.zip - https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/tag/Release + 1.4.4.0 + https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/download/Release/NebulaAuth.1.4.4.zip + https://achiez.github.io/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/changelog/1.4.4.html false \ No newline at end of file