Skip to content
Browse files

Bundle Universal CRT libraries when creating NVDA distribution. (#10347)

This makes it again possible to use NVDA on clean installs of Windows versions older than Windows 10.
Fixes #10031
  • Loading branch information...
lukaszgo1 authored and michaelDCurran committed Oct 7, 2019
1 parent 49365d1 commit b40bc9e29f35872038b4cdb1be96ed35e4bec86d
Showing with 14 additions and 0 deletions.
  1. +14 −0 sconstruct
@@ -19,6 +19,7 @@ from glob import glob
import sourceEnv
from py2exe.dllfinder import pydll
import importlib.util
import winreg

def recursiveCopy(env,targetDir,sourceDir):
@@ -279,6 +280,19 @@ def NVDADistGenerator(target, source, env, for_signature):
# Therefore, copy a fresh version of the dll one more time once py2exe has completed.

# #10031: Apps written in Python 3 require Universal CRT to be installed. We cannot assume users have it on their systems.
# Therefore , copy required libraries from Windows 10 SDK.
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0', 0,winreg.KEY_READ|winreg.KEY_WOW64_32KEY) as SDKKey:
CRTDir = os.path.join(winreg.QueryValueEx(SDKKey, 'InstallationFolder')[0], "Redist", "ucrt", "DLLs", "x86")
except WindowsError:
raise RuntimeError("Windows 10 SDK not found")
if os.path.isdir(CRTDir):
with os.scandir(CRTDir) as dir:
for file in dir:
if".dll") and file.is_file():
action.append(Copy(target[0], file.path))

if certFile:
for prog in "nvda_noUIAccess.exe", "nvda_uiAccess.exe", "nvda_slave.exe", "nvda_eoaProxy.exe":
action.append(lambda target,source,env, progByVal=prog: signExec([target[0].File(progByVal)],source,env))

0 comments on commit b40bc9e

Please sign in to comment.
You can’t perform that action at this time.