merge update urls and include app short name in distro
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user