# StorageIQ Installer Build Instructions

## Prerequisites

- Windows 10/11
- Python 3.11+
- Inno Setup 6 with `ISCC.exe` available on `PATH`

## Build

From the repository root:

```powershell
.\build.ps1
```

The build script installs Python dependencies, writes `installer\version.iss` from `storageiq\version.py`, creates the PyInstaller application under `dist\StorageIQ`, and compiles the Inno Setup installer when `ISCC.exe` is available.

Installer output:

```text
dist\installer\StorageIQ-1.6.0-Setup.exe
```

## Installer Behavior

- Installs application files to `{autopf}\StorageIQ`.
- Creates Start Menu shortcuts.
- Offers an optional Desktop shortcut.
- Registers StorageIQ in Windows Add/Remove Programs.
- Provides uninstall support through the generated uninstaller.
- Preserves per-user settings, the SQLite database, diagnostic bundles, and logs under `%LOCALAPPDATA%\StorageIQ`.

## Upgrade Test

1. Install an older StorageIQ build.
2. Run a scan and change Settings values.
3. Install `StorageIQ-1.6.0-Setup.exe` over the existing install.
4. Confirm the app launches from the Start Menu shortcut.
5. Confirm `%LOCALAPPDATA%\StorageIQ\storageiq.sqlite3`, `%LOCALAPPDATA%\StorageIQ\logs`, and persisted Settings values are still present.

## Uninstall Test

1. Uninstall StorageIQ from Windows Add/Remove Programs.
2. Confirm the Program Files application folder is removed.
3. Confirm `%LOCALAPPDATA%\StorageIQ` remains present for user data preservation.
