feat: Windows installer + icon mode (#229, #230) - #232
Merged
Conversation
When 'scope serial' / 'scope rtt' is launched without its positional arguments (e.g. from a Windows Start-Menu shortcut), show an interactive ratatui picker before starting: choose a serial port + baud rate (a list from usb_ports), or an RTT target + channel. It runs on the main thread, owns its own crossterm session, and always restores the terminal on exit. resolve_serial/resolve_rtt gate it on both a missing argument and an interactive terminal, so piped/scripted runs keep the historical start-disconnected behaviour (also reachable via the picker's Skip). Co-Authored-By: Claude Opus 4.8 <[email protected]>
…#230) Switch distribution to cargo-dist (dist-workspace.toml): a tag-triggered release.yml builds tarballs/zip, shell/powershell installers and a Windows .msi; libudev-dev is installed on the Linux runner via apt deps. Publishing to crates.io is kept in a companion publish-crates.yml on the same tag (dist does not publish to crates.io), and version-guard's comment is updated to the new tag-based flow. The MSI's main.wxs is hand-edited (allow-dirty = ["msi"]) to add four per-command Start-Menu shortcuts (serial, --headless serial, rtt, --headless rtt), each with its own icon. Icons live in installer/icons/ and are produced by the standalone installer/gen-icons/ helper (kept out of the scope build) from the logo + Font Awesome glyphs; build.rs embeds scope.ico into scope.exe on Windows via winresource. Co-Authored-By: Claude Opus 4.8 <[email protected]>
README gains install instructions for the Windows installer and the shell/powershell scripts, plus an 'Icon mode' section. CONTRIBUTING and CLAUDE.md describe the new maintainer release flow (bump version, push a vX.Y.Z tag -> cargo-dist + crates.io) and the icon-mode/selector internals. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Releasing is now maintainer-only, enforced in depth so no PR or non-owner
collaborator can cut one:
- publish-crates.yml is guarded with 'if: github.actor ==
github.repository_owner', deploys through the reviewer-gated 'crates'
environment, and refuses to publish when the tag != Cargo.toml version.
- tests/release_security.rs parses the workflows and fails CI if the security
invariants regress (no pull_request_target; publish-crates fires on version
tags only, owner-guarded, env-gated; release.yml never publishes on a PR;
version-guard runs on PRs). Verified the tests detect regressions.
- .github/CODEOWNERS makes the release-critical paths owner-owned; paired with
the main ruleset's code-owner-review requirement.
Repo-settings pieces applied out-of-tree: a tag-protection ruleset (tag
creation is admin-only) and the 'crates' environment's required reviewer.
Documented in CONTRIBUTING.md ('Release security') and CLAUDE.md.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
`dist-workspace.toml` gains `pr-run-mode = "upload"`, so every pull request now builds the same archives and installers a version tag would and attaches them to the Actions run. This is how the Windows `.msi` (and its Start-Menu shortcuts/icons, #230) gets tested on a real Windows machine before a release is cut — until now the only way to produce one was to push a tag. Publishing is unaffected: `release.yml` still gates every publish step on `publishing: !github.event.pull_request`, and `publish-crates.yml` triggers on tags only, so a PR uploads artifacts without creating a release or touching crates.io. `tests/release_security.rs` stays green. `release.yml` is regenerated with `dist generate` (dist 0.32.0, the pinned version); the only change it produces is the rust-cache step dist adds in upload mode. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The `scope serial` Start-Menu icon carried Font Awesome's `plug` glyph, which reads as a power plug rather than a data link. Swap it for `ethernet` (same Font Awesome Free 6.7.2 set, CC BY 4.0), which reads as a connector at a glance and pairs better with the RTT variant's microchip. `plug.svg` is dropped since nothing references it any more. Only `scope-serial.ico` changes when the generator re-runs — the other four icons come out byte-identical. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`pr-run-mode = "upload"` was a temporary measure to get a Windows `.msi` out of the PR's CI run so the installer, the Start-Menu shortcuts and their icons could be tested on a real Windows machine (#229, #230). That test passed, so drop it again — otherwise every pull request pays for a full three-platform release build. `dist-workspace.toml` and the dist-generated `release.yml` are back to their pre-test state, byte for byte. What stays is the write-up of the procedure in CONTRIBUTING.md ("Testing the installers before a release"), so the next person who needs an `.msi` can flip the flag on and off deliberately. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Windows installer (#229) and an "icon mode" (#230) so non-technical users can install and use
scopewithout the terminal.Icon mode (#230): launching
serial/rttwithout the positional arguments (e.g. from a Start-Menu shortcut) opens an interactive ratatui picker before the TUI/headless bridge starts — pick a serial port + baud (or an RTT target + channel). Gated on an interactive terminal, so piped/scripted runs keep the historical start-disconnected behaviour (also reachable via the picker'ss= skip;q/Escquits). New modulesrc/selector.rs; wired throughresolve_serial/resolve_rttinmain.rs.Installer (#229): distribution moves to cargo-dist (
dist-workspace.toml). A tag-triggeredrelease.ymlbuilds tarballs/zip, shell/powershell installers and a Windows.msi; crates.io publishing is preserved in a companionpublish-crates.ymlon the same tag.Icons + shortcuts (#230): the MSI installs
scopeon thePATHand adds four Start-Menu shortcuts — scope Serial, scope Serial (headless), scope RTT, scope RTT (headless) — each with its own icon (via a hand-editedwix/main.wxs,allow-dirty = ["msi"]). Icons are generated by the standaloneinstaller/gen-icons/helper (kept out of the scope build) from the logo + Font Awesome glyphs;build.rsembedsscope.icointoscope.exeon Windows.Related issue
Closes #229
Closes #230
Type of change
How was this tested?
On macOS (Apple Silicon):
cargo fmt --all -- --check,cargo test --locked(237 unit tests),cargo build --locked --release— all pass.cargo test --test tui_e2e -- --test-threads=1— 23 pass (1 ignored). Note: this suite is flaky under the default parallel run; serial run is stable.dist planconfirms the artifact set (incl. the.msi);wix/main.wxsis XML-validated.Checklist
cargo fmt --all -- --checkpassescargo test --lockedpassescargo build --locked --releasepassesCargo.toml