Skip to content

Modernize installer and reg key usage#18851

Merged
seanbudd merged 13 commits into
masterfrom
modernizeInstaller
Sep 19, 2025
Merged

Modernize installer and reg key usage#18851
seanbudd merged 13 commits into
masterfrom
modernizeInstaller

Conversation

@seanbudd

@seanbudd seanbudd commented Sep 2, 2025

Copy link
Copy Markdown
Member

Link to issue number:

Part of #16304

Summary of the issue:

We need to refactor large parts of the installer code as part of the 64bit migration.
This is to ensure the old copy of NVDA is cleaned up correctly.

Description of user facing changes:

None

Description of developer facing changes:

  • Some API breaking changes and deprecations which shouldn't affect most/any add-ons

Description of development approach:

  • Move relevant keys to config.registry
  • Move relevant paths to WritePaths
  • Add type hints
  • Create a winBinding for RegDeleteTreeW to update _deleteKeyAndSubkeys. The current design of _deleteKeyAndSubkeys was to support Windows XP and older

Testing strategy:

None (suggestions welcome)

Known issues with pull request:

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

Copilot AI review requested due to automatic review settings September 2, 2025 02:06
@seanbudd seanbudd requested a review from a team as a code owner September 2, 2025 02:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the installer and registry key usage by refactoring the installer code to centralize registry keys in config.registry and move relevant paths to WritePaths. It adds type hints throughout the installer module and updates the registry key deletion mechanism to use RegDeleteTreeW instead of a custom implementation.

Key changes:

  • Centralized registry keys and paths for better organization
  • Added comprehensive type hints to improve code maintainability
  • Modernized registry key deletion using Windows API

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
source/winBindings/advapi32.py Added RegDeleteTreeW Windows API binding for registry operations
source/installer.py Major refactoring with type hints, moved paths to WritePaths, and registry keys to config.registry
source/gui/installerGui.py Updated to use new WritePaths for default install directory
source/gui/addonStoreGui/controls/storeDialog.py Updated import to use new registry constant location
source/config/registry.py Added new registry keys and constants for addon handling
source/addonHandler/init.py Added deprecation handling for moved constants
source/NVDAState.py Added new properties for install directories and start menu folder handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread source/installer.py Outdated
Comment thread source/installer.py Outdated
pre-commit-ci Bot and others added 3 commits September 2, 2025 02:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread source/NVDAState.py
Comment thread source/winBindings/advapi32.py Outdated
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Sep 9, 2025

@SaschaCowley SaschaCowley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, just a couple of minor things

Comment thread source/winBindings/advapi32.py Outdated
Comment thread source/winBindings/advapi32.py Outdated
Comment thread source/NVDAState.py Outdated
Comment thread source/installer.py
@seanbudd seanbudd merged commit df7dd09 into master Sep 19, 2025
73 of 77 checks passed
@seanbudd seanbudd deleted the modernizeInstaller branch September 19, 2025 00:41
@github-actions github-actions Bot added this to the 2026.1 milestone Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-breaking-change conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants