From 0285892f20184b3feeccaa66d93712e4f1f32220 Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Mon, 21 Apr 2025 20:55:55 +0200 Subject: [PATCH] fixes --- ModpackUpdater.Apps.Client/Form1.cs | 5 ++++- ModpackUpdater.Apps.Client/Program.cs | 15 +++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ModpackUpdater.Apps.Client/Form1.cs b/ModpackUpdater.Apps.Client/Form1.cs index c6f31b6..02a8ac9 100644 --- a/ModpackUpdater.Apps.Client/Form1.cs +++ b/ModpackUpdater.Apps.Client/Form1.cs @@ -144,7 +144,10 @@ public partial class Form1 private async Task ExecuteUpdate(bool doInstall) { - var updater = new ModpackInstaller(updateConfig, modpackInfo); + var updater = new ModpackInstaller(updateConfig, modpackInfo) + { + OverwriteRefTag = Program.Options.RefTag + }; updater.InstallProgessUpdated += Update_InstallProgessUpdated; updater.CheckingProgressUpdated += Updated_CheckingProgresssUpdated; diff --git a/ModpackUpdater.Apps.Client/Program.cs b/ModpackUpdater.Apps.Client/Program.cs index 941b48f..8285894 100644 --- a/ModpackUpdater.Apps.Client/Program.cs +++ b/ModpackUpdater.Apps.Client/Program.cs @@ -18,6 +18,8 @@ public static class Program public static ILogger Log => log; + internal static Options Options { get; private set; } + [DllImport("kernel32.dll")] static extern nint GetConsoleWindow(); @@ -33,15 +35,15 @@ public static class Program [STAThread] internal static void Main(string[] args) { - var options = new Options(args); - if (options.Help) - options.DrawHelp(); - else if (options.NoUi) - InstallWithoutGui(options.UpdateOptions, options.Silent); + Options = new Options(args); + if (Options.Help) + Options.DrawHelp(); + else if (Options.NoUi) + InstallWithoutGui(Options.UpdateOptions, Options.Silent); else { ShowWindow(GetConsoleWindow(), 0); - RunApp(options.UpdateOptions); + RunApp(Options.UpdateOptions); } } @@ -103,6 +105,7 @@ public static class Program // Check for update var installer = new ModpackInstaller(config, info) { + OverwriteRefTag = Options.RefTag, Log = Log, }; var result = installer.Check(updateOptions).Result;