---
phase: 09-installer-for-tester-distribution
plan: 01
subsystem: infra
tags: [inno-setup, cmake, installer, git-versioning, pascal-script]

requires:
  - phase: 03.2-integrate-into-official-beyond-driver-package
    provides: nested driver deployment pattern (bin/BeyondProximity/) and deploy_driver.ps1 reference
provides:
  - Inno Setup .iss script for single-click installer packaging
  - CMake package target with git-derived versioning
  - Automated SteamVR process blocking, directory validation, and artifact cleanup
affects: [09-installer-for-tester-distribution]

tech-stack:
  added: [inno-setup-6, iscc-cli, git-describe]
  patterns: [cmake-custom-target-for-packaging, pascal-script-wmi-process-detection]

key-files:
  created:
    - installer/BeyondProximity.iss
  modified:
    - CMakeLists.txt

key-decisions:
  - "WMI OLE automation for SteamVR process detection over tasklist/CloseApplications"
  - "DisableDirPage=auto to show dir page only when default path missing"
  - "Uninstallable=no for temporary tester distribution (no Add/Remove Programs entry)"

patterns-established:
  - "CMake package target: add_custom_target(package) depends on driver DLL, invokes ISCC with /D defines"
  - "Git version extraction: git describe --tags --always --dirty with v0.0.0-dev fallback"

requirements-completed: [DIST-01]

duration: 2min
completed: 2026-03-23
---

# Phase 09 Plan 01: Installer Script and CMake Integration Summary

**Inno Setup .iss script with full deploy_driver.ps1 logic and CMake package target with git-derived versioning**

## Performance

- **Duration:** 2 min
- **Started:** 2026-03-23T09:01:22Z
- **Completed:** 2026-03-23T09:03:12Z
- **Tasks:** 2
- **Files modified:** 2

## Accomplishments
- CMakeLists.txt extended with git version extraction (describe --tags --always --dirty) and conditional ISCC package target
- Complete Inno Setup script replicating all deploy_driver.ps1 logic: nested driver install, SteamVR blocking, directory validation, old artifact cleanup, root manifest restoration, vrresources restoration, vrpathreg registration
- Installer excludes beyond_prox_ctl.exe per user requirement

## Task Commits

Each task was committed atomically:

1. **Task 1: Add git version extraction and package target to CMakeLists.txt** - `7620c91` (feat)
2. **Task 2: Create Inno Setup script with full installer logic** - `25ec33d` (feat)

## Files Created/Modified
- `CMakeLists.txt` - Added git version extraction and ISCC package custom target
- `installer/BeyondProximity.iss` - Complete Inno Setup script with Pascal Script for process detection, directory validation, manifest restoration, and vrresources restoration

## Decisions Made
- WMI OLE automation (`WbemScripting.SWbemLocator`) chosen over tasklist for SteamVR process detection -- cleaner, no visible process spawning
- `DisableDirPage=auto` shows directory selection only when default Steam path not found
- `Uninstallable=no` since this is temporary tester distribution (no Add/Remove Programs entry)
- `PrivilegesRequired=admin` for Program Files write access

## Deviations from Plan

None - plan executed exactly as written.

## Issues Encountered
None

## User Setup Required
None - no external service configuration required. Inno Setup 6 must be installed to use the `package` target (CMake emits a warning if not found).

## Next Phase Readiness
- Installer script and build integration complete
- Ready for Plan 02 (verification/testing)
- ISCC.exe needed on build machine to actually compile the installer

## Self-Check: PASSED

- FOUND: installer/BeyondProximity.iss
- FOUND: CMakeLists.txt
- FOUND: 7620c91 (Task 1 commit)
- FOUND: 25ec33d (Task 2 commit)

---
*Phase: 09-installer-for-tester-distribution*
*Completed: 2026-03-23*
