From 1df18e86efb58ccd1e867d2af622a2db0cf64924 Mon Sep 17 00:00:00 2001 From: NitroDiesel <228459919+NitroDiesel@users.noreply.github.com> Date: Wed, 11 Nov 2026 22:37:45 +0800 Subject: [PATCH] Ship the Windows portable build as a single executable Publish rufust--windows-x86_64.exe instead of a zip, as upstream Rufus does: the executable needs nothing beside it. The installer still installs the README, license, and third-party notices. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 28 +++++++++++++--------------- README.md | 8 ++++---- docs/BUILDING.md | 12 ++++++------ docs/CAPABILITIES.md | 6 +++--- docs/PROJECT_CONTEXT.md | 5 +++-- docs/WINDOWS.md | 10 +++++----- packaging/windows/README.txt | 3 ++- 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9ed0e56..949b95e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -296,31 +296,30 @@ jobs: if-no-files-found: error windows: - name: Windows installer and portable build + name: Windows installer and portable executable runs-on: windows-2022 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - uses: dtolnay/rust-toolchain@bc540ba06a4ccee415bb241490e0b25ee8e7d315 - name: Build run: cargo build -p rufust --release --locked - - name: Package and validate + - name: Package and validate the portable executable shell: pwsh run: | - $name = "rufust-$env:PACKAGE_VERSION-windows-x86_64" - New-Item -ItemType Directory -Path dist, $name | Out-Null - Copy-Item target\release\rufust.exe $name - Copy-Item packaging\windows\README.txt, LICENSE.txt, THIRD_PARTY.md $name - $version = & "$name\rufust.exe" --version | Out-String + # The portable download is the bare executable, as upstream Rufus ships. + $portable = "dist\rufust-$env:PACKAGE_VERSION-windows-x86_64.exe" + New-Item -ItemType Directory -Path dist | Out-Null + Copy-Item target\release\rufust.exe $portable + $version = & $portable --version | Out-String if ($version.Trim() -ne "rufust $env:PACKAGE_VERSION") { throw "unexpected version: $version" } # x86-64 PE with an asInvoker manifest: the window never elevates. - $bytes = [IO.File]::ReadAllBytes((Resolve-Path "$name\rufust.exe").Path) + $bytes = [IO.File]::ReadAllBytes((Resolve-Path $portable).Path) $pe = [BitConverter]::ToInt32($bytes, 0x3c) if ([BitConverter]::ToUInt16($bytes, $pe + 4) -ne 0x8664) { throw 'not x86-64' } $text = [Text.Encoding]::ASCII.GetString($bytes) if (-not $text.Contains('level="asInvoker"')) { throw 'missing asInvoker manifest' } - Compress-Archive -Path $name -DestinationPath "dist\$name.zip" - name: Build installer shell: pwsh run: | @@ -370,9 +369,7 @@ jobs: - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: name: installer-windows - path: | - dist/*.zip - dist/*-setup.exe + path: dist/*.exe if-no-files-found: error publish: @@ -430,9 +427,10 @@ jobs: - Fedora: `sudo dnf install ./rufust-*.x86_64.rpm` - Arch Linux: `sudo pacman -U ./rufust-*-x86_64.pkg.tar.zst` - Portable desktop: `chmod +x ./rufust-*.AppImage && ./rufust-*.AppImage` - - Windows 10/11 (x64): run `rufust-*-windows-x86_64-setup.exe`, or - extract the portable `rufust-*-windows-x86_64.zip` and run - `rufust.exe`; Windows asks for administrator approval at Start. + - Windows 10/11 (x64): run the installer + `rufust-*-windows-x86_64-setup.exe`, or run the portable + `rufust-*-windows-x86_64.exe` directly; Windows asks for + administrator approval at Start. The AppImage runs on x86_64 glibc 2.28+ desktops. If FUSE is not available, add `--appimage-extract-and-run`. For security, the diff --git a/README.md b/README.md index 30705a9..7fd5164 100644 --- a/README.md +++ b/README.md @@ -85,8 +85,8 @@ For the full formatter and image-tool set, install the runtime dependencies list ## Install a release -Download the package for your x86_64 distribution, or the Windows zip, from -[GitHub Releases](https://github.com/NitroDiesel/rufust/releases). +Download the package for your x86_64 distribution, or the Windows installer or +portable executable, from [GitHub Releases](https://github.com/NitroDiesel/rufust/releases). Keep `SHA256SUMS` beside the downloaded package and verify it before installing: ```sh @@ -130,8 +130,8 @@ For Windows 10/11 (x64), pick one download and check it against `SHA256SUMS`: - **Installer:** `rufust-*-windows-x86_64-setup.exe` installs Rufust in Program Files with a Start menu entry and an uninstaller (Settings → Apps). -- **Portable:** extract `rufust-*-windows-x86_64.zip` and run `rufust.exe`. - Nothing is installed. +- **Portable:** run `rufust-*-windows-x86_64.exe` directly from anywhere, such + as a USB stick. Nothing is installed. ```powershell Get-FileHash .\rufust-*-windows-x86_64* -Algorithm SHA256 diff --git a/docs/BUILDING.md b/docs/BUILDING.md index a4ba4a2..35baa9e 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -89,7 +89,7 @@ The `packaging/` directory contains integration metadata and starter recipes: - `tmpfiles/` — volatile root-owned runtime directory; - `debian/`, `rpm/`, `arch/` — distribution recipes; - `appimage/` — AppImage staging, verification, launcher, and security notes; -- `windows/` — the README shipped in the Windows zip. +- `windows/` — the Inno Setup installer script and the README it installs. Recipes intentionally do not download proprietary boot or Windows assets. Release builders must be reproducible, use Cargo's locked dependencies, generate a software bill of materials, and preserve license texts. @@ -158,11 +158,11 @@ From an elevated PowerShell, `scripts\windows\vhd-tests.ps1` runs the end-to-end tests on throwaway VHDX disks (see [Windows](WINDOWS.md)). CI runs the same steps on `windows-2022`. -The release workflow's Windows job packages -`rufust--windows-x86_64.zip` with `rufust.exe`, -`packaging/windows/README.txt`, `LICENSE.txt`, and `THIRD_PARTY.md`. It checks -the reported version, the x86-64 PE machine, and the embedded `asInvoker` -manifest before the zip joins `SHA256SUMS` and the build provenance. Do not +The release workflow's Windows job publishes the bare executable as the +portable `rufust--windows-x86_64.exe`, as upstream Rufus does. It +checks the reported version, the x86-64 PE machine, and the embedded +`asInvoker` manifest before the executable joins `SHA256SUMS` and the build +provenance. Do not ship a manifest that requests elevation: the window must stay unprivileged. The same job compiles `packaging/windows/rufust.iss` with Inno Setup 6 into diff --git a/docs/CAPABILITIES.md b/docs/CAPABILITIES.md index 2a21fdd..4d2fdab 100644 --- a/docs/CAPABILITIES.md +++ b/docs/CAPABILITIES.md @@ -64,7 +64,7 @@ applies. | Bad-block test, verification, cancellation | Built into the engine | Cancellation is a `cancel` line on the control pipe or the window closing it. | | Light and dark presentation | Same Slint workbench | Follows the Windows app mode; `%APPDATA%\Rufust\settings.conf`. | | Installer | `rufust--windows-x86_64-setup.exe` (Inno Setup) | Per-machine install into Program Files with a Start menu entry and uninstaller; not code-signed yet. | -| Portable desktop | `rufust--windows-x86_64.zip` | One executable with an `asInvoker` manifest; not code-signed yet. | +| Portable desktop | `rufust--windows-x86_64.exe` | The executable itself, nothing to extract, with an `asInvoker` manifest; not code-signed yet. | Blocked only on Windows: ext2/3/4 creation (no Windows formatter) and ReFS creation (only Pro for Workstations, Enterprise, and Server editions allow it, @@ -79,8 +79,8 @@ UAC approval. Elevated tests on throwaway VHDX disks format with every provider and scheme, write raw, gzip, and VHDX images with read-back verification, build Windows installer media, run large FAT32, and cancel through the worker pipes. Releases include a Windows installer -(`rufust--windows-x86_64-setup.exe`) and a portable zip. Linux -behavior is unchanged. +(`rufust--windows-x86_64-setup.exe`) and a portable executable +(`rufust--windows-x86_64.exe`). Linux behavior is unchanged. ## Changes in 1.1.0 diff --git a/docs/PROJECT_CONTEXT.md b/docs/PROJECT_CONTEXT.md index fe579c9..f9f1e65 100644 --- a/docs/PROJECT_CONTEXT.md +++ b/docs/PROJECT_CONTEXT.md @@ -109,7 +109,7 @@ capacity preview pass under a non-administrator token; and the release build renders the workbench in the fixed 560x720 window. CI runs these on `windows-2022`, and the release workflow adds `rufust--windows-x86_64-setup.exe` (Inno Setup, verified by a silent -install and uninstall) and the portable `rufust--windows-x86_64.zip`. +install and uninstall) and the portable `rufust--windows-x86_64.exe`. The v1.2.0 release is the first to include them. ## Architecture map @@ -390,7 +390,8 @@ xmllint --noout packaging/polkit/io.github.nitrodiesel.rufust.policy ``` The release workflow must produce one Debian package, RPM, Arch package, -AppImage, AppImage zsync file, Windows zip, and `SHA256SUMS`. The AppImage verifier must prove +AppImage, AppImage zsync file, Windows installer, Windows portable executable, +and `SHA256SUMS`. The AppImage verifier must prove its architecture, glibc 2.28 ceiling, dependency closure, lack of RPATH, update information, metadata, executable permissions, unprivileged contents, direct version launch, extraction fallback, Xvfb GUI startup, and loader compatibility diff --git a/docs/WINDOWS.md b/docs/WINDOWS.md index 117955d..5bab3ff 100644 --- a/docs/WINDOWS.md +++ b/docs/WINDOWS.md @@ -132,13 +132,13 @@ cancellation. CI runs them on every push. ## Packaging -The release workflow builds two downloads with the same four files: -`rufust.exe`, `README.txt` (from `packaging/windows/`), `LICENSE.txt`, and -`THIRD_PARTY.md`. +The release workflow builds two downloads: -- `rufust--windows-x86_64.zip`: portable, nothing installed. +- `rufust--windows-x86_64.exe`: the portable executable itself, + nothing installed, like upstream Rufus. - `rufust--windows-x86_64-setup.exe`: an Inno Setup installer - (`packaging/windows/rufust.iss`). It installs per machine into Program Files + (`packaging/windows/rufust.iss`). It installs `rufust.exe`, `README.txt` + (from `packaging/windows/`), `LICENSE.txt`, and `THIRD_PARTY.md` per machine into Program Files with a Start menu entry, an optional desktop icon, and an uninstaller. Because only administrators can write to Program Files, a standard user cannot replace the executable that the elevated worker runs. Setup itself diff --git a/packaging/windows/README.txt b/packaging/windows/README.txt index 237c103..601712c 100644 --- a/packaging/windows/README.txt +++ b/packaging/windows/README.txt @@ -7,7 +7,8 @@ project or its maintainers. Windows 10 or 11 (x64) is required. The installer puts rufust.exe in Program Files with a Start menu entry; remove it from Settings > Apps. The -portable zip installs nothing: extract it and run rufust.exe. +portable rufust--windows-x86_64.exe installs nothing: run it +directly. The window runs with your normal rights. When you press Start and confirm, Windows asks once for administrator approval for that operation only; the