Problem
After #224, MSI install scope is controlled by windows.perUserInstall while NSIS uses windows.nsis.perMachine. This creates three asymmetries inside the same windows { … } block:
|
NSIS |
MSI |
| Flag name |
`perMachine` |
`perUserInstall` (inverted) |
| DSL location |
`nsis { … }` sub-block |
top-level `windows { … }` |
| What `false` means |
per-user (`%LOCALAPPDATA%`) |
per-machine (`Program Files`) |
A user moving an app from NSIS to MSI (or vice versa) has to change the flag name, move it to a different scope, and invert the boolean — easy to misconfigure silently.
Proposed fix
Introduce a dedicated `msi { … }` sub-block mirroring `nsis { … }`:
```kotlin
windows {
msi {
perMachine = true // mirrors nsis.perMachine
// future: oneClick, warningsAsErrors, additionalWixArgs, ...
}
}
```
- Map `msi.perMachine` → electron-builder `msi.perMachine` (1:1, no inversion).
- Deprecate `windows.perUserInstall` with `@Deprecated(replaceWith = ReplaceWith("msi.perMachine = !value"))`. Keep it functional during a deprecation cycle so existing builds don't break.
- Update `docs/targets/windows.md`.
Why this is worth doing
- Removes the cognitive trap on cross-target migrations.
- Provides a natural home for the rest of `MsiOptions` (`oneClick`, `warningsAsErrors`, `additionalWixArgs`, `additionalLightArgs`) currently not exposed.
- No breaking change if done with deprecation.
Follow-up to #222 / #224.
Problem
After #224, MSI install scope is controlled by
windows.perUserInstallwhile NSIS useswindows.nsis.perMachine. This creates three asymmetries inside the samewindows { … }block:A user moving an app from NSIS to MSI (or vice versa) has to change the flag name, move it to a different scope, and invert the boolean — easy to misconfigure silently.
Proposed fix
Introduce a dedicated `msi { … }` sub-block mirroring `nsis { … }`:
```kotlin
windows {
msi {
perMachine = true // mirrors nsis.perMachine
// future: oneClick, warningsAsErrors, additionalWixArgs, ...
}
}
```
Why this is worth doing
Follow-up to #222 / #224.