summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-04 15:54:13 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-04 15:54:13 (GMT)
commit52ca6cc9c88323485938617d2b1cebbc9ca5f70f (patch)
treeab782fc8883b5d8cb4cfb401d319f2e527c31e34
parentd0764e2bd15d5900b73ec3d4b54fb2b45a3006f0 (diff)
downloadcpython-52ca6cc9c88323485938617d2b1cebbc9ca5f70f.zip
cpython-52ca6cc9c88323485938617d2b1cebbc9ca5f70f.tar.gz
cpython-52ca6cc9c88323485938617d2b1cebbc9ca5f70f.tar.bz2
Merged revisions 59321-59322 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r59322 | christian.heimes | 2007-12-04 16:52:14 +0100 (Tue, 04 Dec 2007) | 1 line Added VS 2005 and VS 2008 to the search path for cabarc.exe ........
-rw-r--r--Tools/msi/msilib.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/Tools/msi/msilib.py b/Tools/msi/msilib.py
index 8a232bf..47a47c6 100644
--- a/Tools/msi/msilib.py
+++ b/Tools/msi/msilib.py
@@ -376,14 +376,19 @@ class CAB:
except OSError:
pass
for k, v in [(r"Software\Microsoft\VisualStudio\7.1\Setup\VS", "VS7CommonBinDir"),
- (r"Software\Microsoft\Win32SDK\Directories", "Install Dir")]:
+ (r"Software\Microsoft\VisualStudio\8.0\Setup\VS", "VS7CommonBinDir"),
+ (r"Software\Microsoft\VisualStudio\9.0\Setup\VS", "VS7CommonBinDir"),
+ (r"Software\Microsoft\Win32SDK\Directories", "Install Dir"),
+ ]:
try:
key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, k)
- except WindowsError:
+ dir = _winreg.QueryValueEx(key, v)[0]
+ _winreg.CloseKey(key)
+ except (WindowsError, IndexError):
+ continue
+ cabarc = os.path.join(dir, r"Bin", "cabarc.exe")
+ if not os.path.exists(cabarc):
continue
- cabarc = os.path.join(_winreg.QueryValueEx(key, v)[0], r"Bin", "cabarc.exe")
- _winreg.CloseKey(key)
- if not os.path.exists(cabarc):continue
break
else:
print("WARNING: cabarc.exe not found in registry")