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

Side by Side Diff: pylib/gyp/generator/msvs.py

Issue 2100453003: msvs: Allow target platform version without WinRT (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 4 years, 6 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
« 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) 2012 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 import copy 5 import copy
6 import ntpath 6 import ntpath
7 import os 7 import os
8 import posixpath 8 import posixpath
9 import re 9 import re
10 import subprocess 10 import subprocess
(...skipping 2650 matching lines...) Expand 10 before | Expand all | Expand 10 after
2661 ['Keyword', 'Win32Proj'], 2661 ['Keyword', 'Win32Proj'],
2662 ['RootNamespace', namespace], 2662 ['RootNamespace', namespace],
2663 ['IgnoreWarnCompileDuplicatedFilename', 'true'], 2663 ['IgnoreWarnCompileDuplicatedFilename', 'true'],
2664 ] 2664 ]
2665 ] 2665 ]
2666 2666
2667 if os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or \ 2667 if os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or \
2668 os.environ.get('PROCESSOR_ARCHITEW6432') == 'AMD64': 2668 os.environ.get('PROCESSOR_ARCHITEW6432') == 'AMD64':
2669 properties[0].append(['PreferredToolArchitecture', 'x64']) 2669 properties[0].append(['PreferredToolArchitecture', 'x64'])
2670 2670
2671 if spec.get('msvs_target_platform_version'):
2672 target_platform_version = spec.get('msvs_target_platform_version')
2673 properties[0].append(['WindowsTargetPlatformVersion',
2674 target_platform_version])
2675 if spec.get('msvs_target_platform_minversion'):
2676 target_platform_minversion = spec.get('msvs_target_platform_minversion')
2677 properties[0].append(['WindowsTargetPlatformMinVersion',
2678 target_platform_minversion])
2679 else:
2680 properties[0].append(['WindowsTargetPlatformMinVersion',
2681 target_platform_version])
2682
2671 if spec.get('msvs_enable_winrt'): 2683 if spec.get('msvs_enable_winrt'):
2672 properties[0].append(['DefaultLanguage', 'en-US']) 2684 properties[0].append(['DefaultLanguage', 'en-US'])
2673 properties[0].append(['AppContainerApplication', 'true']) 2685 properties[0].append(['AppContainerApplication', 'true'])
2674 if spec.get('msvs_application_type_revision'): 2686 if spec.get('msvs_application_type_revision'):
2675 app_type_revision = spec.get('msvs_application_type_revision') 2687 app_type_revision = spec.get('msvs_application_type_revision')
2676 properties[0].append(['ApplicationTypeRevision', app_type_revision]) 2688 properties[0].append(['ApplicationTypeRevision', app_type_revision])
2677 else: 2689 else:
2678 properties[0].append(['ApplicationTypeRevision', '8.1']) 2690 properties[0].append(['ApplicationTypeRevision', '8.1'])
2679
2680 if spec.get('msvs_target_platform_version'):
2681 target_platform_version = spec.get('msvs_target_platform_version')
2682 properties[0].append(['WindowsTargetPlatformVersion',
2683 target_platform_version])
2684 if spec.get('msvs_target_platform_minversion'):
2685 target_platform_minversion = spec.get('msvs_target_platform_minversion')
2686 properties[0].append(['WindowsTargetPlatformMinVersion',
2687 target_platform_minversion])
2688 else:
2689 properties[0].append(['WindowsTargetPlatformMinVersion',
2690 target_platform_version])
2691 if spec.get('msvs_enable_winphone'): 2691 if spec.get('msvs_enable_winphone'):
2692 properties[0].append(['ApplicationType', 'Windows Phone']) 2692 properties[0].append(['ApplicationType', 'Windows Phone'])
2693 else: 2693 else:
2694 properties[0].append(['ApplicationType', 'Windows Store']) 2694 properties[0].append(['ApplicationType', 'Windows Store'])
2695 2695
2696 platform_name = None 2696 platform_name = None
2697 msvs_windows_sdk_version = None 2697 msvs_windows_sdk_version = None
2698 for configuration in spec['configurations'].itervalues(): 2698 for configuration in spec['configurations'].itervalues():
2699 platform_name = platform_name or _ConfigPlatform(configuration) 2699 platform_name = platform_name or _ConfigPlatform(configuration)
2700 msvs_windows_sdk_version = (msvs_windows_sdk_version or 2700 msvs_windows_sdk_version = (msvs_windows_sdk_version or
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
3490 action_spec.extend( 3490 action_spec.extend(
3491 # TODO(jeanluc) 'Document' for all or just if as_sources? 3491 # TODO(jeanluc) 'Document' for all or just if as_sources?
3492 [['FileType', 'Document'], 3492 [['FileType', 'Document'],
3493 ['Command', command], 3493 ['Command', command],
3494 ['Message', description], 3494 ['Message', description],
3495 ['Outputs', outputs] 3495 ['Outputs', outputs]
3496 ]) 3496 ])
3497 if additional_inputs: 3497 if additional_inputs:
3498 action_spec.append(['AdditionalInputs', additional_inputs]) 3498 action_spec.append(['AdditionalInputs', additional_inputs])
3499 actions_spec.append(action_spec) 3499 actions_spec.append(action_spec)
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