nvda
cfe8e7ab - Allow NVDA x64 to run on clean installs of Windows (#18828)

Commit
1 year ago
Allow NVDA x64 to run on clean installs of Windows (#18828) Fixes #18827 Summary of the issue: On clean copies of Windows (such as Windows Sandbox), 64 bit builds of NVDA fail to run. Description of user facing changes: These builds now run. Description of developer facing changes: None. Description of development approach: In https://github.com/nvaccess/nvda/pull/18814#issuecomment-3227651255 we identified that NVDA wasn't running because `vcruntime140.dll` couldn't be loaded. Inspection of this DLL revealed that it was a PE32 executable. Updated the build script to copy C Runtime DLLs from the appropriate architecture directory based on the build architecture. Attempted running a 64 bit launcher in Windows Sandbox. NVDA starts but importing `wx` fails: ```log core failure Traceback (most recent call last): File "nvda.pyw", line 309, in <module> File "core.pyc", line 713, in main File "NVDAHelper\__init__.pyc", line 40, in <module> File "eventHandler.pyc", line 13, in <module> File "api.pyc", line 14, in <module> File "textInfos\__init__.pyc", line 31, in <module> File "locationHelper.pyc", line 12, in <module> File "wx\__init__.pyc", line 17, in <module> File "wx\core.pyc", line 12, in <module> File "<loader>", line 15, in <module> File "<loader>", line 13, in __load ImportError: (DLL load failed while importing _core: The specified module could not be found.) 'C:\\Users\\WDAGUtilityAccount\\AppData\\Local\\Temp\\nslFB31.tmp\\app\\wx._core.pyd' ``` After some investigation with [procmon](https://learn.microsoft.com/en-us/sysinternals/downloads/procmon) and [Dependencies](https://github.com/lucasg/Dependencies) I worked out that 64 bit wx requires `vcruntime140_1.dll`. Added `vcruntime140_1.dll` to the list of C Runtime DLLs to be included in the build. This is deleted if building for x86 as this file doesn't exist for the x86 runtime. I chose to go in this direction as this code is easier to remove when we drop x86 support. Testing strategy: Built x86 and x86_64 launchers and ran them in separate Windows Sandboxes. Known issues with pull request: None
Author
Parents
Loading