mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-20 03:26:34 +00:00
Remove Avalonia GUI migration code
This commit is contained in:
parent
71738f914a
commit
8a82388d00
1 changed files with 0 additions and 44 deletions
|
@ -300,13 +300,6 @@ namespace Ryujinx.Modules
|
||||||
// Find the process name.
|
// Find the process name.
|
||||||
string ryuName = Path.GetFileName(Environment.ProcessPath) ?? string.Empty;
|
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.
|
// Some operating systems can see the renamed executable, so strip off the .ryuold if found.
|
||||||
if (ryuName.EndsWith(".ryuold"))
|
if (ryuName.EndsWith(".ryuold"))
|
||||||
{
|
{
|
||||||
|
@ -766,43 +759,6 @@ namespace Ryujinx.Modules
|
||||||
{
|
{
|
||||||
File.Delete(file);
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue