UI: Add a show changelog button in the Updater, for new updates & when you're on the latest version.

This commit is contained in:
Evan Husted 2024-11-22 14:38:58 -06:00
parent e2b7738465
commit f8d63f9a2f
22 changed files with 87 additions and 11 deletions

View file

@ -1,3 +1,4 @@
using System;
using System.Reflection;
namespace Ryujinx.Common
@ -35,5 +36,13 @@ namespace Ryujinx.Common
public static bool IsReleaseBuild => IsValid && ReleaseChannelName.Equals(ReleaseChannel);
public static string Version => IsValid ? BuildVersion : Assembly.GetEntryAssembly()!.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion;
public static string GetChangelogUrl(Version currentVersion, Version newVersion) =>
IsCanaryBuild
? $"https://github.com/{ReleaseChannelOwner}/{ReleaseChannelSourceRepo}/compare/Canary-{currentVersion}...Canary-{newVersion}"
: $"https://github.com/{ReleaseChannelOwner}/{ReleaseChannelSourceRepo}/releases/tag/{newVersion}";
public static string GetChangelogForVersion(Version version) =>
$"https://github.com/{ReleaseChannelOwner}/{ReleaseChannelRepo}/releases/tag/{version}";
}
}