diff --git a/Ryujinx.Updater/Program.cs b/Ryujinx.Updater/Program.cs index 67f6aa98ff..a2d500dddc 100644 --- a/Ryujinx.Updater/Program.cs +++ b/Ryujinx.Updater/Program.cs @@ -13,6 +13,8 @@ namespace Ryujinx.Updater public static string updateSaveLocation; + public static int lastPercentage; + private static void MoveAllFilesOver(string root, string dest) { foreach (var directory in Directory.GetDirectories(root)) @@ -79,14 +81,23 @@ namespace Ryujinx.Updater Console.WriteLine($"Downloading latest Ryujinx package..."); - using (WebClient client = new WebClient()) + WebClient client = new WebClient(); + + client.DownloadProgressChanged += (s, e) => { - client.DownloadFile(downloadUrl, updateSaveLocation); - } + if (e.ProgressPercentage != lastPercentage) + { + Console.WriteLine("Package downloading... " + e.ProgressPercentage + "%"); + } + + lastPercentage = e.ProgressPercentage; + }; + + client.DownloadFileTaskAsync(new Uri(downloadUrl), updateSaveLocation).Wait(); // Extract Update .zip - Console.WriteLine($"Extracting Ryujinx..."); + Console.WriteLine($"Extracting Ryujinx package..."); ZipFile.ExtractToDirectory(updateSaveLocation, localAppPath, true); @@ -107,6 +118,5 @@ namespace Ryujinx.Updater startInfo.UseShellExecute = true; Process.Start(startInfo); } - } } \ No newline at end of file diff --git a/Ryujinx/Ui/AboutWindow.cs b/Ryujinx/Ui/AboutWindow.cs index f8f53d4a9a..57939c718a 100644 --- a/Ryujinx/Ui/AboutWindow.cs +++ b/Ryujinx/Ui/AboutWindow.cs @@ -4,8 +4,6 @@ using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.InteropServices; -using Utf8Json; -using Utf8Json.Resolvers; using GUI = Gtk.Builder.ObjectAttribute;