From c05c81683375eae29c0b90321acb8f4c1ba71072 Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Mon, 24 Jun 2019 12:03:27 +1000 Subject: [PATCH 1/2] sconstruct: after running py2exe, copy a fresh version of python37.dll into dist as Py2exe currently corrupts the dll's certificate by trying to add a string resource. --- sconstruct | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sconstruct b/sconstruct index 17593694840..ca502123718 100755 --- a/sconstruct +++ b/sconstruct @@ -17,6 +17,7 @@ import os import time from glob import glob import sourceEnv +from py2exe.dllfinder import pydll import importlib.util def recursiveCopy(env,targetDir,sourceDir): @@ -262,6 +263,11 @@ def NVDADistGenerator(target, source, env, for_signature): action.append(buildCmd) + # Python3 has started signing its main python dll. + # However, Pytexe currently tries to add a string resource to it, invalidating the signature and possibly currupting the certificate. + # Therefore, copy a fresh version of the dll one more time once py2exe has completed. + action.append(Copy(target[0],pydll)) + 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)) From 7517cbd37219bae94ae7ae331b96cde7183d0bac Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Mon, 24 Jun 2019 16:32:31 +1000 Subject: [PATCH 2/2] Sconstruct: Fix typo in comment. --- sconstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sconstruct b/sconstruct index ca502123718..674413b2b91 100755 --- a/sconstruct +++ b/sconstruct @@ -264,7 +264,7 @@ def NVDADistGenerator(target, source, env, for_signature): action.append(buildCmd) # Python3 has started signing its main python dll. - # However, Pytexe currently tries to add a string resource to it, invalidating the signature and possibly currupting the certificate. + # However, Py2exe currently tries to add a string resource to it, invalidating the signature and possibly currupting the certificate. # Therefore, copy a fresh version of the dll one more time once py2exe has completed. action.append(Copy(target[0],pydll))