vc.py (scons-4.2.0) | : | vc.py (SCons-4.3.0) | ||
---|---|---|---|---|
skipping to change at line 232 | skipping to change at line 232 | |||
all_archs = str(list(_ARCH_TO_CANONICAL.keys())) | all_archs = str(list(_ARCH_TO_CANONICAL.keys())) | |||
raise MSVCUnsupportedTargetArch( | raise MSVCUnsupportedTargetArch( | |||
"Unrecognized target architecture %s\n\tValid architectures: %s" | "Unrecognized target architecture %s\n\tValid architectures: %s" | |||
% (target_platform, all_archs) | % (target_platform, all_archs) | |||
) | ) | |||
return (host, target, req_target_platform) | return (host, target, req_target_platform) | |||
# If you update this, update SupportedVSList in Tool/MSCommon/vs.py, and the | # If you update this, update SupportedVSList in Tool/MSCommon/vs.py, and the | |||
# MSVC_VERSION documentation in Tool/msvc.xml. | # MSVC_VERSION documentation in Tool/msvc.xml. | |||
_VCVER = ["14.2", "14.1", "14.1Exp", "14.0", "14.0Exp", "12.0", "12.0Exp", "11.0 | _VCVER = [ | |||
", "11.0Exp", "10.0", "10.0Exp", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", " | "14.3", | |||
6.0"] | "14.2", | |||
"14.1", "14.1Exp", | ||||
"14.0", "14.0Exp", | ||||
"12.0", "12.0Exp", | ||||
"11.0", "11.0Exp", | ||||
"10.0", "10.0Exp", | ||||
"9.0", "9.0Exp", | ||||
"8.0", "8.0Exp", | ||||
"7.1", | ||||
"7.0", | ||||
"6.0"] | ||||
# if using vswhere, configure command line arguments to probe for installed VC e ditions | # if using vswhere, configure command line arguments to probe for installed VC e ditions | |||
_VCVER_TO_VSWHERE_VER = { | _VCVER_TO_VSWHERE_VER = { | |||
'14.3': [ | ||||
["-version", "[17.0, 18.0)"], # default: Enterprise, Professional, Comm | ||||
unity (order unpredictable?) | ||||
["-version", "[17.0, 18.0)", "-products", "Microsoft.VisualStudio.Produc | ||||
t.BuildTools"], # BuildTools | ||||
], | ||||
'14.2': [ | '14.2': [ | |||
["-version", "[16.0, 17.0)", ], # default: Enterprise, Professional, Com | ["-version", "[16.0, 17.0)"], # default: Enterprise, Professional, Comm | |||
munity (order unpredictable?) | unity (order unpredictable?) | |||
["-version", "[16.0, 17.0)", "-products", "Microsoft.VisualStudio.Produc | ["-version", "[16.0, 17.0)", "-products", "Microsoft.VisualStudio.Produc | |||
t.BuildTools"], # BuildTools | t.BuildTools"], # BuildTools | |||
], | ], | |||
'14.1': [ | '14.1': [ | |||
["-version", "[15.0, 16.0)", ], # default: Enterprise, Professional, Com | ["-version", "[15.0, 16.0)"], # default: Enterprise, Professional, Comm | |||
munity (order unpredictable?) | unity (order unpredictable?) | |||
["-version", "[15.0, 16.0)", "-products", "Microsoft.VisualStudio.Produc | ["-version", "[15.0, 16.0)", "-products", "Microsoft.VisualStudio.Produc | |||
t.BuildTools"], # BuildTools | t.BuildTools"], # BuildTools | |||
], | ], | |||
'14.1Exp': [ | '14.1Exp': [ | |||
["-version", "[15.0, 16.0)", "-products", "Microsoft.VisualStudio.Produc | ["-version", "[15.0, 16.0)", "-products", "Microsoft.VisualStudio.Produc | |||
t.WDExpress"], # Express | t.WDExpress"], # Express | |||
], | ], | |||
} | } | |||
_VCVER_TO_PRODUCT_DIR = { | _VCVER_TO_PRODUCT_DIR = { | |||
'14.3': [ | ||||
(SCons.Util.HKEY_LOCAL_MACHINE, r'')], # not set by this version | ||||
'14.2': [ | '14.2': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'')], # not set by this version | (SCons.Util.HKEY_LOCAL_MACHINE, r'')], # not set by this version | |||
'14.1': [ | '14.1': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'')], # not set by this version | (SCons.Util.HKEY_LOCAL_MACHINE, r'')], # not set by this version | |||
'14.1Exp': [ | '14.1Exp': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'')], # not set by this version | (SCons.Util.HKEY_LOCAL_MACHINE, r'')], # not set by this version | |||
'14.0' : [ | '14.0': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\14.0\Setup\VC\P roductDir')], | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\14.0\Setup\VC\P roductDir')], | |||
'14.0Exp' : [ | '14.0Exp': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\14.0\Setup\VC\Prod uctDir')], | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\14.0\Setup\VC\Prod uctDir')], | |||
'12.0' : [ | '12.0': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\12.0\Setup\VC\P roductDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\12.0\Setup\VC\P roductDir'), | |||
], | ], | |||
'12.0Exp' : [ | '12.0Exp': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\12.0\Setup\VC\Prod uctDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\12.0\Setup\VC\Prod uctDir'), | |||
], | ], | |||
'11.0': [ | '11.0': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\11.0\Setup\VC\P roductDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\11.0\Setup\VC\P roductDir'), | |||
], | ], | |||
'11.0Exp' : [ | '11.0Exp': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\11.0\Setup\VC\Prod uctDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\11.0\Setup\VC\Prod uctDir'), | |||
], | ], | |||
'10.0': [ | '10.0': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\10.0\Setup\VC\P roductDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\10.0\Setup\VC\P roductDir'), | |||
], | ], | |||
'10.0Exp' : [ | '10.0Exp': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\10.0\Setup\VC\Prod uctDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\10.0\Setup\VC\Prod uctDir'), | |||
], | ], | |||
'9.0': [ | '9.0': [ | |||
(SCons.Util.HKEY_CURRENT_USER, r'Microsoft\DevDiv\VCForPython\9.0\instal ldir',), | (SCons.Util.HKEY_CURRENT_USER, r'Microsoft\DevDiv\VCForPython\9.0\instal ldir',), | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\9.0\Setup\VC\Pr oductDir',), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\9.0\Setup\VC\Pr oductDir',), | |||
], | ], | |||
'9.0Exp' : [ | '9.0Exp': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\9.0\Setup\VC\Produ ctDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\9.0\Setup\VC\Produ ctDir'), | |||
], | ], | |||
'8.0': [ | '8.0': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\8.0\Setup\VC\Pr oductDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\8.0\Setup\VC\Pr oductDir'), | |||
], | ], | |||
'8.0Exp': [ | '8.0Exp': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\8.0\Setup\VC\Produ ctDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VCExpress\8.0\Setup\VC\Produ ctDir'), | |||
], | ], | |||
'7.1': [ | '7.1': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\7.1\Setup\VC\Pr oductDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\7.1\Setup\VC\Pr oductDir'), | |||
], | ], | |||
'7.0': [ | '7.0': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\7.0\Setup\VC\Pr oductDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\7.0\Setup\VC\Pr oductDir'), | |||
], | ], | |||
'6.0': [ | '6.0': [ | |||
(SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\6.0\Setup\Micro soft Visual C++\ProductDir'), | (SCons.Util.HKEY_LOCAL_MACHINE, r'Microsoft\VisualStudio\6.0\Setup\Micro soft Visual C++\ProductDir'), | |||
] | ] | |||
} | } | |||
def msvc_version_to_maj_min(msvc_version): | def msvc_version_to_maj_min(msvc_version): | |||
msvc_version_numeric = get_msvc_version_numeric(msvc_version) | msvc_version_numeric = get_msvc_version_numeric(msvc_version) | |||
t = msvc_version_numeric.split(".") | t = msvc_version_numeric.split(".") | |||
if not len(t) == 2: | if not len(t) == 2: | |||
raise ValueError("Unrecognized version %s (%s)" % (msvc_version,msvc_ver sion_numeric)) | raise ValueError("Unrecognized version %s (%s)" % (msvc_version,msvc_ver sion_numeric)) | |||
try: | try: | |||
maj = int(t[0]) | maj = int(t[0]) | |||
End of changes. 23 change blocks. | ||||
40 lines changed or deleted | 58 lines changed or added |