# Testing on Windows

Three ways to get this verified on a real Windows machine, cheapest first.
The app is an HTTP server, so most of it can be checked without anyone
sitting at the keyboard.

## 0. Install (all paths need this)

Unzip the release anywhere, then double-click `run.bat`. It checks for
Python 3.11+ and ffmpeg (with `winget` hints if missing), makes its own
virtualenv, installs dependencies, and launches. First run opens the setup
wizard.

## Troubleshooting

**"Could not find platform independent libraries &lt;prefix&gt;"** — Python
can't find its own standard library. Almost always a leftover `PYTHONHOME`
or `PYTHONPATH` environment variable pointing at a different Python
install. `run.bat` now clears both for its own window, so re-running it
should just work; if you want them gone for good:

    echo %PYTHONHOME%
    echo %PYTHONPATH%

then Settings → System → About → Advanced system settings → Environment
Variables. Delete the `.venv` folder and run `run.bat` again afterwards.

**run.bat installs things, then the window just closes** — fixed in
0.1.0+: the windowed launcher uses `pythonw.exe`, which has no console, so
anything the app printed used to kill it silently. It now logs to
`app.log` next to `run.bat`, and `run.bat` waits for the server to come up
and shows the log if it doesn't. To watch it start in a visible window:

    run.bat --console

**Anything else during setup** — `run.bat` stops with the real error now
instead of continuing. pip output is no longer swallowed.

## 1. Paste-back (zero setup, ~2 minutes)

    run.bat --selftest

Prints PASS/WARN/FAIL for every machine-specific unknown — WebView2 window,
tray icon, global-hotkey binding, Chrome/Edge discovery, NVENC, ffmpeg
build, OBS websocket, plugins, a real cut — then a JSON block to paste
back. Covers everything except how the window *looks*: one screenshot
covers that.

## 2. Drive it over the LAN (no shell access needed)

    .venv\Scripts\python run.py --headless --lan

Prints the machine's address. Anyone on the same network can then exercise
the whole product over HTTP — status, setup, hotkeys, plugins, renders,
sharing — which is enough to verify behaviour, just not pixels.

⚠ Everything except GSI ingest is unauthenticated. This is meant for a
trusted home network or a short debugging session, not the open internet.
Stop it when you're done. (Proper auth is required before LAN access
becomes a shipped feature rather than a debugging tool.)

## 3. Full remote loop — OpenSSH Server

In an **admin PowerShell** on the Windows box:

    Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
    Start-Service sshd
    Set-Service -Name sshd -StartupType Automatic
    # optional but nicer: make PowerShell the SSH shell
    New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell `
      -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force

Then authorise a key. **Gotcha:** for accounts in the Administrators group
Windows ignores `~/.ssh/authorized_keys` and uses this file instead:

    C:\ProgramData\ssh\administrators_authorized_keys

with permissions locked down:

    icacls C:\ProgramData\ssh\administrators_authorized_keys /inheritance:r `
      /grant "Administrators:F" /grant "SYSTEM:F"

That gives a full edit → run → test loop against real hardware.

## What only a human can check

- how the window and tray icon actually look
- pressing the clip hotkey mid-game and seeing the replay buffer save
- OBS actually recording while events arrive
