Skip to content

Commit bfb4426

Browse files
committed
docs: clarify Windows installation and verify both install paths
1 parent 17aba82 commit bfb4426

3 files changed

Lines changed: 121 additions & 2 deletions

File tree

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Windows installation
2+
3+
on:
4+
push:
5+
branches: [main, 'codex/italian-findings-core']
6+
pull_request:
7+
paths:
8+
- 'crates/**'
9+
- 'Cargo.*'
10+
- '.cargo/**'
11+
- '.github/workflows/windows-install.yml'
12+
- 'scripts/windows-install-smoke.ps1'
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
install:
20+
runs-on: windows-latest
21+
timeout-minutes: 30
22+
env:
23+
RUSTFLAGS: '--cfg reqwest_unstable'
24+
LIBCLANG_PATH: 'C:\Program Files\LLVM\bin'
25+
steps:
26+
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
27+
with:
28+
persist-credentials: false
29+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
30+
with:
31+
targets: x86_64-pc-windows-msvc
32+
- name: Install native build prerequisite
33+
shell: pwsh
34+
run: |
35+
choco install nasm -y
36+
if ($LASTEXITCODE -ne 0) { throw 'NASM installation failed' }
37+
'C:\Program Files\NASM' | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
38+
- name: Verify build tools supplied by the hosted Windows image
39+
shell: pwsh
40+
run: |
41+
Get-Command cargo, cmake, nasm
42+
if (!(Test-Path "$env:LIBCLANG_PATH\libclang.dll")) { throw 'libclang.dll not found' }
43+
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
44+
$vs = & $vswhere -products '*' -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
45+
if (!$vs) { throw 'Visual Studio C++ build tools not found' }
46+
cmake --version
47+
rustc --version
48+
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
49+
- name: Install this exact commit and run it
50+
shell: pwsh
51+
run: |
52+
cargo install --git https://github.com/0xMassi/webclaw.git --rev "$env:GITHUB_SHA" --locked --root "$env:RUNNER_TEMP\source-install" webclaw-cli
53+
if ($LASTEXITCODE -ne 0) { throw 'Cargo installation failed' }
54+
./scripts/windows-install-smoke.ps1 -Binary "$env:RUNNER_TEMP\source-install\bin\webclaw.exe"
55+
- name: Extract the published Windows ZIP and run it
56+
shell: pwsh
57+
env:
58+
GH_TOKEN: ${{ github.token }}
59+
run: |
60+
$download = "$env:RUNNER_TEMP\release-download"
61+
New-Item -ItemType Directory -Path $download | Out-Null
62+
gh release download v0.6.22 --repo 0xMassi/webclaw --pattern '*x86_64-pc-windows-msvc.zip' --dir $download
63+
if ($LASTEXITCODE -ne 0) { throw 'Release download failed' }
64+
Expand-Archive -Path "$download\*.zip" -DestinationPath "$env:RUNNER_TEMP\release-install"
65+
$binary = Get-ChildItem "$env:RUNNER_TEMP\release-install" -Filter webclaw.exe -Recurse | Select-Object -First 1
66+
if (!$binary) { throw 'CLI missing from Windows archive' }
67+
./scripts/windows-install-smoke.ps1 -Binary $binary.FullName

‎README.md‎

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,43 @@ brew install webclaw
8585

8686
Download macOS, Linux, and Windows binaries from [GitHub Releases](https://github.com/0xMassi/webclaw/releases).
8787

88+
#### Windows (x64)
89+
90+
The prebuilt ZIP is the easiest installation and does not require Rust. On the
91+
[v0.6.22 release page](https://github.com/0xMassi/webclaw/releases/tag/v0.6.22),
92+
download `webclaw-v0.6.22-x86_64-pc-windows-msvc.zip`. Extract it in File Explorer,
93+
open PowerShell in the extracted folder containing `webclaw.exe`, and run:
94+
95+
```powershell
96+
.\webclaw.exe --version
97+
.\webclaw.exe https://example.com --format markdown
98+
```
99+
100+
PowerShell requires the `.\` prefix for programs in the current directory.
101+
Add that directory to your user PATH only if you want to run `webclaw` from
102+
other folders. If Windows reports a missing Visual C++ runtime DLL, install the
103+
Microsoft Visual C++ Redistributable for x64. The ZIP contains x64 binaries;
104+
Windows ARM64 is not covered by the native installation check.
105+
106+
To build from source on Windows, install Rust with the `x86_64-pc-windows-msvc`
107+
toolchain, Visual Studio Build Tools with **Desktop development with C++** and
108+
the Windows SDK, Git, CMake 3.22 or newer, LLVM (including `libclang.dll`), and
109+
NASM. Open a fresh Developer PowerShell for Visual Studio after installation.
110+
Ensure CMake and NASM are on PATH and set `LIBCLANG_PATH` to your LLVM `bin`
111+
directory if bindgen cannot find it, for example:
112+
113+
```powershell
114+
$env:LIBCLANG_PATH = "C:\Program Files\LLVM\bin"
115+
cargo install --git https://github.com/0xMassi/webclaw.git --tag v0.6.22 --locked webclaw-cli
116+
webclaw --version
117+
```
118+
119+
The Cargo package is `webclaw-cli`; the executable is `webclaw`. These packages
120+
are installed from Git, not crates.io. A first source build can take several
121+
minutes. The Windows CI workflow checks the Git installation and published ZIP
122+
on a hosted runner with preinstalled build tools; it does not model a clean PC.
123+
Linux containers, including Docker on macOS, do not validate Windows support.
124+
88125
### Docker
89126

90127
```bash
@@ -94,8 +131,8 @@ docker run --rm ghcr.io/0xmassi/webclaw https://example.com
94131
### Cargo
95132

96133
```bash
97-
cargo install --git https://github.com/0xMassi/webclaw.git webclaw-cli
98-
cargo install --git https://github.com/0xMassi/webclaw.git webclaw-mcp
134+
cargo install --git https://github.com/0xMassi/webclaw.git --tag v0.6.22 --locked webclaw-cli
135+
cargo install --git https://github.com/0xMassi/webclaw.git --tag v0.6.22 --locked webclaw-mcp
99136
```
100137

101138
If building from source fails because native build tools are missing, install the platform prerequisites:

‎scripts/windows-install-smoke.ps1‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
param([Parameter(Mandatory = $true)][string]$Binary)
2+
$ErrorActionPreference = 'Stop'
3+
# Verify the requested installation, regardless of other webclaw copies on PATH.
4+
Remove-Item Env:WEBCLAW_API_KEY -ErrorAction SilentlyContinue
5+
Remove-Item Env:WEBCLAW_PROXY -ErrorAction SilentlyContinue
6+
Remove-Item Env:WEBCLAW_PROXY_FILE -ErrorAction SilentlyContinue
7+
& $Binary --version
8+
if ($LASTEXITCODE -ne 0) { throw 'Version check failed' }
9+
$fixture = Join-Path $env:RUNNER_TEMP 'webclaw-install-fixture.html'
10+
'<html><body><main><h1>Windows installation check</h1><p>This local document verifies that extraction runs successfully.</p></main></body></html>' | Set-Content -Path $fixture -Encoding utf8
11+
$result = & $Binary --file $fixture --format json | ConvertFrom-Json
12+
if ($LASTEXITCODE -ne 0 -or $result.content.markdown -notmatch 'Windows installation check') { throw 'Local extraction failed' }
13+
$remote = & $Binary https://example.com --format json | ConvertFrom-Json
14+
if ($LASTEXITCODE -ne 0 -or $remote.content.markdown -notmatch 'Example Domain') { throw 'HTTPS extraction failed' }
15+
Write-Output 'PASS: version, local HTML extraction, and HTTPS extraction'

0 commit comments

Comments
 (0)