Skip to content

fix(windows-ci): WiX 工具按 WixTools* 通配查找,避免 Tauri 升级后路径失效#405

Merged
H-Chris233 merged 1 commit into
Open-Less:betafrom
weikeyi:fix/issue-298-wix-glob
May 11, 2026
Merged

fix(windows-ci): WiX 工具按 WixTools* 通配查找,避免 Tauri 升级后路径失效#405
H-Chris233 merged 1 commit into
Open-Less:betafrom
weikeyi:fix/issue-298-wix-glob

Conversation

@weikeyi
Copy link
Copy Markdown
Contributor

@weikeyi weikeyi commented May 11, 2026

User description

Windows MSI Repair 之前硬编码 C:\Users\22933\AppData\Local\tauri\WixTools314\light.exe,Tauri 升级到新 WiX 版本(如 WixTools315)后路径不存在,Repair 步骤直接挂。

改为 WixTools* glob,按数字后缀降序回退到名称降序,取最新可用版本。同步更新 windows-package-msvc.ps1::Find-WixTool 和 release-tauri.yml 的 Repair 步骤;保留 -sice:ICE80、NSIS/MSI 两轮 build、bash shell 等 Windows CI 红线不变。

补 4 条 windows-package-msvc.test.mjs 防回归断言:禁止 WixTools314 出现在脚本/workflow,要求两边都按 WixTools* glob 查找。

Refs: #298


PR Type

Bug fix, Tests


Description

  • Discover latest WixTools* automatically

  • Repair workflow locates light.exe by glob

  • Tests block WixTools314 regressions

  • Keep MSI repair compatible across Tauri upgrades


Diagram Walkthrough

flowchart LR
  A["%LOCALAPPDATA%\\tauri\\WixTools*"] --> B["Find-WixTool"]
  A --> C["release-tauri.yml MSI repair step"]
  B --> D["light.exe resolved dynamically"]
  C --> D
  D --> E["MSI repair survives Tauri WiX upgrades"]
  F["windows-package-msvc.test.mjs"] --> G["Regression checks"]
  G --> B
  G --> C
Loading

File Walkthrough

Relevant files
Bug fix
windows-package-msvc.ps1
Discover latest Tauri WiX tools                                                   

openless-all/app/scripts/windows-package-msvc.ps1

  • Searches LOCALAPPDATA\tauri\WixTools* directories instead of
    WixTools314
  • Sorts candidates by numeric suffix, then by name
  • Falls back to a system-installed light.exe when needed
  • Improves the error message for missing Tauri WiX tools
+11/-4   
Configuration changes
release-tauri.yml
Resolve WiX tools in workflow                                                       

.github/workflows/release-tauri.yml

  • Finds light.exe from the newest WixTools* directory
  • Removes the hardcoded WixTools314 dependency
  • Emits a clearer error when no WiX tools exist
+4/-2     
Tests
windows-package-msvc.test.mjs
Update WiX discovery regression tests                                       

openless-all/app/scripts/windows-package-msvc.test.mjs

  • Adds assertions that WixTools314 never appears
  • Verifies glob-based WiX discovery in script and workflow
  • Updates NSIS hook expectations to match the new helpers
  • Keeps coverage aligned with the packaging changes
+8/-5     

Windows MSI Repair 之前硬编码 `C:\Users\22933\AppData\Local\tauri\WixTools314\light.exe`,Tauri 升级到新 WiX 版本(如 WixTools315)后路径不存在,Repair 步骤直接挂。

改为 WixTools* glob,按数字后缀降序回退到名称降序,取最新可用版本。同步更新 windows-package-msvc.ps1::Find-WixTool 和 release-tauri.yml 的 Repair 步骤;保留 -sice:ICE80、NSIS/MSI 两轮 build、bash shell 等 Windows CI 红线不变。

补 4 条 windows-package-msvc.test.mjs 防回归断言:禁止 WixTools314 出现在脚本/workflow,要求两边都按 WixTools* glob 查找。

Refs: Open-Less#298
@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

298 - Partially compliant

Compliant requirements:

  • Dynamic WixTools* lookup added in the PowerShell helper.
  • Release workflow now resolves light.exe from WixTools* instead of a fixed versioned path.
  • Regression tests added to block WixTools314 hard-coding.

Non-compliant requirements:

  • None identified from the diff.

Requires further human verification:

  • Confirm the updated MSI repair step works on a real Windows runner with the Tauri-installed WiX toolchain.
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@H-Chris233 H-Chris233 merged commit e3a6c44 into Open-Less:beta May 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants