Skip to content

[v3] Fix Windows package task failure#4668

Merged
leaanthony merged 2 commits into
wailsapp:v3-alphafrom
TwoNull:v3-alpha-bugfix/4667-package-fail
Nov 1, 2025
Merged

[v3] Fix Windows package task failure#4668
leaanthony merged 2 commits into
wailsapp:v3-alphafrom
TwoNull:v3-alpha-bugfix/4667-package-fail

Conversation

@TwoNull

@TwoNull TwoNull commented Oct 26, 2025

Copy link
Copy Markdown
Contributor

Description

Fixes package and create:nsis:installer tasks within the default windows/Taskfile.yml, which both fail when run on Windows host machines.

Fixes #4667

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I initialized a new project with this branch's changes. NSIS packaging succeeds on both macOS 12.6 and Windows 10 dev environments. This change should not impact MSIX packages.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

Test Configuration

 Wails (v3.0.0-dev)  Wails Doctor 

# System 

┌─────────────────────────────────────────┐
| Name              | Windows 10 Pro      |
| Version           | 2009 (Build: 19045) |
| ID                | 22H2                |
| Branding          | Windows 10 Pro      |
| Platform          | windows             |
| Architecture      | amd64               |
| Go WebView2Loader | true                |
| WebView2 Version  | 141.0.3537.99       |
| CPU               | Unknown             |
| GPU               | Unknown             |
| Memory            | Unknown             |
└─────────────────────────────────────────┘

# Build Environment 

┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
| Wails CLI      | v3.0.0-dev                                                                         |
| Go Version     | go1.25.1                                                                           |
| Revision       | c8a400ec5649ff3c90b130b8a9d958f4e972b5aa                                           |
| Modified       | false                                                                              |
| -buildmode     | exe                                                                                |
| -compiler      | gc                                                                                 |
| CGO_ENABLED    | 0                                                                                  |
| DefaultGODEBUG | containermaxprocs=0,decoratemappings=0,tlssha1=1,updatemaxprocs=0,x509sha256skid=0 |
| GOAMD64        | v1                                                                                 |
| GOARCH         | amd64                                                                              |
| GOOS           | windows                                                                            |
| vcs            | git                                                                                |
| vcs.modified   | false                                                                              |
| vcs.revision   | c8a400ec5649ff3c90b130b8a9d958f4e972b5aa                                           |
| vcs.time       | 2025-10-26T03:19:52Z                                                               |
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies 

┌────────────────────────────────────────────┐
| npm                        | 11.6.0        |
| NSIS                       | v3.11         |
| MakeAppx.exe (Windows SDK) | Not Installed |
| MSIX Packaging Tool        | Not Installed |
| SignTool.exe (Windows SDK) | Not Installed |
|                                            |
└───────── * - Optional Dependency ──────────┘

# Checking for issues 

 SUCCESS  No issues found

# Diagnosis 

 SUCCESS  Your system is ready for Wails development!

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Bug Fixes

  • Chores

    • Improved Windows build process with enhanced cross-platform compatibility for installer generation via simplified task configuration and OS-aware path handling.

@coderabbitai

coderabbitai Bot commented Oct 26, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Replaced a shell-based conditional with Taskfile templating in the Windows package task and added an OS-aware path-separator conditional to the NSIS installer task; updated Unreleased changelog entry to record the fix.

Changes

Cohort / File(s) Summary
Windows Taskfile updates
v3/internal/commands/build_assets/windows/Taskfile.yml
package task: replaced shell if/else with a single templated task line (`{{if eq (.FORMAT
Changelog
v3/UNRELEASED_CHANGELOG.md
Replaced placeholder comment with concrete entry: "Fix Windows package task failure (#4667)".

Sequence Diagram(s)

sequenceDiagram
  participant CLI as wails3 CLI
  participant Taskfile as Taskfile (package)
  participant Task as Task Runner
  participant NSIS as makensis

  CLI->>Taskfile: run `package`
  Taskfile->>Task: evaluate templated conditional
  alt FORMAT == "msix"
    Task->>Task: invoke `create:msix:package`
  else FORMAT == "nsis"
    Task->>Task: invoke `create:nsis:installer`
    Task->>Task: evaluate OS conditional for path separators
    Task->>NSIS: makensis -DARG_WAILS_..._BINARY="<path with \\ or />" project.nsi
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check Taskfile templating syntax and quoting are valid for Taskfile runner.
  • Verify OS detection token (OS) matches Taskfile runtime environment.
  • Confirm escaping of backslashes in Windows path is correct for the templating layer and makensis.

Possibly related PRs

  • Taskfile Refactor #3748 — Touches Windows Taskfile changes and previously refactored platform-specific packaging tasks; likely related to packaging templating and path handling.

Suggested labels

Bug, Windows, size:M

Suggested reviewers

  • leaanthony

Poem

🐰 Hopped through Taskfiles with nimble cheer,
Swapped shell for template, made choices clear,
Backslashes for Windows, slashes for the rest,
NSIS now finds the binary — packaging's blessed! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title "[v3] Fix Windows package task failure" clearly and concisely summarizes the primary change in this pull request. It directly indicates that the PR addresses a Windows package task failure, which aligns with the main objective of fixing the package and create:nsis:installer tasks that fail on Windows hosts. The title is specific enough to convey meaningful information without being overly broad or generic, making it easy for teammates to understand the purpose of the change when scanning the commit history.
Linked Issues Check ✅ Passed The code changes directly address both primary objectives from issue #4667. The package task has been updated to replace the failing shell-based conditional with a Taskfile template conditional that correctly selects between create:msix:package and create:nsis:installer (#4667). The create:nsis:installer task has been modified to use OS-aware path separators, providing backslashes on Windows and forward slashes on non-Windows systems when invoking makensis (#4667). The PR description confirms that NSIS packaging succeeds on both macOS and Windows, validating that both failures mentioned in the issue have been resolved. A corresponding changelog entry has also been added to document the fix.
Out of Scope Changes Check ✅ Passed All code changes in this pull request are directly scoped to fixing the issues described in #4667. The modifications to the package and create:nsis:installer tasks in the Taskfile address the exact problems reported—the shell conditional failure and path separator incompatibility on Windows. The addition of a changelog entry in v3/UNRELEASED_CHANGELOG.md is also in scope, as it is required by the repository's PR template checklist and documents the fix. No extraneous or unrelated modifications are present in the changeset.
Description Check ✅ Passed The pull request description follows the provided template comprehensively. It includes a clear summary of the changes ("Fixes package and create:nsis:installer tasks"), properly references the linked issue ("Fixes #4667"), identifies the type of change as a bug fix, provides testing details on both Windows and macOS platforms, includes detailed test configuration output from wails doctor, and completes all checklist items including changelog updates and code review confirmations. The description demonstrates that testing was performed on relevant platforms and that the fix successfully resolves the reported issues.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c8a400e and 90bce62.

📒 Files selected for processing (1)
  • v3/UNRELEASED_CHANGELOG.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Run Go Tests v3 (ubuntu-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (windows-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (macos-latest, 1.24)
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (1)
v3/UNRELEASED_CHANGELOG.md (1)

25-25: Changelog entry correctly added and follows conventions.

The entry is placed in the appropriate "Fixed" section, uses present-tense imperative form, includes the issue reference, and follows the "Keep a Changelog" format specified in the file's guidelines.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@leaanthony

Copy link
Copy Markdown
Member

Thanks 🙏 Please could you add an entry to the changelog located at v3/UNRELEASED_CHANGELOG.md? Thanks!

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Oct 26, 2025
@TwoNull

TwoNull commented Oct 26, 2025

Copy link
Copy Markdown
Contributor Author

No problem, just updated it.

@sonarqubecloud

Copy link
Copy Markdown

@leaanthony leaanthony merged commit 11751be into wailsapp:v3-alpha Nov 1, 2025
60 checks passed
Grantmartin2002 pushed a commit to Grantmartin2002/wails that referenced this pull request Apr 29, 2026
* Fix package task incompatibility

* Update UNRELEASED_CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Documentation Improvements or additions to documentation v3-alpha

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants