Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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-<version>-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-<version>-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
Expand Down
6 changes: 3 additions & 3 deletions docs/CAPABILITIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<version>-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-<version>-windows-x86_64.zip` | One executable with an `asInvoker` manifest; not code-signed yet. |
| Portable desktop | `rufust-<version>-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,
Expand All @@ -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-<version>-windows-x86_64-setup.exe`) and a portable zip. Linux
behavior is unchanged.
(`rufust-<version>-windows-x86_64-setup.exe`) and a portable executable
(`rufust-<version>-windows-x86_64.exe`). Linux behavior is unchanged.

## Changes in 1.1.0

Expand Down
5 changes: 3 additions & 2 deletions docs/PROJECT_CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<version>-windows-x86_64-setup.exe` (Inno Setup, verified by a silent
install and uninstall) and the portable `rufust-<version>-windows-x86_64.zip`.
install and uninstall) and the portable `rufust-<version>-windows-x86_64.exe`.
The v1.2.0 release is the first to include them.

## Architecture map
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions docs/WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<version>-windows-x86_64.zip`: portable, nothing installed.
- `rufust-<version>-windows-x86_64.exe`: the portable executable itself,
nothing installed, like upstream Rufus.
- `rufust-<version>-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
Expand Down
3 changes: 2 additions & 1 deletion packaging/windows/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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-<version>-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
Expand Down