Skip to content

Commit

Permalink
Merge branch 't4374' into next. Incubates #4374
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelDCurran committed Aug 12, 2014
2 parents ea8aa94 + 9c4b198 commit 1104960
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions sconstruct
Expand Up @@ -14,6 +14,7 @@

import sys
import os
import time
import _winreg
from glob import glob

Expand Down Expand Up @@ -113,12 +114,20 @@ outputDir=Dir(env['outputDir'])
devDocsOutputDir=outputDir.Dir('devDocs')

# An action to sign an executable with certFile.
signExec = ["signtool", "sign", "/f", certFile]
signExecCmd = ["signtool", "sign", "/f", certFile]
if certPassword:
signExec.extend(("/p", certPassword))
signExecCmd.extend(("/p", certPassword))
if certTimestampServer:
signExec.extend(("/t", certTimestampServer))
signExec.append("$TARGET")
signExecCmd.extend(("/t", certTimestampServer))
def signExec(target,source,env):
# #3795: signtool can quite commonly fail with timestamping, so allow it to try up to 3 times with a 1 second delay between each try.
res=0
for count in xrange(3):
res=env.Execute([signExecCmd+[target[0].abspath]])
if not res:
return 0 # success
time.sleep(1)
return res # failed
#Export via scons environment so other libraries can be signed
env['signExec']=signExec

Expand Down Expand Up @@ -205,8 +214,8 @@ def NVDADistGenerator(target, source, env, for_signature):
if env.get("uiAccess"):
buildCmd.append("--enable-uiAccess")
if certFile:
for prog in "nvda_noUIAccess", "nvda_uiAccess", "nvda_slave", "nvda_service", "nvda_eoaProxy":
action.append(signExec[:-1] + [os.path.join(target[0].path, "%s.exe" % prog)])
for prog in "nvda_noUIAccess.exe", "nvda_uiAccess.exe", "nvda_slave.exe", "nvda_service.exe":
action.append(lambda target,source,env: signExec([target[0].File(prog)],source,env))

for ext in "", "c", "o":
action.append(Delete(buildVersionFn + ext))
Expand Down

0 comments on commit 1104960

Please sign in to comment.