From 7d85df84f8634bd61e3d842b0375fc5c8055862f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrick=20Rossell=C3=B3=20Colom?=
<74001504+PatrickSys@users.noreply.github.com>
Date: Mon, 21 Sep 2026 18:44:14 +0200
Subject: [PATCH] fix(windows): use executable icon for MSI shortcut
---
crates/strand-tauri/tauri.conf.json | 7 +-
crates/strand-tauri/wix/main.wxs | 382 ++++++++++++++++++++++++++++
scripts/check-release-security.mjs | 30 +++
3 files changed, 418 insertions(+), 1 deletion(-)
create mode 100644 crates/strand-tauri/wix/main.wxs
diff --git a/crates/strand-tauri/tauri.conf.json b/crates/strand-tauri/tauri.conf.json
index d2f45e2..29178d1 100644
--- a/crates/strand-tauri/tauri.conf.json
+++ b/crates/strand-tauri/tauri.conf.json
@@ -57,7 +57,12 @@
],
"category": "DeveloperTool",
"shortDescription": "Fast, friendly Git client",
- "longDescription": "Strand is a desktop Git client for macOS, Windows, and Linux."
+ "longDescription": "Strand is a desktop Git client for macOS, Windows, and Linux.",
+ "windows": {
+ "wix": {
+ "template": "wix/main.wxs"
+ }
+ }
},
"plugins": {
"updater": {
diff --git a/crates/strand-tauri/wix/main.wxs b/crates/strand-tauri/wix/main.wxs
new file mode 100644
index 0000000..59257ad
--- /dev/null
+++ b/crates/strand-tauri/wix/main.wxs
@@ -0,0 +1,382 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{#if allow_downgrades}}
+
+ {{else}}
+
+ {{/if}}
+
+
+ Installed AND NOT UPGRADINGPRODUCTCODE
+
+
+
+
+ {{#if banner_path}}
+
+ {{/if}}
+ {{#if dialog_image_path}}
+
+ {{/if}}
+ {{#if license}}
+
+ {{/if}}
+
+
+
+
+
+
+ {{#if homepage}}
+
+
+
+ {{/if}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed
+
+
+
+ {{#unless license}}
+
+ 1
+ 1
+ {{/unless}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{#each deep_link_protocols as |protocol| ~}}
+
+
+
+
+
+
+
+
+
+
+ {{/each~}}
+
+
+
+ {{#each file_associations as |association| ~}}
+ {{#each association.ext as |ext| ~}}
+
+
+
+
+
+ {{/each~}}
+ {{/each~}}
+
+ {{#each binaries as |bin| ~}}
+
+
+
+ {{/each~}}
+ {{#if enable_elevated_update_task}}
+
+
+
+
+
+
+
+
+
+ {{/if}}
+ {{resources}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{#each merge_modules as |msm| ~}}
+
+
+
+
+
+
+
+ {{/each~}}
+
+
+
+
+
+ {{#each resource_file_ids as |resource_file_id| ~}}
+
+ {{/each~}}
+
+ {{#if enable_elevated_update_task}}
+
+
+
+ {{/if}}
+
+
+
+
+
+
+
+
+
+
+ {{#each binaries as |bin| ~}}
+
+ {{/each~}}
+
+
+
+
+ {{#each component_group_refs as |id| ~}}
+
+ {{/each~}}
+ {{#each component_refs as |id| ~}}
+
+ {{/each~}}
+ {{#each feature_group_refs as |id| ~}}
+
+ {{/each~}}
+ {{#each feature_refs as |id| ~}}
+
+ {{/each~}}
+ {{#each merge_refs as |id| ~}}
+
+ {{/each~}}
+
+
+ {{#if install_webview}}
+
+
+
+
+
+
+
+ {{#if download_bootstrapper}}
+
+
+
+
+
+
+
+ {{/if}}
+
+ {{#if webview2_bootstrapper_path}}
+
+
+
+
+
+
+
+
+ {{/if}}
+
+ {{#if webview2_installer_path}}
+
+
+
+
+
+
+
+
+ {{/if}}
+
+ {{#if minimum_webview2_version}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{/if}}
+
+ {{/if}}
+
+ {{#if enable_elevated_update_task}}
+
+
+
+
+ NOT(REMOVE)
+
+
+
+
+
+
+ (REMOVE = "ALL") AND NOT UPGRADINGPRODUCTCODE
+
+
+ {{/if}}
+
+
+ AUTOLAUNCHAPP AND NOT Installed
+
+
+
+
+
diff --git a/scripts/check-release-security.mjs b/scripts/check-release-security.mjs
index afd0042..fd98d66 100644
--- a/scripts/check-release-security.mjs
+++ b/scripts/check-release-security.mjs
@@ -6,6 +6,7 @@ const capability = JSON.parse(
);
const releaseWorkflow = readFileSync('.github/workflows/release.yml', 'utf8');
const tauriMain = readFileSync('crates/strand-tauri/src/main.rs', 'utf8');
+const wixTemplate = readFileSync('crates/strand-tauri/wix/main.wxs', 'utf8');
function fail(message) {
throw new Error(`release security check failed: ${message}`);
@@ -93,6 +94,35 @@ for (const fragment of [
}
}
+if (config.bundle?.windows?.wix?.template !== 'wix/main.wxs') {
+ fail('Windows MSI custom template is missing');
+}
+const startMenuShortcutStart = wixTemplate.indexOf(
+ '