[pywin32-checkins] pywin32/win32/scripts regsetup.py,1.11,1.12
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2005-02-13 12:16:26
|
Update of /cvsroot/pywin32/pywin32/win32/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5340 Modified Files: regsetup.py Log Message: Nuke the concept of registering a 'module' (should probably nuke this entire script) Index: regsetup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/regsetup.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** regsetup.py 15 Dec 2002 13:19:38 -0000 1.11 --- regsetup.py 13 Feb 2005 12:16:17 -0000 1.12 *************** *** 98,121 **** raise error, "The file %s can not be located for application %s" % (knownFileName, appName) - def FindRegisteredModule(moduleName, possibleRealNames, searchPaths): - """Find a registered module. - - First place looked is the registry for an existing entry. Then - the searchPaths are searched. - - Returns the full path to the .exe or None if the current registered entry is OK. - """ - import win32api, regutil, string - try: - fname = win32api.RegQueryValue(regutil.GetRootKey(), \ - regutil.BuildDefaultPythonKey() + "\\Modules\\%s" % moduleName) - - if FileExists(fname): - return None # Nothing extra needed - - except win32api.error: - pass - return LocateFileName(possibleRealNames, searchPaths) - def FindPythonExe(exeAlias, possibleRealNames, searchPaths): """Find an exe. --- 98,101 ---- *************** *** 299,315 **** regutil.RegisterNamedPath(appName, string.join(paths,";")) - def FindRegisterModule(modName, actualFileNames, searchPaths): - """Find and Register a module. - - Assumes the core registry setup correctly. - """ - import regutil - try: - fname = FindRegisteredModule(modName, actualFileNames, searchPaths) - if fname is not None: - regutil.RegisterModule(modName, fname) - except error, details: - print "*** ", details - def FindRegisterPythonExe(exeAlias, searchPaths, actualFileNames = None): """Find and Register a Python exe (not necessarily *the* python.exe) --- 279,282 ---- *************** *** 376,380 **** ver_str = hex(sys.hexversion)[2] + hex(sys.hexversion)[4] # pywintypes now has a .py stub - FindRegisterModule("pywintypes", "pywintypes%s%s.dll" % (ver_str, suffix), [".", win32api.GetSystemDirectory()]) regutil.RegisterNamedPath("win32",win32paths) --- 343,346 ---- *************** *** 419,424 **** FindRegisterPackage("pywin", "__init__.py", searchPaths, "Pythonwin") - # FindRegisterModule("win32ui", "win32ui%s.pyd" % suffix, searchPaths) - # FindRegisterModule("win32uiole", "win32uiole%s.pyd" % suffix, searchPaths) regutil.RegisterFileExtensions(defPyIcon=fnamePythonwin+",0", --- 385,388 ---- *************** *** 453,458 **** suffix = IsDebug() ver_str = hex(sys.hexversion)[2] + hex(sys.hexversion)[4] - # pythoncom now has a .py stub - FindRegisterModule("pythoncom", "pythoncom%s%s.dll" % (ver_str, suffix), [win32api.GetSystemDirectory(), '.']) usage = """\ --- 417,420 ---- *************** *** 592,603 **** print "Unregistering Pythonwin" UnregisterPythonwin() - if o=='-m': - import os - print "Registering module",a - FindRegisterModule(os.path.splitext(a)[0],a, searchPaths) - if o=='--umodule': - import os, regutil - print "Unregistering module",a - regutil.UnregisterModule(os.path.splitext(a)[0]) if o=='-p': print "Registering package", a --- 554,557 ---- |