Skip to content

fix(release): preserve Windows installer layout#88

Closed
isacgalvao wants to merge 1 commit into
Helvesec:mainfrom
isacgalvao:fix/windows-installer-layout
Closed

fix(release): preserve Windows installer layout#88
isacgalvao wants to merge 1 commit into
Helvesec:mainfrom
isacgalvao:fix/windows-installer-layout

Conversation

@isacgalvao

Copy link
Copy Markdown
Contributor

Fixes #86.

Supersedes #87 after renaming the head branch to match the project branch naming pattern.

Summary

The documented Windows install path currently downloads the v0.8.0 zip but installs only the public rmux.exe tiny dispatcher into %LOCALAPPDATA%\rmux\bin. A clean install or upgrade from the old layout can then fail immediately with:

private rmux helper not found under libexec/rmux; rebuild or reinstall rmux

The release archive already contains the required Windows package layout: rmux.exe, libexec/rmux/rmux.exe, rmux-daemon.exe, and share/.... This PR makes that layout installable and testable from the repository.

Fix

  • Add a versioned scripts/install-windows.ps1 that downloads the Windows zip, verifies the release checksum, and installs the full package layout.
  • Install private targets first, then the public tiny dispatcher, so upgrades never expose a dispatcher that cannot reach its matching helper.
  • Package the script into Windows archives as install.ps1.
  • Extend scripts/verify-package-windows.ps1 to require install.ps1 and run it into a temporary prefix, catching missing libexec helper regressions.

Testing

  • cargo fmt --all -- --check
  • cargo build --workspace
  • scripts/install-windows.ps1 -InstallDir , then /bin/rmux.exe -V and list-commands
  • Repacked the v0.8.0 Windows zip with this install.ps1 and ran scripts/verify-package-windows.ps1 -Checksums -RunBinary

I also ran:

  • cargo test --workspace --all-targets
  • cargo test -p rmux --test acceptance_cli_matrix -- --test-threads=1

Both hit the existing Windows failure cannot find window: 0 in cli_acceptance_matrix_exercises_real_daemon_state; the same isolated test fails on unmodified upstream/main (3b254fe).

I also ran cargo clippy --workspace --all-targets -- -D warnings; it currently fails on unmodified code with the new stable toolchain lint clippy::byte-char-slices at crates/rmux-server/src/pane_io/types.rs:1117.

Platform tested

  • Windows 11
  • PowerShell 7

Add a versioned Windows installer that installs the full package layout instead of copying only the public tiny dispatcher. Package it as install.ps1 in Windows archives and make the Windows package verifier run the installer into a temporary prefix so missing libexec helpers are caught.

Fixes Helvesec#86.

Signed-off-by: isac <58748901+isacgalvao@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 9, 2026 15:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the Windows installation path so the full packaged layout (tiny dispatcher + private helper under libexec/ + daemon + shared assets) is installed and verified, preventing “private rmux helper not found” failures on clean installs/upgrades.

Changes:

  • Add a versioned scripts/install-windows.ps1 that installs the full Windows package layout (and verifies the installed binary can reach its helper).
  • Package the installer into Windows archives as install.ps1.
  • Extend scripts/verify-package-windows.ps1 to require install.ps1 and run it into a temporary prefix during -RunBinary verification.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
scripts/verify-package-windows.ps1 Requires install.ps1 in the zip and executes it during -RunBinary verification to catch missing-layout regressions.
scripts/package-windows.ps1 Adds install.ps1 into the staged Windows zip output.
scripts/install-windows.ps1 New installer that preserves the complete Windows package layout and performs a post-install self-check.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +216 to +219
& $InstallScript -InstallDir $installBin
if (-not $?) {
Fail "archive install.ps1 failed"
}
shideneyu added a commit that referenced this pull request Jul 12, 2026
…plies

install-windows.ps1 (PR #88 follow-up): force TLS 1.2 so Windows
PowerShell 5.1 can reach GitHub releases, and make Fail throw instead
of exit under irm|iex so a failed install no longer closes the user's
interactive shell. verify-package-windows.ps1: check the installer's
exit code instead of $? so a failing install.ps1 cannot pass the
package gate. Ledger C-D50 (PR #89): record that answering OSC
10/11/12 colour queries from the emulator is an RMUX extension —
probed tmux 3.7b leaves them unanswered in detached sessions.
shideneyu added a commit that referenced this pull request Jul 12, 2026
…n is used

The contributed Windows installer (PR #88) copied rmux-daemon.exe into the
parent of the bin/ install dir, but the hidden-daemon resolver
(rmux-client auto_start) only looks for it as a sibling of the running
rmux.exe -- matching the Unix installer's bin/rmux-daemon placement. As
shipped, every server therefore ignored the packaged daemon and fell back
to re-exec'ing the tiny bin\rmux.exe with --__internal-daemon, which blocks
on libexec\rmux\rmux.exe for the server's whole lifetime: the daemon was
dead weight and each live server leaked a blocked rmux.exe shim (confirmed
by execution: rmux-daemon.exe count 0 -> 1 and stray rmux.exe count 1 -> 0
once placed as a sibling).

- install-windows.ps1: copy rmux-daemon.exe into the bin/ install dir
  (next to rmux.exe) instead of the parent install root.
- install-windows.ps1: reset $LASTEXITCODE to 0 after a successful download
  install so a caller that trusts the exit code (verify-package-windows.ps1)
  does not misread the `rmux --help` verification probe's usage exit as a
  failure; done without `exit`, which under irm|iex would close the shell.
- verify-package-windows.ps1: AssertArchiveInstaller now checks
  bin\rmux-daemon.exe, next to the installed rmux.exe where the resolver
  looks, instead of the install root where it was calibrated to the
  installer's own wrong placement.
@shideneyu

Copy link
Copy Markdown
Contributor

Thanks @isacgalvao — this work was integrated in adapted form as e802d0b, with your authorship preserved, then further hardened in 7069f01. It shipped in RMUX v0.9.0 :)

@shideneyu shideneyu closed this Jul 18, 2026
@isacgalvao
isacgalvao deleted the fix/windows-installer-layout branch July 18, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows install.ps1 omits libexec helper for v0.8.0 tiny CLI layout

3 participants