merge update urls and include app short name in distro

This commit is contained in:
2025-11-21 19:52:58 +01:00
parent e7aa79db64
commit c864d9125a
5 changed files with 7 additions and 9 deletions

View File

@@ -10,8 +10,10 @@ using Pilz.Updating.Client;
namespace ModpackUpdater.Apps;
public class AppUpdates(string updateUrl, Window mainWindow)
public class AppUpdates(string appShortName, Window mainWindow)
{
public const string UpdateUrl = "https://git.pilzinsel64.de/litw-refined/minecraft-modpack-updater/-/snippets/3/raw/main/updates-new.json";
public event EventHandler? OnDownloadProgramUpdate;
public bool UsePopups { get; set; }
@@ -39,9 +41,9 @@ public class AppUpdates(string updateUrl, Window mainWindow)
return;
var myAppPath = EnvironmentEx.ProcessPath!;
var updater = new UpdateClient(updateUrl, Assembly.GetEntryAssembly()!.GetAppVersion(), AppChannel.Stable)
var updater = new UpdateClient(UpdateUrl, Assembly.GetEntryAssembly()!.GetAppVersion(), AppChannel.Stable)
{
Distro = RuntimeInformationsEx.GetRuntimeIdentifier(),
Distro = $"{appShortName}-{RuntimeInformationsEx.GetRuntimeIdentifier()}",
};
if (await updater.CheckForUpdate() is not { } packageToInstall || await AskForUpdate() != ButtonResult.Yes)