# Phase 9: Installer for Tester Distribution - Context

**Gathered:** 2026-03-23
**Status:** Ready for planning

<domain>
## Phase Boundary

Temporary installer to package the BeyondProximity driver files into a single .exe that testers can run to install the proximity driver into their existing Bigscreen Beyond Driver package. Bridges the gap until the driver is bundled with the official Bigscreen Beyond Driver distribution. No new driver features — packaging and distribution only.

</domain>

<decisions>
## Implementation Decisions

### Installer technology
- Inno Setup (.exe installer)
- Inno Setup script (.iss) lives in the repo
- CMake custom target ("package") invokes ISCC.exe after building the DLL — one command builds everything
- Git-derived version string (tag + commit hash) — set release tags where appropriate
- Versioned output filename: e.g., `BeyondProximity-Setup-v0.1.0-abc1234.exe`

### Installer contents
- Driver DLL (`driver_BeyondProximity.dll`) and manifest (`driver.vrdrivermanifest`) only
- No beyond_prox_ctl.exe — debug CLI excluded from tester distribution
- Installs as nested sub-driver at `bin/BeyondProximity/` inside the Beyond driver directory (matches Phase 3.2 pattern)

### Tester experience
- Silent install with progress bar — no wizard pages, minimal friction
- No uninstaller in Add/Remove Programs — this is a temporary distribution mechanism
- Block installation if SteamVR is running — require it to be closed first
- Offer to launch SteamVR after installation completes (checkbox on finish page)
- UAC elevation handled automatically by Inno Setup

### Prerequisite checks
- Verify Bigscreen Beyond Driver directory exists (default Steam path)
- If not found at default path, allow tester to browse for it — but enforce the selected folder has the expected directory structure (e.g., contains `driver.vrdrivermanifest`, `resources/` directory)
- Block if SteamVR process is running

### Cleanup and migration
- Clean up old flat-deploy DLLs from `bin/win64/` root if present (`driver_BeyondProximity.dll`, `driver_bigscreenbeyond.dll`) — matches deploy_driver.ps1 behavior
- Restore root manifest to `resourceOnly=true` if a previous manual deploy changed it
- Register nested driver with vrpathreg after file copy

### Distribution
- Distributed via Discord / direct send to testers
- Versioned filename makes builds identifiable at a glance

### Claude's Discretion
- Inno Setup script structure and Pascal Script implementation details
- Git version extraction mechanism (CMake configure_file, script, etc.)
- Exact Inno Setup directives for silent mode, progress bar, and SteamVR launch
- Whether to use Inno Setup's `CloseApplications` directive or custom Pascal Script for SteamVR blocking

</decisions>

<canonical_refs>
## Canonical References

**Downstream agents MUST read these before planning or implementing.**

### Existing deployment logic
- `scripts/deploy_driver.ps1` — Current manual deployment script with all file copy, cleanup, manifest restoration, and vrpathreg logic. The installer should replicate this behavior.
- `scripts/register_driver.ps1` — Old sidecar registration script (reference for vrpathreg patterns, but sidecar approach is deprecated)

### Driver package structure
- `driver/BeyondProximity/driver.vrdrivermanifest` — The manifest file to include in the installer
- `CMakeLists.txt` — Build configuration, output paths, DLL naming (DRIVER_NAME, TARGET_NAME)

### Phase 3.2 context
- `.planning/phases/03.2-integrate-into-official-beyond-driver-package/03.2-CONTEXT.md` — Nested driver deployment pattern, BeyondEyetracking precedent, root manifest handling

</canonical_refs>

<code_context>
## Existing Code Insights

### Reusable Assets
- `scripts/deploy_driver.ps1` — Contains all deployment logic (file copy, old DLL cleanup, manifest restoration, vrpathreg registration). The Inno Setup script should replicate this logic.
- `CMakeLists.txt` — Already has DRIVER_NAME/TARGET_NAME variables and output directory structure

### Established Patterns
- Nested driver deployment: `bin/BeyondProximity/` subdirectory within the Beyond driver package (following BeyondEyetracking pattern)
- vrpathreg for driver registration with SteamVR
- Root manifest kept as `resourceOnly=true`, nested manifest has `alwaysActivate=true`
- PowerShell verification scripts with numbered checks

### Integration Points
- CMakeLists.txt — New "package" custom target that depends on the DLL build and invokes ISCC.exe
- Build output at `build/driver/BeyondProximity/` — source files for the installer
- Target install path: `C:\Program Files (x86)\Steam\steamapps\common\Bigscreen Beyond Driver\bin\BeyondProximity\`

</code_context>

<specifics>
## Specific Ideas

- Git-derived version with release tags — user explicitly wants tags set where appropriate (e.g., `v0.1.0-beta1`)
- Directory validation when browsing: enforce the selected folder has expected Beyond driver structure (manifest, resources directory present)
- deploy_driver.ps1 is the reference implementation — installer should do everything it does

</specifics>

<deferred>
## Deferred Ideas

None — discussion stayed within phase scope

</deferred>

---

*Phase: 09-installer-for-tester-distribution*
*Context gathered: 2026-03-23*
