From 3e3a4ca2ffb13e1b41e5cb5d69ef50ad91bcd7fc Mon Sep 17 00:00:00 2001
From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com>
Date: Thu, 29 May 2025 15:48:38 +0200
Subject: [PATCH 1/3] feat: added icon to installer's bootstrap application
---
Installer/Program.cs | 19 +++++
scripts/Publish.ps1 | 1 +
scripts/files/RtfThemeLarge.xml | 119 ++++++++++++++++++++++++++++++++
3 files changed, 139 insertions(+)
create mode 100644 scripts/files/RtfThemeLarge.xml
diff --git a/Installer/Program.cs b/Installer/Program.cs
index 10a09a7..6ba90db 100644
--- a/Installer/Program.cs
+++ b/Installer/Program.cs
@@ -119,6 +119,9 @@ public class BootstrapperOptions : SharedOptions
[Option('w', "windows-app-sdk-path", Required = true, HelpText = "Path to the Windows App Sdk package to embed")]
public string WindowsAppSdkPath { get; set; }
+ [Option('t', "theme-xml-path", Required = false, HelpText = "Path to the theme .xml file to use for the installer")]
+ public string ThemeXmlPath { get; set; }
+
public new void Validate()
{
base.Validate();
@@ -130,6 +133,8 @@ public class BootstrapperOptions : SharedOptions
if (!SystemFile.Exists(WindowsAppSdkPath))
throw new ArgumentException($"Windows App Sdk package not found at '{WindowsAppSdkPath}'",
nameof(WindowsAppSdkPath));
+ if (ThemeXmlPath != null && !SystemFile.Exists(ThemeXmlPath))
+ throw new ArgumentException($"Theme XML file not found at '{ThemeXmlPath}'", nameof(ThemeXmlPath));
}
}
@@ -415,6 +420,20 @@ private static int BuildBundle(BootstrapperOptions opts)
bundle.Application.LicensePath = opts.LicenseFile;
bundle.Application.LogoFile = opts.LogoPng;
+ if (opts.ThemeXmlPath != null)
+ {
+ bundle.Application.ThemeFile = opts.ThemeXmlPath;
+ bundle.Application.Payloads =
+ [
+ new ExePackagePayload
+ {
+ Name = "icon.ico",
+ SourceFile = opts.IconFile,
+ Compressed = true,
+ },
+ ];
+ }
+
// Set the default install folder, which will eventually be passed into
// the MSI.
bundle.Variables =
diff --git a/scripts/Publish.ps1 b/scripts/Publish.ps1
index 4390dfa..ee86980 100644
--- a/scripts/Publish.ps1
+++ b/scripts/Publish.ps1
@@ -189,6 +189,7 @@ $windowsAppSdkPath = Join-Path $scriptRoot "files\windows-app-sdk-$($arch).exe"
--icon-file "App\coder.ico" `
--msi-path $msiOutputPath `
--windows-app-sdk-path $windowsAppSdkPath `
+ --theme-xml-path "scripts\files\RtfThemeLarge.xml" `
--logo-png "scripts\files\logo.png"
if ($LASTEXITCODE -ne 0) { throw "Failed to build bootstrapper" }
diff --git a/scripts/files/RtfThemeLarge.xml b/scripts/files/RtfThemeLarge.xml
new file mode 100644
index 0000000..2ab227d
--- /dev/null
+++ b/scripts/files/RtfThemeLarge.xml
@@ -0,0 +1,119 @@
+
+
+
+
+
+ Segoe UI
+ Segoe UI
+ Segoe UI
+ Segoe UI
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #(loc.InstallAcceptCheckbox)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #(loc.FailureHyperlinkLogText)
+
+
+
+
+
+
+
\ No newline at end of file
From d7232bf1b6b5273d1c0196302e01f96f8fa98bc6 Mon Sep 17 00:00:00 2001
From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com>
Date: Mon, 2 Jun 2025 13:35:49 +0200
Subject: [PATCH 2/3] added license file for the imported RtfLargeTheme from
WiX 5.0.2
---
scripts/files/RtfThemeLarge.xml | 37 +++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
diff --git a/scripts/files/RtfThemeLarge.xml b/scripts/files/RtfThemeLarge.xml
index 2ab227d..a704810 100644
--- a/scripts/files/RtfThemeLarge.xml
+++ b/scripts/files/RtfThemeLarge.xml
@@ -1,6 +1,39 @@
-
+
+
Segoe UI
@@ -116,4 +149,4 @@
-
\ No newline at end of file
+
From 93b4375c0a0fe11130dbfec380b89d65d687ed30 Mon Sep 17 00:00:00 2001
From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com>
Date: Mon, 2 Jun 2025 18:58:27 +0200
Subject: [PATCH 3/3] fmt fix
---
Installer/Program.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Installer/Program.cs b/Installer/Program.cs
index 6ba90db..f02f9b2 100644
--- a/Installer/Program.cs
+++ b/Installer/Program.cs
@@ -423,7 +423,7 @@ private static int BuildBundle(BootstrapperOptions opts)
if (opts.ThemeXmlPath != null)
{
bundle.Application.ThemeFile = opts.ThemeXmlPath;
- bundle.Application.Payloads =
+ bundle.Application.Payloads =
[
new ExePackagePayload
{