Skip to content

Windows installer: unticking a component does not remove it #254

Description

@jozef2svrcek

Found during the #247 Windows test round.

Deselecting "LPDO application (GUI)" on the installer's components page leaves the previously installed GUI in place: lpdo.exe, its Start-menu shortcuts and the .pgn file associations all survive.

Cause

The component gates only the copy of the payload — installer.nsi wraps File "${MAINBINARYSRCPATH}" (and the file-association / deep-link blocks) in SectionGetFlags ${SecApp}. Nothing removes an already-installed GUI, so on an upgrade the checkbox reads as a choice while being a no-op for anything already on disk.

The same applies in principle to SecCli/SecServer: unticking the CLI leaves chess-db.exe and its PATH entry from the previous install (the server component does at least stop and remove the service when unticked).

Options

  1. Make unticking remove — delete lpdo.exe, shortcuts and file associations when SecApp is unticked (mirror of the POSTINSTALL work already done for the service). Most honest, but "install to uninstall" is an odd flow.
  2. Preselect from the existing install and say so — read what is currently installed, tick those boxes, and label the page as modifying the installation. Then unticking legitimately means remove, per option 1.
  3. Disable the choice on upgrade — grey out components already installed, with a note to use the uninstaller to remove them. Cheapest, least useful.

Related UX wart from the same round: a seamless upgrade skips the components page entirely, so the only way to reach it is to re-run the installer for the version already installed. Worth a "Modify" entry in Programs and Features, or showing the page on upgrade with current selections preselected (option 2 makes that coherent).

Notes

  • Documented in the meantime: docs/remote-server.md explains that an upgrade skips the page and how to reach it.
  • hooks.nsh can be syntax-checked on Linux with makensis before spending a CI build — see chess-client/src-tauri/windows/TEMPLATE-NOTES.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions