# AyaanScript+ Windows Installer

Three artifacts here, ordered from easiest to fanciest:

## 1. `install-ayaanscript.bat` — double-click installer (recommended for users)

The user downloads this file + `install-ayaanscript.ps1`, double-clicks the `.bat`. It:
1. Checks for Rust; if missing, downloads `rustup-init.exe` from Mozilla and runs it silently.
2. Runs `cargo install ayaan --force` to get both `ayaan` and `aspkg`.
3. Adds `~/.cargo/bin` to the User PATH if not already there.
4. Prints success/failure.

No admin rights required — installs to the user profile.

## 2. `install-ayaanscript.ps1` — PowerShell installer

Same logic as the .bat, but you can also run it directly:
```powershell
powershell -ExecutionPolicy Bypass -File install-ayaanscript.ps1
```

## 3. `installer.iss` — real `.exe` installer (Inno Setup)

To produce `AyaanScriptPlus-Setup.exe`:

1. Download Inno Setup from https://jrsoftware.org/isinfo.php (free)
2. Open `installer.iss` in Inno Setup Compiler
3. Build → produces `AyaanScriptPlus-Setup.exe` in this folder
4. Distribute that single `.exe`

The `.exe` bundles `install-ayaanscript.ps1` and runs it after install. It also registers an uninstaller in Add/Remove Programs that calls `cargo uninstall ayaan`.

## How users install

**Easy path** (no Inno Setup needed):
1. Download `install-ayaanscript.bat` and `install-ayaanscript.ps1` (keep them in the same folder)
2. Double-click `install-ayaanscript.bat`
3. Done

**Fancy path** (real installer):
1. Download `AyaanScriptPlus-Setup.exe`
2. Run it
3. Done

## What it does under the hood

```powershell
# If cargo isn't on PATH:
curl https://win.rustup.rs/x86_64 -o rustup-init.exe
rustup-init.exe -y --default-toolchain stable --profile minimal

# Then:
cargo install ayaan --force
```

Both `ayaan.exe` and `aspkg.exe` land in `%USERPROFILE%\.cargo\bin\`.
