Commit 77d34a84 authored by Tarek Ziadé's avatar Tarek Ziadé

search in the alternative location for VCExpress

parent e8fce7b3
...@@ -38,6 +38,7 @@ HKEYS = (_winreg.HKEY_USERS, ...@@ -38,6 +38,7 @@ HKEYS = (_winreg.HKEY_USERS,
_winreg.HKEY_CLASSES_ROOT) _winreg.HKEY_CLASSES_ROOT)
VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
VSEXPRESS_BASE = r"Software\Microsoft\VCExpress\%0.1f"
WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
NET_BASE = r"Software\Microsoft\.NETFramework" NET_BASE = r"Software\Microsoft\.NETFramework"
...@@ -216,9 +217,18 @@ def find_vcvarsall(version): ...@@ -216,9 +217,18 @@ def find_vcvarsall(version):
productdir = Reg.get_value(r"%s\Setup\VC" % vsbase, productdir = Reg.get_value(r"%s\Setup\VC" % vsbase,
"productdir") "productdir")
except KeyError: except KeyError:
log.debug("Unable to find productdir in registry")
productdir = None productdir = None
# trying Express edition
if productdir is None:
vsbase = VSEXPRESS_BASE % version
try:
productdir = Reg.get_value(r"%s\Setup\VC" % vsbase,
"productdir")
except KeyError:
productdir = None
log.debug("Unable to find productdir in registry")
if not productdir or not os.path.isdir(productdir): if not productdir or not os.path.isdir(productdir):
toolskey = "VS%0.f0COMNTOOLS" % version toolskey = "VS%0.f0COMNTOOLS" % version
toolsdir = os.environ.get(toolskey, None) toolsdir = os.environ.get(toolskey, None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment