Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: pylib/gyp/MSVSVersion.py

Issue 11637025: Support overriding path to VS without referring to the registry. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: copyright year, yay. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2013 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Handle version information related to Visual Stuio.""" 5 """Handle version information related to Visual Stuio."""
6 6
7 import errno 7 import errno
8 import os 8 import os
9 import re 9 import re
10 import subprocess 10 import subprocess
11 import sys 11 import sys
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 'auto': ('10.0', '9.0', '8.0', '11.0'), 348 'auto': ('10.0', '9.0', '8.0', '11.0'),
349 '2005': ('8.0',), 349 '2005': ('8.0',),
350 '2005e': ('8.0',), 350 '2005e': ('8.0',),
351 '2008': ('9.0',), 351 '2008': ('9.0',),
352 '2008e': ('9.0',), 352 '2008e': ('9.0',),
353 '2010': ('10.0',), 353 '2010': ('10.0',),
354 '2010e': ('10.0',), 354 '2010e': ('10.0',),
355 '2012': ('11.0',), 355 '2012': ('11.0',),
356 '2012e': ('11.0',), 356 '2012e': ('11.0',),
357 } 357 }
358 override_path = os.environ.get('GYP_MSVS_OVERRIDE_PATH')
359 if override_path:
360 msvs_version = os.environ.get('GYP_MSVS_VERSION')
361 if not msvs_version or 'e' not in msvs_version:
362 raise ValueError('GYP_MSVS_OVERRIDE_PATH requires GYP_MSVS_VERSION to be '
363 'set to an "e" version (e.g. 2010e)')
364 return _CreateVersion(msvs_version, override_path, sdk_based=True)
358 version = str(version) 365 version = str(version)
359 versions = _DetectVisualStudioVersions(version_map[version], 'e' in version) 366 versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
360 if not versions: 367 if not versions:
361 if version == 'auto': 368 if version == 'auto':
362 # Default to 2005 if we couldn't find anything 369 # Default to 2005 if we couldn't find anything
363 return _CreateVersion('2005', None) 370 return _CreateVersion('2005', None)
364 else: 371 else:
365 return _CreateVersion(version, None) 372 return _CreateVersion(version, None)
366 return versions[0] 373 return versions[0]
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698