Skip to content

fix: resolve Windows MSI ICE30 by removing duplicate helmor-cli exter…#865

Merged
natllian merged 3 commits into
dohooo:mainfrom
passion729:fix/windows-msi-ice30
Jun 21, 2026
Merged

fix: resolve Windows MSI ICE30 by removing duplicate helmor-cli exter…#865
natllian merged 3 commits into
dohooo:mainfrom
passion729:fix/windows-msi-ice30

Conversation

@passion729

@passion729 passion729 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Resolves #864

Problem

tauri build fails on Windows when producing the MSI target. The app compiles fine and helmor.exe is produced, but WiX's light.exe aborts during MSI bundling. Tauri swallows light.exe's stderr, so the surface error is only:

failed to bundle project `failed to run …\WixTools314\light.exe`

Running with -v reveals the real cause — ICE30:

main.wxs(146) : error LGHT0204 : ICE30: The target file 'helmor-cli.exe' is
installed in '[ProgramFiles64Folder]\Helmor\' by two different components on an
LFN system: 'helmor_cli.exe' and 'helmor_cli'. This breaks component reference
counting.

Root cause

helmor-cli.exe was packaged into the bundle through two independent mechanisms, both landing at the same install path:

  1. externalBin in tauri.conf.json (./target/bundled/helmor-cli) — emitted as component helmor_cli.exe.
  2. Tauri auto-bundling the crate's [[bin]] (helmor-cli in Cargo.toml) — emitted as component helmor_cli.

On macOS the .app bundle tolerates the duplicate, which is why this went unnoticed (the project is macOS-first). On Windows, WiX's ICE30 validation rejects two components installing the same file to the same location.

Fix

Remove the ./target/bundled/helmor-cli entry from externalBin. Tauri's [[bin]] copy alone provides helmor-cli.exe next to the main executable, which is exactly what the runtime lookup expects:

  • Release: agent_invocation_path() returns the bare helmor name resolved via the installed PATH entry.
  • Dev: it resolves helmor-cli.exe sitting next to the running executable (current_exe().parent()), which stage-dev-cli.mjs still builds into target/debug/.

So the dev flow is unaffected, and the MSI now contains a single helmor_cli component.

Verification (Windows, x86_64-pc-windows-msvc)

  • tauri build -b msi completes with ICE30 gone; MSI generated at bundle/msi/Helmor_0.40.0_x64_en-US.msi.
  • ✅ Generated main.wxs contains a single helmor_cli component; sidecar externalBin references intact.
  • ✅ Dev CLI resolution path unchanged.

Follow-up (out of scope)

The removed externalBin entry still has supporting plumbing (the build.rs placeholder, CLI staging in prepare-sidecar.mjs / stage-dev-cli.mjs, and resolveBundleArtifacts/its tests). These are now redundant but harmless. Cleaning them up touches the macOS-primary build path and is best done as a separate, reviewable change.

Environment

  • Tauri CLI 2.11.2, WiX 3.14.1 (WixTools314), target x86_64-pc-windows-msvc

…nalBin

helmor-cli.exe was packaged into the MSI twice — once via the externalBin
entry (./target/bundled/helmor-cli) and once via Tauri auto-bundling the
crate's [[bin]] — both landing at the same install path. WiX's light.exe
rejected this with ICE30 (two components installing the same file). The
.app bundle on macOS tolerates the duplicate, so it went unnoticed.

Drop the externalBin CLI entry; Tauri's [[bin]] copy alone satisfies the
runtime lookup in agent_invocation_path(). Verified: MSI bundles cleanly
(ICE30 gone), wxs has a single helmor_cli component, dev flow unaffected.
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

@passion729 is attempting to deploy a commit to the Caspian's Team Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 17, 2026
natllian and others added 2 commits June 21, 2026 11:10
The fix removed ./target/bundled/helmor-cli from externalBin, but
build-platform.test.js still pinned the 2-entry array, breaking
test:frontend. Align the assertion with the single sidecar entry.
@natllian natllian merged commit 62739e6 into dohooo:main Jun 21, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows MSI bundle fails with ICE30: helmor-cli.exe is packaged twice

2 participants