*Rename source/generate.py to source/generateComInterfaces.py, as that is all this file does now.
*NVDA's root sconstruct: generate comtypes COM interfaces in source/comInterfaces with the help of generateComInterfaces.py.
*source/setup.py: no longer call generate.py.
\r
env.Depends(sourceDir,userDocsDir)\r
\r
+#Generate all needed comtypes COM interfaces\r
+comInterfaces=env.Command(sourceDir.Dir('comInterfaces'),None,[['cd',sourceDir.path,'&&',sys.executable,'generateComInterfaces.py']])\r
+env.AlwaysBuild(comInterfaces)\r
+env.Depends(comInterfaces,sourceDir.Dir('typelibs'))\r
+\r
+\r
# A builder to generate an NVDA distribution.\r
def NVDADistGenerator(target, source, env, for_signature):\r
buildCmd = ["cd", source[0].path, "&&",\r
import sys\r
sys.modules['comtypes.gen']=comtypes.gen=__import__("comInterfaces",globals(),locals(),[])\r
\r
-import os\r
-from glob import glob\r
-\r
COM_INTERFACES = (\r
("UI Automation", comtypes.client.GetModule, "UIAutomationCore.dll"),\r
("IAccessible 2", comtypes.client.GetModule, "typelibs/ia2.tlb"),\r
class py2exe(build_exe.py2exe):\r
"""Overridden py2exe command to:\r
* Add a command line option --enable-uiAccess to enable uiAccess for the main executable\r
- * Run generate.py first\r
* Add additional files, including those generated by generate.py, to the data files list\r
* Don't copy w9xpopen, as NVDA will never run on Win9x\r
"""\r
self.enable_uiAccess = False\r
\r
def run(self):\r
- # Run generate.py.\r
- import generate\r
- generate.main()\r
# Add the files just generated.\r
compiledModExtention=getModuleExtention(imp.PY_COMPILED)\r
sourceModExtention=getModuleExtention(imp.PY_SOURCE)\r