From 1b468f5d035b509cafbb5962f1ea10948e9241fb Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Wed, 11 May 2011 17:42:27 +1000 Subject: [PATCH] SCons will now build IAccessible2 and acrobatAccess typelibs itself from their respective idl files, thus its no longer necessary to download ia2.tlb or acrobatAccess.tlb from nvda-project.org. SCons will now also build iaccessible2proxy.dll (for both 32 and 64 bit) from the idl file, thus it is no longer necesary to download these proxy dlls from nvda-project.org. --- nvdaHelper/acrobatAccess_sconscript | 6 ++---- nvdaHelper/archBuild_sconscript | 6 ++++++ nvdaHelper/ia2_sconscript | 13 +++++++++---- nvdaHelper/remote/sconscript | 2 +- nvdaHelper/vbufBackends/adobeAcrobat/sconscript | 2 +- nvdaHelper/vbufBackends/gecko_ia2/sconscript | 2 +- readme.txt | 8 -------- sconstruct | 2 ++ 8 files changed, 22 insertions(+), 19 deletions(-) diff --git a/nvdaHelper/acrobatAccess_sconscript b/nvdaHelper/acrobatAccess_sconscript index 71878089d..2c4ab7c6c 100644 --- a/nvdaHelper/acrobatAccess_sconscript +++ b/nvdaHelper/acrobatAccess_sconscript @@ -17,8 +17,6 @@ Import('env') idlFile=env.Command("acrobatAccess.idl","#/include/acrobatAccess/acrobatAccess.idl",Copy("$TARGET","$SOURCE")) tlbFile,headerFile,iidSourceFile,proxySourceFile,dlldataSourceFile=env.TypeLibrary(source=idlFile) -iidObjFile=env.Object(iidSourceFile) -proxyObjFile=env.Object(proxySourceFile) -dlldataObjFile=env.Object(dlldataSourceFile) -Return(['tlbFile','headerFile','iidObjFile','proxyObjFile','dlldataObjFile']) +Return(['tlbFile','headerFile','iidSourceFile']) + diff --git a/nvdaHelper/archBuild_sconscript b/nvdaHelper/archBuild_sconscript index 0dfa76323..1ce074dbb 100644 --- a/nvdaHelper/archBuild_sconscript +++ b/nvdaHelper/archBuild_sconscript @@ -15,6 +15,7 @@ Import( 'env', 'sourceDir', + 'sourceTypelibDir', 'libInstallDir', 'clientInstallDir', ) @@ -52,9 +53,14 @@ Export('env') acrobatAccessRPCStubs=env.SConscript('acrobatAccess_sconscript') Export('acrobatAccessRPCStubs') +if TARGET_ARCH=='x86': + env.Install(sourceTypelibDir,acrobatAccessRPCStubs[0]) #typelib ia2RPCStubs=env.SConscript('ia2_sconscript') Export('ia2RPCStubs') +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') diff --git a/nvdaHelper/ia2_sconscript b/nvdaHelper/ia2_sconscript index 4a67cbf1d..80785b84c 100644 --- a/nvdaHelper/ia2_sconscript +++ b/nvdaHelper/ia2_sconscript @@ -17,8 +17,13 @@ Import('env') idlFile=env.Command("ia2.idl","#/include/ia2/ia2.idl",Copy("$TARGET","$SOURCE")) tlbFile,headerFile,iidSourceFile,proxySourceFile,dlldataSourceFile=env.TypeLibrary(source=idlFile) -iidObjFile=env.Object(iidSourceFile) -proxyObjFile=env.Object(proxySourceFile) -dlldataObjFile=env.Object(dlldataSourceFile) -Return(['tlbFile','headerFile','iidObjFile','proxyObjFile','dlldataObjFile']) +proxyDll=env.SharedLibrary( + target='IAccessible2Proxy', + source=[iidSourceFile,proxySourceFile,dlldataSourceFile], + LIBS=['rpcrt4','oleaut32','ole32'], + CPPDEFINES=[env['CPPDEFINES'],'WIN32','REGISTER_PROXY_DLL'], + LINKFLAGS=[env['LINKFLAGS'],'/export:DllGetClassObject,private'], +) + +Return(['proxyDll','tlbFile','headerFile','iidSourceFile','proxySourceFile','dlldataSourceFile']) diff --git a/nvdaHelper/remote/sconscript b/nvdaHelper/remote/sconscript index 25195f3d0..4c01be6cf 100644 --- a/nvdaHelper/remote/sconscript +++ b/nvdaHelper/remote/sconscript @@ -74,7 +74,7 @@ remoteLib=env.SharedLibrary( "ia2Support.cpp", "ia2LiveRegions.cpp", ia2utilsObj, - ia2RPCStubs[2], + env.Object('_ia2_i',ia2RPCStubs[3]), "rpcSrv.cpp", "vbufRemote.cpp", vbufRPCServerSource, diff --git a/nvdaHelper/vbufBackends/adobeAcrobat/sconscript b/nvdaHelper/vbufBackends/adobeAcrobat/sconscript index df7cf1943..3034f8d89 100644 --- a/nvdaHelper/vbufBackends/adobeAcrobat/sconscript +++ b/nvdaHelper/vbufBackends/adobeAcrobat/sconscript @@ -22,7 +22,7 @@ adobeAcrobatBackendLib=env.SharedLibrary( target="VBufBackend_adobeAcrobat", source=[ "adobeAcrobat.cpp", - acrobatAccessRPCStubs[2], + env.Object('_acrobatAccess_i',acrobatAccessRPCStubs[2]), ], LIBS=[ vbufBaseStaticLib, diff --git a/nvdaHelper/vbufBackends/gecko_ia2/sconscript b/nvdaHelper/vbufBackends/gecko_ia2/sconscript index b2c29e642..ef5921372 100644 --- a/nvdaHelper/vbufBackends/gecko_ia2/sconscript +++ b/nvdaHelper/vbufBackends/gecko_ia2/sconscript @@ -25,7 +25,7 @@ geckoBackendLib=env.SharedLibrary( source=[ "gecko_ia2.cpp", ia2utilsObj, - ia2RPCStubs[2], + env.Object('_ia2_i',ia2RPCStubs[3]), ], LIBS=[ vbufBaseStaticLib, diff --git a/readme.txt b/readme.txt index 8cec751c4..19d272048 100644 --- a/readme.txt +++ b/readme.txt @@ -21,11 +21,6 @@ General dependencies: * Extract the archive into the source\synthDrivers directory. * IAccessible2, version 1.1.0.0 or later: http://www.linuxfoundation.org/en/Accessibility/IAccessible2 * Download the merged IDL and copy it to include\ia2\ia2.idl. - * The proxy dll and typelib are also required. - * Pre-built versions have been provided for convenience at http://www.nvda-project.org/3rdParty/ - * Copy ia2.tlb into the source\typelibs directory. - * Copy the 32 bit version of the proxy dll into the source\lib directory, naming it IAccessible2Proxy.dll. - * Copy the 64 bit version of the proxy dll into the source\lib64 directory, naming it IAccessible2Proxy.dll. * ConfigObj, version 4.6.0 or later: * Web site: http://www.voidspace.org.uk/python/configobj.html * Copy configobj.py and validate.py into the global Python site-packages directory. @@ -45,9 +40,6 @@ General dependencies: * This can be found in the client files archive available from http://www.adobe.com/devnet/acrobat/interapplication_communication.html * The archive is named something like Acrobat_Accessibility_9.1.zip. * Extract the AcrobatAccess.idl file into include\AcrobatAccess. - * The typelib is also required. - * A pre-built version has been provided for convenience at http://www.nvda-project.org/3rdParty/AcrobatAccess.tlb - * Copy AcrobatAccess.tlb into the source\typelibs directory. * Adobe FlashAccessibility interface typelib: http://www.nvda-project.org/3rdParty/FlashAccessibility.tlb * Copy FlashAccessibility.tlb into the source\typelibs directory. * txt2tags, version 2.5 or later: http://txt2tags.sourceforge.net/ diff --git a/sconstruct b/sconstruct index e43c5cc56..33e3945a1 100755 --- a/sconstruct +++ b/sconstruct @@ -98,6 +98,8 @@ clientDir=Dir('extras/controllerClient') Export('clientDir') sourceLibDir=sourceDir.Dir('lib') Export('sourceLibDir') +sourceTypelibDir=sourceDir.Dir('typelibs') +Export('sourceTypelibDir') sourceLibDir64=sourceDir.Dir('lib64') Export('sourceLibDir64') buildDir = Dir("build") -- 2.11.0