Skip to content

Template 0.1.45: one entry per app in Windows Installed apps - #69

Merged
guijacquemet merged 1 commit into
mainfrom
claude/laughing-wright-s6cht3
Dec 4, 2026
Merged

guijacquemet merged 1 commit into
mainfrom
claude/laughing-wright-s6cht3

Conversation

@guijacquemet

Copy link
Copy Markdown
Collaborator

Why

Found by the LabConstrictor-CAREamics 0.0.5 testers on two Windows 11 computers: after uninstalling, a "Python" entry stayed in Settings > Apps > Installed apps, and removing it failed because its uninstaller was gone.

Cause, traced in constructor's main.nsi.tmpl:

  • post_install.bat wrote its own entry (key <app>) next to constructor's own entry (<app> <version> (Python 3.x 64-bit)), and both pointed to the same Uninstall-<app>.exe.
  • The uninstaller deletes only the first entry whose UninstallString names its own folder. Windows lists the shorter key first, so the "(Python …)" entry stayed.
  • Constructor writes its entry after post_install runs, so post_install can't change it.

What

  • post_install.bat writes no Installed apps entry any more. Constructor's entry is the only one, and its uninstaller removes it.
  • bump_constructor.py, which runs at each release, writes uninstall_name: "<app>" and company: "<GITHUB_REPOSITORY_OWNER>" into construct.yaml. Constructor's entry therefore has the same name and publisher the removed block gave it. The version and icon come from the installer, as before.
  • Migration 0.1.45:
    • It replaces bump_constructor.py when it is still the 0.1.44 file. The comparison takes into account the app name the setup form filled in for PROJECT_NAME.
    • It replaces the Apps-list block of post_install.bat with three REM lines when the block is still the template's, with the app's values filled in.
    • A file someone changed is SKIPPED, and the log says what to do by hand.
  • Design note .tools/docs/migration_0_1_45.md, including PowerShell lines to remove a stale entry left by an older install.
  • The Windows smoke check now asserts that post_install writes no entry of its own.

Checks run

  • pytest tests (619 passed), ruff 0.15.20 and mypy pass.
  • Dry run on a copy of guijacquemet/LabConstrictor-CAREamics:
    • The migration updated both files, and a second run changed nothing.
    • bump_constructor.py with GITHUB_REPOSITORY_OWNER=guijacquemet added uninstall_name: "LabConstrictor-CAREamics" and company: "guijacquemet" to its construct.yaml.
  • Not yet tested on a real Windows install/uninstall: no Windows runner here, and no CI job builds and runs an installer yet.

Generated by Claude Code

post_install.bat wrote its own Installed apps entry next to constructor's
"<app> <version> (Python 3.x 64-bit)" entry, both pointing to the same
uninstaller. The uninstaller removes only the first one it finds, so the
"(Python ...)" entry stayed with an uninstaller that was gone (found by the
LabConstrictor-CAREamics 0.0.5 testers on two Windows 11 computers).

post_install.bat now writes no entry, and at each release bump_constructor.py
writes uninstall_name (the app's name) and company (the repository owner) in
construct.yaml, so constructor's single entry looks as before. The 0.1.45
migration replaces bump_constructor.py and removes the block from apps whose
files are still the template's; the design note says how to remove a stale
entry left by an older install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AoUT3RtgWWsiVVarX
@guijacquemet
guijacquemet merged commit 855c203 into main Dec 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants