Replace os.environ["PROCESSOR_ARCHITEW6432"] with winVersion.getWinVer().processorArchitecture in most cases#14564
Merged
Conversation
…vaccess#14534. Replace usage of os.environ['PROCESSOR_ARCHITEW6432'] with winVersion.getWinver().processorArchitecture (this string comes from os.environ anyway). This affects is64bitProcess and appArchitecture methods in app module clas.
…vaccess#14534. Replace os.environ with processorArchitecture when determining 32-bit versus 64-bit Windows.
Store processorArchitecture string in the 'arch' variable when starting NVDA helper processes on various 64-bit architectures (AMD64, ARM64).
See test results for failed build of commit a5c14c221c |
6 tasks
seanbudd
approved these changes
Jan 18, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Closes #14534
Summary of the issue:
Replace os.environ["PROCESSOR_ARCHITEW6432"] with winVersion.getWinVer().processorArchitecture in most cases (see below for exceptions).
Description of user facing changes
None
Description of development approach
Replace os.environ["PROCESSOR_ARCHITEW6432"] with winVersion.getWinVer().processArchitecture in the following cases:
The only exception is update check, specifically since Windows 7 service pack 1 string must be recorded correctly; when NVDA moves to supporting Windows 8.1/10 or later, this can be dropped (no more service packs), allowing update check facility to switch to using winVersion.WinVersion class attributes, including processor architecture.
Testing strategy:
In addition to existing unit test on processor architecture attribute, manu testing would involve testing COM registration fixing tool and comparing app module attributes to make sure they remain the same before and after the PR is merged.
Known issues with pull request:
None
Change log entries:
No changelog as #14439 changelog would suffice
Code Review Checklist:
About add-on API
NO changes to the API as os.environ can be used by add-ons. winVErsion.WinVersion.processorArchitecture provides a one-stop shop for obtaining processor architecture in a more convenient way.