From 779004827ef757e2ad756fcb83cd505d443276d5 Mon Sep 17 00:00:00 2001 From: Milihraim <112830494+Milihraim@users.noreply.github.com> Date: Thu, 3 Oct 2024 18:26:08 +0300 Subject: [PATCH] Update Updater.cs --- src/Ryujinx/Modules/Updater/Updater.cs | 44 -------------------------- 1 file changed, 44 deletions(-) diff --git a/src/Ryujinx/Modules/Updater/Updater.cs b/src/Ryujinx/Modules/Updater/Updater.cs index 9f186f2b387a..8efa96b68a69 100644 --- a/src/Ryujinx/Modules/Updater/Updater.cs +++ b/src/Ryujinx/Modules/Updater/Updater.cs @@ -300,13 +300,6 @@ private static async Task UpdateRyujinx(Window parent, string downloadUrl) // Find the process name. string ryuName = Path.GetFileName(Environment.ProcessPath) ?? string.Empty; - // Migration: Start the updated binary. - // TODO: Remove this in a future update. - if (ryuName.StartsWith("Ryujinx.Ava")) - { - ryuName = ryuName.Replace(".Ava", ""); - } - // Some operating systems can see the renamed executable, so strip off the .ryuold if found. if (ryuName.EndsWith(".ryuold")) { @@ -766,43 +759,6 @@ public static void CleanupUpdate() { File.Delete(file); } - - // Migration: Delete old Ryujinx binary. - // TODO: Remove this in a future update. - if (!OperatingSystem.IsMacOS()) - { - string[] oldRyuFiles = Directory.GetFiles(_homeDir, "Ryujinx.Ava*", SearchOption.TopDirectoryOnly); - // Assume we are running the new one if the process path is not available. - // This helps to prevent an infinite loop of restarts. - string currentRyuName = Path.GetFileName(Environment.ProcessPath) ?? (OperatingSystem.IsWindows() ? "Ryujinx.exe" : "Ryujinx"); - - string newRyuName = Path.Combine(_homeDir, currentRyuName.Replace(".Ava", "")); - if (!currentRyuName.Contains("Ryujinx.Ava")) - { - foreach (string oldRyuFile in oldRyuFiles) - { - File.Delete(oldRyuFile); - } - } - // Should we be running the old binary, start the new one if possible. - else if (File.Exists(newRyuName)) - { - ProcessStartInfo processStart = new(newRyuName) - { - UseShellExecute = true, - WorkingDirectory = _homeDir, - }; - - foreach (string argument in CommandLineState.Arguments) - { - processStart.ArgumentList.Add(argument); - } - - Process.Start(processStart); - - Environment.Exit(0); - } - } } } }