Skip to content

Give NVDA's installer a real progress indicator. - #21043

Open
LeonarddeR wants to merge 3 commits into
nvaccess:masterfrom
LeonarddeR:installProgress
Open

LeonarddeR wants to merge 3 commits into
nvaccess:masterfrom
LeonarddeR:installProgress

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Link to issue number:

Fixes #2313

Summary of the issue:

Installing or updating NVDA shows an indeterminate progress dialog. Basically there's no way to see how far the installation is.

Description of user facing changes:

While installing or updating NVDA, the dialog shows the actual percentage, the elapsed time and the estimated remaining time. NVDA reports this progress bar like any other progress bar, following the progress bar output settings. It also announces each step of the install when it starts.

Description of developer facing changes:

  • The NVDA controller internal interface has a new function, nvdaControllerInternal_progressNotify(step, percentage). A process that NVDA started can report the progress of an operation through it.
  • installer.install has a new keyword-only parameter progressCallback. installer.copyProgramFiles has a new optional parameter onFileCopied.
  • gui.IndeterminateProgressDialog now derives from the private base class gui._ProgressDialog. Its behaviour is unchanged.

Description of development approach:

RPC:

  • The elevated slave already sends its log to the copy of NVDA that started it, over the NVDA controller internal RPC interface. The new progressNotify function uses the same interface to send a step number and an overall percentage.
  • NVDA passes these values to the dialog that currently receives remote progress. That dialog knows the enum of the steps, so it can turn the number into a step and its label. receiveRemoteProgress registers the dialog for the duration of the execElevated call.
  • Calls are ignored while no dialog receives progress.

The steps:

  • utils._progress.ProgressStep is an enum of steps with a translated label and a start percentage per step. A step ends where the next step starts.
  • utils._progress.ProgressTracker turns "this step started" and "n of total done in this step" into an overall percentage. It only reports changes, and the percentage never goes down.
  • installer._InstallStep has seven steps: waiting for other copies of NVDA to close, gaining administrative permissions, removing the previous version, copying files, removing old files, registering NVDA and finishing. The start percentages are based on measured install and update times. Note that @jcsteh has a valid point in Add standard progress bar beeps to installer #2313 (comment) when saying that the progress reporting has a sense of inaccurateness still. That said, copying files advances per copied file.
  • The dialog shows the first two steps itself, before the slave runs. It skips gaining administrative permissions when NVDA already runs as administrator.

The dialog:

  • gui._DeterminateProgressDialog is a wx.ProgressDialog with the elapsed and remaining time.
  • While the slave runs, the main thread sits in the message loop of systemUtils.execElevated. Timers run in that loop, but wx.CallAfter does not. setProgress and setStep therefore only store the latest value, from any thread. A 100 ms timer shows it.
  • NVDA's existing progress bar support reports the native progress bar. The dialog does not beep for progress itself.
  • A new step label is spoken with ui.message, under the same progress bar settings check as the indeterminate dialog.
  • Both dialogs share gui._ProgressDialog. It holds the IsActive workaround for The progress bar for installing NVDA doesn't have a sound in the last few "next" snapshots #4714 (still proven to be necessary), the progress bar settings check and the beep in done().

Testing strategy:

Manual testing with a launcher built from this branch:

  • A fresh install and a same-version update in Windows Sandbox.
  • A same-version update on a real machine.

In each case the beeps rise with the progress, the steps are announced, and the dialog shows the elapsed and remaining time.

New unit tests cover:

  • ProgressTracker: the start of each step, progress within a step up to the start of the next step or 100, skipped unchanged reports and a percentage that never goes down.
  • _walkProgramFiles: it skips the userConfig and systemConfig folders and the root nvda.exe.
  • The dialog: remote progress only reaches a registered dialog, unknown steps are ignored, the percentage is clamped, the message is kept when none is given, and setStep falls back to the start percentage of the step. The timer only updates the dialog on a change, and it speaks a new step only when the progress bar settings allow it.
  • doInstall: the waiting step is shown only on updates that are not silent. Gaining administrative permissions is shown only when NVDA doesn't run as administrator.

Known issues with pull request:

  • On an update that is not silent, the waiting step is almost always announced, even when no other copy of NVDA runs.
  • A step that ends within one 100 ms timer tick is not announced. On a fast machine this can happen to removing old files and registering NVDA.
  • Creating a portable copy, copying settings to the system configuration and downloading an update don't use the new dialog yet. These are follow-ups.

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.

@seanbudd

Copy link
Copy Markdown
Member

FYI we are planning on switching installer ASAP i.e. implementing #18450. Is this something you still want to pursue?

@seanbudd seanbudd added blocked merge-early Merge Early in a developer cycle labels Oct 28, 2026
@dpy013

dpy013 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

FYI we are planning on switching installer ASAP i.e. implementing #18450. Is this something you still want to pursue?

Which installation package solution will NVDA use next?

@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

Thanks for pointing that out @seanbudd. I assume that won't happen before 2028.1 right? Furthermore, portable copy creation will probably still stay inbox in NVDA? That can also benefit from the progress dialog introduced here.
SO yes, If you'd accept this regardless, that'd be great.

@makhlwf

makhlwf commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

FYI we are planning on switching installer ASAP i.e. implementing #18450. Is this something you still want to pursue?

Is NV Access working on this internally? I've been working on this for the past two weeks. If yes, I would stop my work at this point. Also, what installer did NV Access choose?

@seanbudd

seanbudd commented Nov 9, 2026

Copy link
Copy Markdown
Member

Which installation package solution will NVDA use next?
Also, what installer did NV Access choose?

We have not decided on an installer yet.
Our first step is to prepare the deprecations in 2027.1 so that the work can be performed outside of an API breaking release.

I assume that won't happen before 2028.1 right?

Ideally yes it will happen before then.

Furthermore, portable copy creation will probably still stay inbox in NVDA?

This is unlikely - i.e. you will not be able to create a portable copy from an installed copy. Only from the installer.

SO yes, If you'd accept this regardless, that'd be great.

Let me know what you think given this information

Is NV Access working on this internally? I've been working on this for the past two weeks. If yes, I would stop my work at this point

Work has not started yet, but this is a major project that will go through the ADR process before any meaningful code is started on. It's currently on our roadmap with the expectation of the work completing in 2027.

@CyrilleB79

CyrilleB79 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

This is unlikely - i.e. you will not be able to create a portable copy from an installed copy. Only from the installer.

Is it already documented in a specific issue? Or will it be only in the ADR? I'm curious of knowing the reason of such a limitation.

@seanbudd seanbudd removed the blocked label Nov 10, 2026
@LeonarddeR
LeonarddeR marked this pull request as ready for review November 10, 2026 08:41
@LeonarddeR
LeonarddeR requested a review from a team as a code owner November 10, 2026 08:41
@LeonarddeR
LeonarddeR requested review from seanbudd and a balanced review from Copilot November 10, 2026 08:41

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.

🟡 Changes recommended

An explicit progress percentage of 0 is incorrectly replaced with the step’s start percentage; the fallback should apply only when the value is None.

1 open issue
What changed in this PR

This PR replaces NVDA’s indeterminate installation progress with percentage-based progress, addressing #2313. It connects the elevated installer to a dialog showing elapsed and estimated remaining time, with progress output controlled by NVDA’s existing settings.

Changes:

  • Adds step-based progress tracking and per-file copy updates.
  • Passes progress through the internal controller interface to a determinate dialog, while sharing existing dialog behavior.
  • Adds unit coverage for progress calculations, dialog updates, file filtering, and installation steps.
File Description
tests/​unit/​test_util/​test_progress.py Tests step ranges and monotonic progress reporting.
tests/​unit/​test_progressDialog.py Tests remote updates, clamping, and step announcements.
tests/​unit/​test_installer.py Tests installation steps and program-file filtering.
source/​utils/​_progress.py Adds reusable step-based progress tracking.
source/​NVDAHelper/​__init__.py Routes remote progress notifications to the dialog.
source/​nvda_slave.pyw Supplies the installer’s remote progress callback.
source/​installer.py Reports installation stages and file-copy progress.
source/​gui/​installerGui.py Uses the determinate dialog during installation.
source/​gui/​__init__.py Adds the determinate dialog and shared progress behavior.
nvdaHelper/​remote/​nvdaHelperRemote.def Exports the remote progress function.
nvdaHelper/​local/​nvdaHelperLocal.def Exports the local progress callback pointer.
nvdaHelper/​local/​nvdaControllerInternal.cpp Forwards progress notifications to the callback.
nvdaHelper/​interfaces/​nvdaControllerInternal/​nvdaControllerInternal.idl Defines the progress notification interface.
nvdaHelper/​interfaces/​nvdaControllerInternal/​nvdaControllerInternal.acf Configures progress-call error handling.

Review effort: Balanced

Comment thread source/gui/__init__.py Outdated
:param step: The current step. The dialog message shows its display string.
:param percentage: The overall progress, or ``None`` for the start percentage of the step.
"""
self.setProgress(percentage or step.startPercentage, step.displayString)
The elevated slave reports the current install step and the overall
percentage to the copy of NVDA that shows the install dialog. It does
so through progressNotify, a new function of the NVDA controller
internal interface.

The install has seven steps: waiting for other copies of NVDA to
close, gaining administrative permissions, removing the previous
version, copying files, removing old files, registering NVDA and
finishing. Each step defines the overall percentage at which it
starts. Copying files advances per copied file. The install dialog
shows the first two steps itself, before the slave runs. It skips
gaining administrative permissions when NVDA already runs as
administrator.

The install dialog is now a progress dialog with a percentage and the
elapsed and remaining time. NVDA reports its progress bar like any
other progress bar, announces each step when it starts and beeps when
the install is done. The indeterminate and the new progress dialog
share a base class.

Fixes nvaccess#2313

Assisted-by: Claude:claude-opus-5-5
Assisted-by: Claude:claude-opus-5-5
@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

@seanbudd since the route to a new installer is still uncertain, I decided to leave this open and marked this ready for review. If you yet decide not to do this, feel free to close regardless.

setStep only falls back to the start percentage of the step when no
percentage is given. A percentage of 0 is shown as is.

Assisted-by: Claude:claude-opus-5-5

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-early Merge Early in a developer cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add standard progress bar beeps to installer

6 participants