-
-
Notifications
You must be signed in to change notification settings - Fork 715
Use ARm64EC libraries for X64 support on ARM64 systems #18570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LeonarddeR
wants to merge
12
commits into
nvaccess:master
Choose a base branch
from
LeonarddeR:arm64ecPoc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9a22470
Use ARm64EC libraries for X64 support on ARM64 systems
LeonarddeR 6c7bdd5
Pre-commit auto-fix
pre-commit-ci[bot] 5e0cb4d
Restore NVDAState changes
LeonarddeR 570dfdc
Pre-commit auto-fix
pre-commit-ci[bot] 4c5c74b
Not a tuple
LeonarddeR 688df2d
Merge remote-tracking branch 'origin/master' into arm64ecPoc
LeonarddeR b9cf3a3
Changelog
LeonarddeR 9832184
Apply suggestions from code review
LeonarddeR f1a0834
Respect NVDAState for access bridge
LeonarddeR d7619ca
Merge remote-tracking branch 'origin/master' into arm64ecPoc
LeonarddeR f9b0313
Apply suggestions from code review
LeonarddeR 97bdaec
Merge remote-tracking branch 'origin/master' into arm64ecPoc
LeonarddeR File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# A part of NonVisual Desktop Access (NVDA) | ||
# Copyright (C) 2019-2025 NV Access Limited, Leonard de Ruijter | ||
# This file may be used under the terms of the GNU General Public License, version 2 or later, as modified by the NVDA license. | ||
# For full terms and any additional permissions, see the NVDA license file: https://github.com/nvaccess/nvda/blob/master/copying.txt | ||
|
||
Import( | ||
[ | ||
"thirdPartyEnv", | ||
"sourceDir", | ||
] | ||
) | ||
|
||
env: Environment = thirdPartyEnv | ||
TARGET_ARCH = env["TARGET_ARCH"] | ||
# Copy in the Java Access Bridge dependency. | ||
match TARGET_ARCH: | ||
case "x86": | ||
jabDllName = "windowsaccessbridge-32.dll" | ||
case "x86_64": | ||
jabDllName = "windowsaccessbridge-64.dll" | ||
case _: | ||
print(f"No Java Access Bridge support for NVDA core architecture {TARGET_ARCH!r}") | ||
jabDllName = None | ||
LeonarddeR marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if jabDllName: | ||
env.Command( | ||
sourceDir.File("windowsaccessbridge.dll"), env.Dir("#include/javaAccessBridge32").File(jabDllName), Copy("$TARGET", "$SOURCE") | ||
) | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# A part of NonVisual Desktop Access (NVDA) | ||
# Copyright (C) 2017-2025 NV Access Limited, Leonard de Ruijter | ||
# This file may be used under the terms of the GNU General Public License, version 2 or later, as modified by the NVDA license. | ||
# For full terms and any additional permissions, see the NVDA license file: https://github.com/nvaccess/nvda/blob/master/copying.txt | ||
|
||
import glob | ||
import os | ||
|
||
from SCons.Tool.MSCommon.vc import find_vc_pdir | ||
|
||
Import( | ||
[ | ||
"thirdPartyEnv", | ||
"sourceDir", | ||
] | ||
) | ||
|
||
env: Environment = thirdPartyEnv | ||
|
||
# UWP dlls can only be dynamically linked with the CRT, | ||
# but some systems might not have this version of the CRT. | ||
# Therefore, we must include it. | ||
# VS keeps changing the path to reflect the latest major.minor.build version which we canot easily find out. | ||
# Therefore Search these versioned directories from newest to oldest to collect all the files we need. | ||
msvc = env.get("MSVC_VERSION") | ||
vcRedistDirs = glob.glob( | ||
os.path.join( | ||
find_vc_pdir(msvc, env), rf"Redist\MSVC\{msvc[:2]}*\x86\Microsoft.VC{msvc.replace('.', '')}.CRT" | ||
) | ||
) | ||
if len(vcRedistDirs) == 0: | ||
raise RuntimeError( | ||
"Could not locate vc redistributables. Perhaps the Universal Windows Platform component in visual Studio is not installed" | ||
) | ||
vcRedistDirs.sort(reverse=True) | ||
for fn in ("msvcp140.dll", "vccorlib140.dll", "vcruntime140.dll"): | ||
for vcRedistDir in vcRedistDirs: | ||
path = os.path.join(vcRedistDir, fn) | ||
if os.path.isfile(path): | ||
env.Install(sourceDir, path) | ||
break | ||
else: | ||
raise RuntimeError( | ||
"Could not locate %s. Perhaps the Universal Windows Platform component in visual Studio is not installed" | ||
% fn | ||
LeonarddeR marked this conversation as resolved.
Show resolved
Hide resolved
|
||
) |
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please note this in changes for developers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this was already noted in the changes for 2024.1. I think this was an oversight or something.