fix: bootstrapper dry run fix
This commit is contained in:
parent
c82a34f9a4
commit
fe816fd2b6
|
|
@ -31,11 +31,19 @@ public class MainWindow : Form
|
|||
Buttons = { CloseButton }
|
||||
};
|
||||
|
||||
Page.Created += (s, e) =>
|
||||
Page.Created += (_, _) =>
|
||||
{
|
||||
if (Bootstrapper.Initialize())
|
||||
Bootstrapper.Run();
|
||||
};
|
||||
|
||||
// This is a small hack to ensure that the underlying Form that MainWindow has
|
||||
// doesn't open when the TaskDialogPage is destroyed.
|
||||
Page.Destroyed += (_, _) =>
|
||||
{
|
||||
Environment.Exit(0);
|
||||
};
|
||||
|
||||
ShowTaskDialog();
|
||||
}
|
||||
|
||||
|
|
@ -75,8 +83,8 @@ public class MainWindow : Form
|
|||
|
||||
private void Bootstrapper_Errored(object? sender, string[] texts)
|
||||
{
|
||||
Page.Icon = TaskDialogIcon.Error;
|
||||
Page.Heading = texts[0];
|
||||
Page.Text = texts[1];
|
||||
Page.ProgressBar!.State = TaskDialogProgressBarState.Error;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
using System.Runtime.InteropServices;
|
||||
namespace Kiseki.Launcher.Windows;
|
||||
|
||||
namespace Kiseki.Launcher.Windows
|
||||
{
|
||||
public static class Win32
|
||||
{
|
||||
// Ref: https://learn.microsoft.com/en-us/windows/win32/msi/error-codes
|
||||
|
|
@ -15,4 +13,3 @@ namespace Kiseki.Launcher.Windows
|
|||
ERROR_INTERNAL_ERROR = 1359
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue