This commit is contained in:
2025-04-21 20:55:55 +02:00
parent 01fc5606cb
commit 0285892f20
2 changed files with 13 additions and 7 deletions

View File

@@ -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;

View File

@@ -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;