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

Side by Side Diff: build/vs_toolchain.py

Issue 306613002: Add support for VS express to the GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « build/config/win/visual_studio_version.gni ('k') | 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. 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 json 5 import json
6 import os 6 import os
7 import pipes 7 import pipes
8 import shutil 8 import shutil
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 'get_toolchain_if_necessary.py'), 134 'get_toolchain_if_necessary.py'),
135 '--output-json', json_data_file, 135 '--output-json', json_data_file,
136 ] + _GetDesiredVsToolchainHashes() 136 ] + _GetDesiredVsToolchainHashes()
137 subprocess.check_call(get_toolchain_args) 137 subprocess.check_call(get_toolchain_args)
138 138
139 return 0 139 return 0
140 140
141 141
142 def GetToolchainDir(): 142 def GetToolchainDir():
143 """Gets location information about the current toolchain (must have been 143 """Gets location information about the current toolchain (must have been
144 previously updated by 'update').""" 144 previously updated by 'update'). This is used for the GN build."""
145 SetEnvironmentAndGetRuntimeDllDirs() 145 SetEnvironmentAndGetRuntimeDllDirs()
146 print '["%s", "%s"]' % ( 146 print '''vs_path = "%s"
147 os.environ['GYP_MSVS_OVERRIDE_PATH'], os.environ['WINDOWSSDKDIR']) 147 sdk_path = "%s"
148 vs_version = "%s"
149 wdk_dir = "%s"
150 ''' % (
151 os.environ['GYP_MSVS_OVERRIDE_PATH'],
152 os.environ['WINDOWSSDKDIR'],
153 os.environ['GYP_MSVS_VERSION'],
154 os.environ['WDK_DIR'])
148 155
149 156
150 def main(): 157 def main():
151 if not sys.platform.startswith(('win32', 'cygwin')): 158 if not sys.platform.startswith(('win32', 'cygwin')):
152 return 0 159 return 0
153 commands = { 160 commands = {
154 'update': Update, 161 'update': Update,
155 'get_toolchain_dir': GetToolchainDir, 162 'get_toolchain_dir': GetToolchainDir,
156 # TODO(scottmg): Add copy_dlls for GN builds (gyp_chromium calls 163 # TODO(scottmg): Add copy_dlls for GN builds (gyp_chromium calls
157 # CopyVsRuntimeDlls via import, currently). 164 # CopyVsRuntimeDlls via import, currently).
158 } 165 }
159 if len(sys.argv) < 2 or sys.argv[1] not in commands: 166 if len(sys.argv) < 2 or sys.argv[1] not in commands:
160 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) 167 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands)
161 return 1 168 return 1
162 return commands[sys.argv[1]]() 169 return commands[sys.argv[1]]()
163 170
164 171
165 if __name__ == '__main__': 172 if __name__ == '__main__':
166 sys.exit(main()) 173 sys.exit(main())
OLDNEW
« no previous file with comments | « build/config/win/visual_studio_version.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698