Skip to content

fix(desktop): emit per-pass NSIS RemovePathSegment variant - #131

Closed
lxrzlyr wants to merge 1 commit into
devfrom
fix/desktop-nsis-removepath-variant
Closed

lxrzlyr wants to merge 1 commit into
devfrom
fix/desktop-nsis-removepath-variant

Conversation

@lxrzlyr

@lxrzlyr lxrzlyr commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

Problem

desktop-build.yml has been failing on dev. electron-builder compiles resources/installer.nsh twice — once for the installer pass and once for the BUILD_UNINSTALLER pass — and elevates makensis warnings to errors. Each pass emitted both RemovePathSegment function variants (plain and un.) but only references its own, so the unreferenced variant failed the build with makensis warning 6010 (function not used).

Reproduced locally: byte-identical error to CI run 36264758680.

Fix

Wrap the two !insertmacro RemovePathSegment calls in !ifdef BUILD_UNINSTALLER / !else / !endif so each pass emits only the variant it references.

Verification

  • npx electron-builder --win nsis --x64 --publish never now succeeds locally (produced deepagent-code-desktop-win-x64.exe; installs and uninstalls cleanly on a real Windows 11 machine).

electron-builder compiles installer.nsh twice (installer pass and
BUILD_UNINSTALLER pass) and elevates makensis warnings to errors.
The installer pass emitted both RemovePathSegment variants but only
references the non-un. one (and vice versa), so the unreferenced
variant failed the build with warning 6010. Emit only the variant
each pass references. This is the root cause of the desktop-build.yml
failures on dev.
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@lxrzlyr
lxrzlyr deleted the fix/desktop-nsis-removepath-variant branch September 27, 2026 17:27
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