OLD | NEW |
1 # | 1 # |
2 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The S
Cons Foundation | 2 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The S
Cons Foundation |
3 # | 3 # |
4 # Permission is hereby granted, free of charge, to any person obtaining | 4 # Permission is hereby granted, free of charge, to any person obtaining |
5 # a copy of this software and associated documentation files (the | 5 # a copy of this software and associated documentation files (the |
6 # "Software"), to deal in the Software without restriction, including | 6 # "Software"), to deal in the Software without restriction, including |
7 # without limitation the rights to use, copy, modify, merge, publish, | 7 # without limitation the rights to use, copy, modify, merge, publish, |
8 # distribute, sublicense, and/or sell copies of the Software, and to | 8 # distribute, sublicense, and/or sell copies of the Software, and to |
9 # permit persons to whom the Software is furnished to do so, subject to | 9 # permit persons to whom the Software is furnished to do so, subject to |
10 # the following conditions: | 10 # the following conditions: |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 msg = "Unrecognized host architecture %s" | 121 msg = "Unrecognized host architecture %s" |
122 raise ValueError(msg % repr(host_platform)) | 122 raise ValueError(msg % repr(host_platform)) |
123 | 123 |
124 try: | 124 try: |
125 target = _ARCH_TO_CANONICAL[target_platform.lower()] | 125 target = _ARCH_TO_CANONICAL[target_platform.lower()] |
126 except KeyError, e: | 126 except KeyError, e: |
127 raise ValueError("Unrecognized target architecture %s" % target_platform
) | 127 raise ValueError("Unrecognized target architecture %s" % target_platform
) |
128 | 128 |
129 return (host, target,req_target_platform) | 129 return (host, target,req_target_platform) |
130 | 130 |
131 _VCVER = ["10.0", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"] | 131 _VCVER = ["12.0", "10.0", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"] |
132 | 132 |
133 _VCVER_TO_PRODUCT_DIR = { | 133 _VCVER_TO_PRODUCT_DIR = { |
| 134 '12.0': [ |
| 135 r'Microsoft\VisualStudio\12.0\Setup\VC\ProductDir'], |
134 '10.0': [ | 136 '10.0': [ |
135 r'Microsoft\VisualStudio\10.0\Setup\VC\ProductDir'], | 137 r'Microsoft\VisualStudio\10.0\Setup\VC\ProductDir'], |
136 '9.0': [ | 138 '9.0': [ |
137 r'Microsoft\VisualStudio\9.0\Setup\VC\ProductDir'], | 139 r'Microsoft\VisualStudio\9.0\Setup\VC\ProductDir'], |
138 '9.0Exp' : [ | 140 '9.0Exp' : [ |
139 r'Microsoft\VCExpress\9.0\Setup\VC\ProductDir'], | 141 r'Microsoft\VCExpress\9.0\Setup\VC\ProductDir'], |
140 '8.0': [ | 142 '8.0': [ |
141 r'Microsoft\VisualStudio\8.0\Setup\VC\ProductDir'], | 143 r'Microsoft\VisualStudio\8.0\Setup\VC\ProductDir'], |
142 '8.0Exp': [ | 144 '8.0Exp': [ |
143 r'Microsoft\VCExpress\8.0\Setup\VC\ProductDir'], | 145 r'Microsoft\VCExpress\8.0\Setup\VC\ProductDir'], |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 for k, v in d.items(): | 449 for k, v in d.items(): |
448 debug('vc.py:msvc_setup_env() env:%s -> %s'%(k,v)) | 450 debug('vc.py:msvc_setup_env() env:%s -> %s'%(k,v)) |
449 env.PrependENVPath(k, v, delete_existing=True) | 451 env.PrependENVPath(k, v, delete_existing=True) |
450 | 452 |
451 def msvc_exists(version=None): | 453 def msvc_exists(version=None): |
452 vcs = cached_get_installed_vcs() | 454 vcs = cached_get_installed_vcs() |
453 if version is None: | 455 if version is None: |
454 return len(vcs) > 0 | 456 return len(vcs) > 0 |
455 return version in vcs | 457 return version in vcs |
456 | 458 |
OLD | NEW |