Repository navigation
Give NVDA's installer a real progress indicator. - #21043
LeonarddeR wants to merge 3 commits into
Conversation
|
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? |
|
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. |
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? |
We have not decided on an installer yet.
Ideally yes it will happen before then.
This is unlikely - i.e. you will not be able to create a portable copy from an installed copy. Only from the installer.
Let me know what you think given this information
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. |
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. |
There was a problem hiding this comment.
🟡 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
| :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
5aa9653 to
c272896
Compare
|
@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

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:
nvdaControllerInternal_progressNotify(step, percentage). A process that NVDA started can report the progress of an operation through it.installer.installhas a new keyword-only parameterprogressCallback.installer.copyProgramFileshas a new optional parameteronFileCopied.gui.IndeterminateProgressDialognow derives from the private base classgui._ProgressDialog. Its behaviour is unchanged.Description of development approach:
RPC:
progressNotifyfunction uses the same interface to send a step number and an overall percentage.receiveRemoteProgressregisters the dialog for the duration of theexecElevatedcall.The steps:
utils._progress.ProgressStepis an enum of steps with a translated label and a start percentage per step. A step ends where the next step starts.utils._progress.ProgressTrackerturns "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._InstallStephas 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:
gui._DeterminateProgressDialogis awx.ProgressDialogwith the elapsed and remaining time.systemUtils.execElevated. Timers run in that loop, butwx.CallAfterdoes not.setProgressandsetSteptherefore only store the latest value, from any thread. A 100 ms timer shows it.ui.message, under the same progress bar settings check as the indeterminate dialog.gui._ProgressDialog. It holds theIsActiveworkaround 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 indone().Testing strategy:
Manual testing with a launcher built from this branch:
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 theuserConfigandsystemConfigfolders and the rootnvda.exe.setStepfalls 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:
Code Review Checklist: