Browse Source

Fix #2574: Show verification screen with target directory before starting installation

pull/2578/head
Andreas Weizel 3 years ago
parent
commit
a767fc454c
  1. 12
      ILSpy.Installer/setup.cs
  2. 10
      ILSpy.Installer/winui.wxl

12
ILSpy.Installer/setup.cs

@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
using System;
using System.IO;
using System.Linq;
using System.Text;
using WixSharp;
using WixSharp.Controls;
namespace ILSpy.Installer
{
@ -33,6 +35,8 @@ namespace ILSpy.Installer @@ -33,6 +35,8 @@ namespace ILSpy.Installer
project.InstallScope = InstallScope.perUser;
project.InstallPrivileges = InstallPrivileges.limited;
project.ControlPanelInfo.ProductIcon = @"..\ILSpy\Images\ILSpy.ico";
project.LocalizationFile = Path.Combine(Environment.CurrentDirectory, "winui.wxl");
project.Encoding = Encoding.UTF8;
project.MajorUpgrade = new MajorUpgrade {
Schedule = UpgradeSchedule.afterInstallInitialize,
@ -40,7 +44,13 @@ namespace ILSpy.Installer @@ -40,7 +44,13 @@ namespace ILSpy.Installer
DowngradeErrorMessage = "A newer release of ILSpy is already installed on this system. Please uninstall it first to continue."
};
project.UI = WUI.WixUI_ProgressOnly;
project.UI = WUI.WixUI_InstallDir;
project.CustomUI =
new DialogSequence()
.On(NativeDialogs.WelcomeDlg, Buttons.Next,
new ShowDialog(NativeDialogs.VerifyReadyDlg))
.On(NativeDialogs.VerifyReadyDlg, Buttons.Back,
new ShowDialog(NativeDialogs.WelcomeDlg));
project.ResolveWildCards().FindFile(f => f.Name.EndsWith("ILSpy.exe")).First()
.Shortcuts = new[] {

10
ILSpy.Installer/winui.wxl

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<WixLocalization Culture="en-US" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="VerifyReadyDlgInstallText" Overridable="yes">Click Install to begin the installation. Click Cancel to exit the wizard.
ILSpy will be installed for current user into following directory:
[INSTALLDIR]
</String>
</WixLocalization>
Loading…
Cancel
Save