2026-10-21 00:54:54 +00:00
# Windows build
## Requirements
- Windows 10/11 x64
- Visual Studio Build Tools with the Desktop development with C++ workload
- WebView2 Runtime (included with current Windows releases)
- Node.js 20+ and pnpm 8+
- Rust stable through rustup
- FFmpeg on `PATH` for screen recording and media conversion
2026-10-25 04:24:05 +00:00
- Pandoc and a Pandoc PDF engine (Typst is recommended) for document conversion
- Poppler (`pdftoppm`) on `PATH` for PDF-to-image and PDF-to-Word rendering
2026-10-21 00:54:54 +00:00
- ImageMagick (`magick`) if HEIC/AVIF export is required
2026-10-25 04:24:05 +00:00
These tools are optional at install time. Settings -> **Runtime components**
detects them on the current machine and shows their version and resolved path.
Missing Pandoc, Typst, FFmpeg, Poppler and ImageMagick components have an
**Install** button that runs WinGet without blocking the UI, then checks again
automatically. This is the same flow as the Homebrew-backed runtime installer
on macOS.
2026-10-21 00:54:54 +00:00
## Build
```powershell
pnpm install
pnpm check
pnpm build
cd src-tauri
cargo check
cd ..
pnpm tauri build
```
The installer is written below `src-tauri\target\release\bundle` .
2026-10-25 04:24:05 +00:00
## Release packages from macOS
2026-10-27 10:45:32 +00:00
`scripts/build-windows-release.sh` cross-compiles the EXE and produces the
Windows x64 installer without a Windows host:
2026-10-25 04:24:05 +00:00
```bash
brew install makensis
2026-10-27 10:45:32 +00:00
scripts/build-windows-release.sh
scripts/build-windows-release.sh --skip-build
2026-10-25 04:24:05 +00:00
```
2026-10-27 10:45:32 +00:00
It writes `artifacts/Shift-Setup-<version>-win-x64.exe` (NSIS, per-user, no
administrator rights), then refreshes `artifacts/SHA256SUMS.txt` . Before packaging
the EXE the script checks its PE machine field (`0x8664`) and the installer refuses
a non-x64 machine. `scripts/windows-installer.nsi` installs into
release: 0.1.1 — update channel, settings/UI trims, macOS + Windows x64 only
Update path
- `src-tauri/src/update.rs`: manifest fetch, semver compare, optional ed25519
signature check against a key baked in at build time, then a size + SHA256
gate before an installer can run. `UpdateStatus` now reports the artifact key
it resolved so the UI can name what it will install.
- Settings → Updates panel shows the feed, the check/download state machine, and
the local OS, architecture and release artifact for this machine.
- `scripts/publish-release.sh` + `scripts/release-key.py` publish installers and a
signed `shift-update.json` onto an orphan `releases` branch.
Scope trims requested for this release
- Settings: the Radial rings tab is gone, so ring orders are read from
`settings.json` with no in-app editor for now.
- Main window: the update entry in the header bar is gone; updates live in
Settings → Updates only.
- Release targets are macOS universal and Windows x64. ARM64 and Linux stay
buildable and are no longer published; `docs/RELEASE.md` records the decision.
Gates: cargo fmt --check clean, `cargo test --lib` 142 passed / 2 ignored,
`pnpm check` clean, `pnpm test` 34 passed, `pnpm build` ok.
2026-10-25 19:06:46 +00:00
`%LOCALAPPDATA%\Programs\Shift` , and its uninstaller only removes what the installer
2026-10-27 10:45:32 +00:00
wrote. Windows ARM64 uses this x64 package through the update manifest's `windows`
fallback; no ARM64 or portable package is produced.
2026-10-25 04:24:05 +00:00
2026-10-21 00:54:54 +00:00
## Runtime behavior
- Hold `Shift` while starting a file drag, then move past the Windows drag threshold. Shift places a transparent radial window under the pointer and receives the native OLE drop.
2026-10-25 04:24:05 +00:00
- Hold `Alt + Shift` for the tool ring.
2026-10-21 00:54:54 +00:00
- Global shortcuts use `Alt + Shift + 2` , `Alt + Shift + 3` , and `Alt + Shift + 4` .
- The first screen capture uses the same local-only processing paths as macOS; no cloud service is involved.
2026-10-25 04:24:05 +00:00
- Revealing a result uses `SHOpenFolderAndSelectItems` , so an Explorer window
already showing that folder is reused. `explorer /select,…` opens a fresh
window for every conversion and is not used.
2026-10-21 00:54:54 +00:00
## Cross-compile check from macOS
The Windows-specific Rust code can be type-checked from macOS:
```bash
rustup target add x86_64-pc-windows-msvc
2026-10-25 04:24:05 +00:00
PATH="$HOME/.rustup/toolchains/stable-aarch64-apple-darwin/bin:/opt/homebrew/opt/llvm/bin:$PATH" \
RUSTUP_TOOLCHAIN=stable-aarch64-apple-darwin \
2026-10-21 00:54:54 +00:00
cargo check --target x86_64-pc-windows-msvc
```
2026-10-25 04:24:05 +00:00
Prepending the rustup toolchain is required: a Homebrew `cargo` earlier on
`PATH` ignores `RUSTUP_TOOLCHAIN` and cannot find the Windows standard library.
This proves `cfg(windows)` code compiles. Interactive drag/drop and FFmpeg
recording still need a real Windows host for runtime QA.
2026-10-21 00:54:54 +00:00
## Cross-build a Windows EXE from macOS
```bash
cargo install cargo-xwin --locked
cd src-tauri
2026-10-25 04:24:05 +00:00
PATH="$HOME/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH" \
RUSTUP_TOOLCHAIN=stable-aarch64-apple-darwin \
cargo xwin build --target x86_64-pc-windows-msvc --release --features tauri/custom-protocol
2026-10-21 00:54:54 +00:00
```
2026-10-25 04:24:05 +00:00
`--features tauri/custom-protocol` is not optional. Tauri derives `cfg(dev)` from the
absence of that feature, and a dev binary points every window at `build.devUrl`
(`http://localhost:1420`) instead of the bundled assets, so it opens a blank window on
any machine that is not running the Vite dev server. The release script verifies that
the current `dist/assets/*` files and UI strings are embedded before it creates the
installer.
2026-10-21 00:54:54 +00:00
The executable is written to `src-tauri/target/x86_64-pc-windows-msvc/release/shift.exe` .
2026-10-25 04:24:05 +00:00
It needs the Microsoft WebView2 Runtime on the target machine. FFmpeg, Poppler and Pandoc remain optional external tools for recording, PDF rendering, PDF-to-Word and document conversion.
## Runtime components
The Windows build uses these WinGet package IDs:
| Component | Package |
| --- | --- |
| Pandoc | `JohnMacFarlane.Pandoc` |
| FFmpeg | `Gyan.FFmpeg` |
| Poppler `pdftoppm` | `oschwartz10612.Poppler` |
| ImageMagick `magick` | `ImageMagick.ImageMagick` |
| Typst PDF engine | `Typst.Typst` |
WinGet runs with:
```text
install --id < package > --exact --silent --accept-package-agreements --accept-source-agreements
```
Some packages may show a Windows UAC prompt. If WinGet is missing, the
component panel links to Microsoft's official setup guide instead of downloading
an executable from a third-party source.
Shift checks the normal `PATH` , WinGet Links and Packages directories, the
standard Pandoc/FFmpeg/ImageMagick install locations, Chocolatey and Scoop
locations. This lets tools installed while Shift is running become available
after a refresh without restarting the app.
Build the frontend for the right engine first, otherwise Vite emits Safari 13 output:
```bash
TAURI_ENV_PLATFORM=windows pnpm build
```
Interactive drag/drop, installer shortcuts and recording still need a manual pass on
a real Windows machine. The release script itself can run unattended; it does not
replace that runtime QA.