Skip to content

Correctly version and sign the 32 bit synthDriverHost runtime executable and don't include unnecessary pdb lib and exp files#19683

Merged
seanbudd merged 6 commits into
betafrom
versionAndSignsynthDriverHost32
Feb 25, 2026
Merged

Correctly version and sign the 32 bit synthDriverHost runtime executable and don't include unnecessary pdb lib and exp files#19683
seanbudd merged 6 commits into
betafrom
versionAndSignsynthDriverHost32

Conversation

@michaelDCurran

Copy link
Copy Markdown
Member
  • setup.py: when copying the _synthDrivers32 directory, only copy py an dll files, not lib, exp or pdb files as they are not required.
  • When creating dist, also sign nvda_synthDriverHost.exe if it exists.
  • synthDriverHost32 runtime setup-runtime.py Py2exe script: accept version and publisher commandline arguments so that these can be set dynamically. The github action and sconstruct now pass version and publisher to py2exe when compiling the 32 bit synthDriverHost runtime.

Link to issue number:

Fixes #19654
Fixes #19653

Summary of the issue:

The 32 bit synthDriverhost runtime introduced in PR #19432:

  • Does not contain correct version information in its executable,
  • Is not signed, and
  • includes some extra lib exp and pdb files which are not necessary and just take up space.

Description of user facing changes:

Description of developer facing changes:

Description of development approach:

  • synthDriverHost's setup-runtime.py py2exe script now takes version and publisher as commandline arguments, so that these can be set on the executable dynamically.
  • The github workflow and sconstruct pass the correct version and publisher to the setup-runtime.py py2exe script.
  • When building the main dist target with scons, sign nvda_synthDriverHost.exe if it exists.
  • When building the main NvDA distribution with py2exe, only copy py and dll files in the _synthDrivers32 directory, which now ignores lib exp and pdb files.

Testing strategy:

  • Compiled with scons synthDriverHost32Runtime and scons dist, providing a signing certificate and custom version and publisher.
    • Confirmed that nvda_synthDriverHost.exe was signed and contained correct version information.
    • Confirmed the dist_synthDrivers32 directory only contained no lib exp or pdb files.
    • Confirmed that NVDA runs, and sapi4 and sapi5 (32 bit) could be used.
  • Run the above tests on a CI build from this pr.

Known issues with pull request:

None known.

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.

… dll files, not lib, exp or pdb files as they are not required.
…ion and publisher commandline arguments so that these can be set dynamically. The github action and sconstruct now pass version and publisher to py2exe when compiling the 32 bit synthDriverHost runtime.
Copilot AI review requested due to automatic review settings February 24, 2026 14:11
@michaelDCurran michaelDCurran requested a review from a team as a code owner February 24, 2026 14:11

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 addresses issues with the 32-bit synthDriverHost runtime executable introduced in PR #19432. The changes ensure that nvda_synthDriverHost.exe has correct version information, is properly signed during distribution builds, and that the _synthDrivers32 directory only contains necessary runtime files (.py and .dll), excluding build artifacts (.lib, .exp, .pdb).

Changes:

  • Added command-line arguments to setup-runtime.py for dynamically setting version and publisher information
  • Modified sconstruct and GitHub workflow to pass version and publisher to the synthDriverHost32Runtime build process
  • Added signing support for nvda_synthDriverHost.exe during dist builds
  • Changed file copying for _synthDrivers32 to only include .py and .dll files, excluding unnecessary build artifacts

Reviewed changes

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

File Description
source/setup.py Modified to use explicit glob patterns for _synthDrivers32, copying only .py and .dll files instead of all files recursively
sconstruct Added signing for nvda_synthDriverHost.exe with file existence check; updated synthDriverHost32Runtime command to pass version and publisher; adjusted environment variable handling
runtime-builders/synthDriverHost32/setup-runtime.py Added command-line arguments for --version and --publisher, with logic to override buildVersion defaults
.github/workflows/testAndPublish.yml Updated to pass version and publisher arguments to setup-runtime.py
Comments suppressed due to low confidence (2)

sconstruct:709

  • The version and publisher variables should be quoted when passed to the command line to handle potential spaces or special characters. Currently, if version or publisher contain spaces, the command will fail. Consider using shlex.quote or similar for proper shell escaping, or at a minimum wrap the variables in quotes like this: --version "{version}" --publisher "{publisher}"
	ENV=os.environ,

sconstruct:709

  • There are two spaces between "." and "python" in this command. While this is not an error, it appears to be unintentional. Consider using a single space for consistency with the GitHub workflow on line 122.
	ENV=os.environ,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sconstruct Outdated
Comment thread source/setup.py Outdated
michaelDCurran and others added 2 commits February 25, 2026 00:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@michaelDCurran michaelDCurran changed the title Correctly version and sign the 32 bit synthDriverHost runtime executable and don't include unncessary pdb lib and exp files Correctly version and sign the 32 bit synthDriverHost runtime executable and don't include unnecessary pdb lib and exp files Feb 24, 2026
@seanbudd seanbudd added this to the 2026.1 milestone Feb 25, 2026
@seanbudd seanbudd merged commit 5e20004 into beta Feb 25, 2026
104 of 111 checks passed
@seanbudd seanbudd deleted the versionAndSignsynthDriverHost32 branch February 25, 2026 23:58
SaschaCowley pushed a commit that referenced this pull request Feb 27, 2026
… executable and don't include unnecessary pdb lib and exp files" (#19714)

### Reverts PR
Reverts #19683

### Issues fixed
N/A

### Issues reopened
<!-- Issues that will be re-opened by reverting, i.e. the issues that
were fixed via the PR getting reverted -->
Reopens #19654
Reopens #19653

### Reason for revert
This PR is causing system tests to hang indefinitely for signed builds.
NVDA fails to start after being installed.

Compare these two commit builds

- https://github.com/nvaccess/nvda/actions/runs/22465329705
- https://github.com/nvaccess/nvda/actions/runs/22465348278

### Can this PR be reimplemented? If so, what is required for the next
attempt
Create `try-` builds from the PR which pass
SaschaCowley pushed a commit that referenced this pull request Mar 9, 2026
…xists. (#19749)

### Summary of the issue:
The 32 bit synthDriverhost runtime executable introduced in PR #19432 is
not signed.
 
### Description of user facing changes:

### Description of developer facing changes:

### Description of development approach:
When building the main dist target with scons, also sign
nvda_synthDriverHost.exe if it exists.
This is an improvement over the previous try in pr #19683, where now the
path is passed into the lambda by value so that it does not change in
the for loop after being captured.

### Testing strategy:
* [x] Compiled with scons synthDriverHost32Runtime and scons dist,
providing a signing certificate
  *Confirmed that nvda_synthDriverHost.exe was signed.
* [x] Run the above tests on a try build from this pr.

### Known issues with pull request:
None known.
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.

4 participants