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 dc61191 + e4146eb commit 87a76a9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
25 changes: 25 additions & 0 deletions nvdaHelper/archBuild_sconscript
Expand Up @@ -26,6 +26,7 @@ Import(
TARGET_ARCH=env['TARGET_ARCH']
debug=env['nvdaHelperDebugFlags']
release=env['release']
signExec=env['signExec'] if env['certFile'] else None

#Some defines and includes for the environment
env.Append(CPPDEFINES=['UNICODE','_CRT_SECURE_NO_DEPRECATE',('LOGLEVEL','${nvdaHelperLogLevel}'),('_WIN32_WINNT','_WIN32_WINNT_WINXP')])
Expand Down Expand Up @@ -66,50 +67,74 @@ if TARGET_ARCH=='x86':

ia2RPCStubs=env.SConscript('ia2_sconscript')
Export('ia2RPCStubs')
if signExec:
env.AddPostAction(ia2RPCStubs[0],[signExec])
env.Install(libInstallDir,ia2RPCStubs[0]) #proxy dll
if TARGET_ARCH=='x86':
env.Install(sourceTypelibDir,ia2RPCStubs[1]) #typelib

if TARGET_ARCH=='x86':
localLib=env.SConscript('local/sconscript')
Export('localLib')
if signExec:
env.AddPostAction(localLib[0],[signExec])
env.Install(libInstallDir,localLib)

clientLib=env.SConscript('client/sconscript')
Export('clientLib')
if signExec:
env.AddPostAction(clientLib[0],[signExec])
env.Install(clientInstallDir,clientLib)

minHookLib=env.SConscript('minHook/sconscript')
Export('minHookLib')
if signExec:
env.AddPostAction(minHookLib[0],[signExec])
env.Install(libInstallDir,minHookLib)

remoteLib=env.SConscript('remote/sconscript')
Export('remoteLib')
if signExec:
env.AddPostAction(remoteLib[0],[signExec])
env.Install(libInstallDir,remoteLib)

if TARGET_ARCH=='x86_64':
remoteLoaderProgram=env.SConscript('remoteLoader/sconscript')
if signExec:
env.AddPostAction(remoteLoaderProgram,[signExec])
env.Install(libInstallDir,remoteLoaderProgram)

vbufBaseStaticLib=env.SConscript('vbufBase/sconscript')
Export('vbufBaseStaticLib')

adobeAcrobatVBufBackend=env.SConscript('vbufBackends/adobeAcrobat/sconscript')
if signExec:
env.AddPostAction(adobeAcrobatVBufBackend[0],[signExec])
env.Install(libInstallDir,adobeAcrobatVBufBackend)

adobeFlashVBufBackend=env.SConscript('vbufBackends/adobeFlash/sconscript')
if signExec:
env.AddPostAction(adobeFlashVBufBackend[0],[signExec])
env.Install(libInstallDir,adobeFlashVBufBackend)

lotusNotesRichTextVBufBackend=env.SConscript('vbufBackends/lotusNotesRichText/sconscript')
if signExec:
env.AddPostAction(lotusNotesRichTextVBufBackend[0],[signExec])
env.Install(libInstallDir,lotusNotesRichTextVBufBackend)

geckoVBufBackend=env.SConscript('vbufBackends/gecko_ia2/sconscript')
if signExec:
env.AddPostAction(geckoVBufBackend[0],[signExec])
env.Install(libInstallDir,geckoVBufBackend)

mshtmlVBufBackend=env.SConscript('vbufBackends/mshtml/sconscript')
if signExec:
env.AddPostAction(mshtmlVBufBackend[0],[signExec])
env.Install(libInstallDir,mshtmlVBufBackend)

webKitVBufBackend=env.SConscript('vbufBackends/webKit/sconscript')
if signExec:
env.AddPostAction(webKitVBufBackend[0],[signExec])
env.Install(libInstallDir,webKitVBufBackend)

if TARGET_ARCH=='x86':
Expand Down
18 changes: 10 additions & 8 deletions sconstruct
Expand Up @@ -112,6 +112,16 @@ outFilePrefix = "nvda{type}_{version}".format(type="" if release else "_snapshot
outputDir=Dir(env['outputDir'])
devDocsOutputDir=outputDir.Dir('devDocs')

# An action to sign an executable with certFile.
signExec = ["signtool", "sign", "/f", certFile]
if certPassword:
signExec.extend(("/p", certPassword))
if certTimestampServer:
signExec.extend(("/t", certTimestampServer))
signExec.append("$TARGET")
#Export via scons environment so other libraries can be signed
env['signExec']=signExec

#architecture-specific environments
archTools=['default','windowsSdk','midl','msrpc']
env32=env.Clone(TARGET_ARCH='x86',tools=archTools)
Expand Down Expand Up @@ -247,14 +257,6 @@ def ZipArchiveAction(target, source, env):

env["BUILDERS"]["ZipArchive"] = Builder(action=ZipArchiveAction)

# An action to sign an executable with certFile.
signExec = ["signtool", "sign", "/f", certFile]
if certPassword:
signExec.extend(("/p", certPassword))
if certTimestampServer:
signExec.extend(("/t", certTimestampServer))
signExec.append("$TARGET")

uninstFile=File("dist/uninstall.exe")
uninstGen = env.Command(File("uninstaller/uninstGen.exe"), "uninstaller/uninst.nsi",
[[makensis, "/V2",
Expand Down

0 comments on commit 87a76a9

Please sign in to comment.