Add a boolean to inform the architecture of the runing operating system
Link to issue number:
Closes #16330
Summary of the issue:
As of 2024, Windows 10 is the last version to support 32-bit processors from Intel, AMD, and ARM, with Windows 11 supporintg 64-bit platforms only (AMD64 and ARM64). In 2025, consumer support for Windows 10 will end, with end of support for long-term servicing channel builds planned for 2032 (Windows 10 IoT Enterprise 2021 LTSC). Originally, NVDA was written for 32-bit Python runtime. With impending end of support for 32-bit platforms, moving to 64-bit became a goal for NV Access and the NVDA community. According to #16304, a phased transition plan is proposed, with full transition tentatively scheduled for 2026.
Description of user facing changes
This way NVDA Core and add-ons can execute appropriate code paths. For example, when accessing Windows Registry, WoW64 paths must be used if running 32-bit NVDA on 64-bit Windows and vice versa.
Description of development approach
Check runtime using
winVersion.getWinVer().processorArchitecture.endswith(“64”)
Testing strategy:
run Python console and try the next code:
from winAPI.constants import IS_64_BIT
print(IS_64_BIT)
Known issues with pull request:
None
Code Review Checklist:
- [x] 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
- [x] UX of all users considered:
- Speech
- Braille
- Low Vision
- Different web browsers
- Localization in other languages / culture than English
- [x] API is compatible with existing add-ons.
- [x] Security precautions taken.
Summary by CodeRabbit
-
New Features
- Introduced a feature to check if the system is 64-bit, enhancing compatibility and performance checks.
Walkthrough
This update introduces a new constant IS_64_BIT in the constants.py file of the winAPI module. It utilizes an import from the winVersion module to check if the system architecture is 64-bit. This addition streamlines the ability to determine system architecture within the module.
Changes
| File | Change Summary |
|---|---|
source/winAPI/constants.py |
Imported winVersion and added the IS_64_BIT constant to check system architecture. |
By integrating these adjustments, the winAPI module now efficiently checks for 64-bit system architecture using the winVersion module's functionality.
[!TIP]
Early access features: enabled
We are currently testing the following features in early access:
- OpenAI
gpt-4omodel for code reviews and chat: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available.Note:
- You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
- Please join our Discord Community to provide feedback and report issues.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>. -
Generate unit testing code for this file. -
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:-
@coderabbitai generate unit testing code for this file. -
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai generate interesting stats about this repository and render them as a table. -
@coderabbitai show all the console.log statements in this repository. -
@coderabbitai read src/utils.ts and generate unit testing code. -
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format. -
@coderabbitai help me debug CodeRabbit configuration file.
-
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
-
@coderabbitai pauseto pause the reviews on a PR. -
@coderabbitai resumeto resume the paused reviews. -
@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai full reviewto do a full review from scratch and review all the files again. -
@coderabbitai summaryto regenerate the summary of the PR. -
@coderabbitai resolveresolve all the CodeRabbit review comments. -
@coderabbitai configurationto show the current CodeRabbit configuration for the repository. -
@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
@josephsl - this doesn't seem to follow the approach you suggested in #16330, can you comment if this closes the issue as expected?
Hi,
At least the approach checks if 64-bit OS is in use, but not whether NVDA itself is running on native (32/32) or compatibility (32/64) layer. NVDA and add-ons can determine operating system architecture, but not whether NVDA itself is on the same bitness as the operating system, and that's where I went with the original issue (let me know if you'd like me to clarify this in the original issue).
There are also quite a few things that could see some changes, notably copyright header and code comment/code placement.
Thanks.
Hi, I think the two flags should rather be: Windows architecture is 64-bit or not (because in many cases system architecture is hardware architecture), and which architecture NVDA itself is running as (that will be “PROCESSOR_ARCHITECTURE” environment variable). Thanks.
Hi,
I think two flags would suffice - for the most part, 64-bit Windows is equivalent to 64-bit system architecture. Also, the second flag has two criticla issues: 32-bit Windows releases do not have PROCESSOR_ARCHITEW6432, and we are only looking at x64 instead of both AMD64 and ARM64.
Thanks.
@josephsl I don't think a changelog entry is useful here - when we are deeper in the migration steps we can provide more useful and thorough information to add-on authors