Adding UI and support for welcome, conclusion and license

This commit is contained in:
Kevin Bost
2025-03-22 23:28:23 -07:00
parent 269f56dbbc
commit 2ca2ed9993
6 changed files with 57 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
using System.Globalization;
using System.Globalization;
using System.Runtime.Versioning;
using System.Text;
using System.Text.RegularExpressions;
@@ -397,6 +397,33 @@ public class WindowsPackCommandRunner : PackageBuilder<WindowsPackOptions>
</Directory>
</StandardDirectory>
{(!string.IsNullOrWhiteSpace(Options.Icon) ? $"""
<Icon Id="appicon" SourceFile="{Options.Icon}"/>
<Property Id="ARPPRODUCTICON" Value="appicon" />
""" : "")}
{(!string.IsNullOrWhiteSpace(Options.InstLicense) ? $"""
<WixVariable
Id="WixUILicenseRtf"
Value="{Options.InstLicense}"
/>
""" : "")}
<WixVariable
Id="WixUIBannerBmp"
Value="{HelperFile.WixAssetsTopBanner}"
/>
<WixVariable
Id="WixUIDialogBmp"
Value="{HelperFile.WixAssetsDialogBackground}"
/>
<ui:WixUI
Id="WixUI_InstallDir"
InstallDirectory="INSTALLFOLDER"
/>
<Files Include="{portableDirectory.FullName}\**" />
<CustomAction Id="RemoveTempDirectory" Directory="TempFolder" Impersonate="yes" ExeCommand="cmd.exe /C rmdir /S /Q &quot;%TEMP%\velopack_{Options.PackId}&quot;" Execute="deferred" Return="ignore" />

View File

@@ -24,6 +24,12 @@ public class WindowsPackOptions : WindowsReleasifyOptions, INugetPackCommand, IP
public string Shortcuts { get; set; }
public string InstWelcome { get; set; }
public string InstLicense { get; set; }
public string InstConclusion { get; set; }
public bool BuildMsi { get; set; }
public bool BuildMsiDeploymentTool { get; set; }

View File

@@ -78,6 +78,11 @@ public static class HelperFile
[SupportedOSPlatform("windows")]
public static string WixPath => FindHelperFile("wix\\5.0.2\\wix.exe");
[SupportedOSPlatform("windows")]
public static string WixAssetsTopBanner => FindHelperFile("wix\\assets\\top-banner.bmp");
[SupportedOSPlatform("windows")]
public static string WixAssetsDialogBackground => FindHelperFile("wix\\assets\\dialog-background.bmp");
[SupportedOSPlatform("windows")]
public static string SignToolPath => FindHelperFile("signing\\signtool.exe");

View File

@@ -20,6 +20,12 @@ public class WindowsPackCommand : PackCommand
public string Shortcuts { get; private set; }
public string InstWelcome { get; set; }
public string InstLicense { get; set; }
public string InstConclusion { get; set; }
public bool BuildMsi { get; private set; }
public bool BuildMsiDeploymentTool { get; private set; }
@@ -89,6 +95,18 @@ public class WindowsPackCommand : PackCommand
.SetDescription("Compile a .msi machine-wide bootstrap package.")
;//.SetHidden();
AddOption<FileInfo>((v) => InstWelcome = v.ToFullNameOrNull(), "--instWelcome")
.SetDescription("Set the installer package welcome content.")
.SetArgumentHelpName("PATH");
AddOption<FileInfo>((v) => InstLicense = v.ToFullNameOrNull(), "--instLicense")
.SetDescription("Set the installer package license content.")
.SetArgumentHelpName("PATH");
AddOption<FileInfo>((v) => InstConclusion = v.ToFullNameOrNull(), "--instConclusion")
.SetDescription("Set the installer package conclusion content.")
.SetArgumentHelpName("PATH");
}
}
}

BIN
vendor/wix/assets/dialog-background.bmp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

BIN
vendor/wix/assets/top-banner.bmp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB