feat(windows): rewrite NSIS installer, add pgtidy update command
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user