feat(windows): rewrite NSIS installer, add pgtidy update command

This commit is contained in:
Hein
2026-10-06 16:15:21 +02:00
parent e9c0d52ae9
commit 96ee6c659b
12 changed files with 606 additions and 348 deletions
+29
View File
@@ -0,0 +1,29 @@
# Windows installer
NSIS script: `installer.nsi`. Output: `dist/pgtidy-setup-windows-amd64.exe`.
## Build
```
make installer-windows
```
Needs `makensis` (package `nsis`). CI builds and uploads it on release.
## Installer
- Installs `pgtidy.exe` to `%ProgramFiles%\PgTidy` (admin).
- Adds the install dir to the system `PATH`; removed on uninstall.
- Registers in Add/Remove Programs (supports silent `/S` uninstall).
## Update check
```
pgtidy update # check, prompt, download + run installer (Windows)
pgtidy update --check # report only
pgtidy update --yes # no prompt
```
- Source: latest Gitea release (`pkg/updatecheck`).
- `dev` and commit-hash builds are never reported as outdated.
- Non-Windows: prints the release URL.