mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Adding UI and support for welcome, conclusion and license
This commit is contained in:
@@ -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 "%TEMP%\velopack_{Options.PackId}"" Execute="deferred" Return="ignore" />
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
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
BIN
vendor/wix/assets/top-banner.bmp
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Reference in New Issue
Block a user