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

Side by Side Diff: win_toolchain/package_from_installed.py

Issue 1776283002: Let package_from_installed actually package the json files it now writes. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 9 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 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 """ 5 """
6 From a system-installed copy of the toolchain, packages all the required bits 6 From a system-installed copy of the toolchain, packages all the required bits
7 into a .zip file. 7 into a .zip file.
8 8
9 It assumes default install locations for tools, in particular: 9 It assumes default install locations for tools, in particular:
10 - C:\Program Files (x86)\Microsoft Visual Studio 12.0\... 10 - C:\Program Files (x86)\Microsoft Visual Studio 12.0\...
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 281
282 def AddEnvSetup(files): 282 def AddEnvSetup(files):
283 """We need to generate this file in the same way that the "from pieces" 283 """We need to generate this file in the same way that the "from pieces"
284 script does, so pull that in here.""" 284 script does, so pull that in here."""
285 tempdir = tempfile.mkdtemp() 285 tempdir = tempfile.mkdtemp()
286 os.makedirs(os.path.join(tempdir, 'win_sdk', 'bin')) 286 os.makedirs(os.path.join(tempdir, 'win_sdk', 'bin'))
287 GenerateSetEnvCmd(tempdir) 287 GenerateSetEnvCmd(tempdir)
288 files.append((os.path.join(tempdir, 'win_sdk', 'bin', 'SetEnv.cmd'), 288 files.append((os.path.join(tempdir, 'win_sdk', 'bin', 'SetEnv.cmd'),
289 'win_sdk\\bin\\SetEnv.cmd')) 289 'win_sdk\\bin\\SetEnv.cmd'))
290 files.append((os.path.join(tempdir, 'win_sdk', 'bin', 'SetEnv.x86.json'),
291 'win_sdk\\bin\\SetEnv.x86.json'))
292 files.append((os.path.join(tempdir, 'win_sdk', 'bin', 'SetEnv.x64.json'),
293 'win_sdk\\bin\\SetEnv.x64.json'))
290 vs_version_file = os.path.join(tempdir, 'VS_VERSION') 294 vs_version_file = os.path.join(tempdir, 'VS_VERSION')
291 with open(vs_version_file, 'wb') as version: 295 with open(vs_version_file, 'wb') as version:
292 print >>version, VS_VERSION 296 print >>version, VS_VERSION
293 files.append((vs_version_file, 'VS_VERSION')) 297 files.append((vs_version_file, 'VS_VERSION'))
294 298
295 299
296 def RenameToSha1(output): 300 def RenameToSha1(output):
297 """Determine the hash in the same way that the unzipper does to rename the 301 """Determine the hash in the same way that the unzipper does to rename the
298 # .zip file.""" 302 # .zip file."""
299 print 'Extracting to determine hash...' 303 print 'Extracting to determine hash...'
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 sys.stdout.write('\rWrote to %s.%s\n' % (output, ' '*50)) 385 sys.stdout.write('\rWrote to %s.%s\n' % (output, ' '*50))
382 sys.stdout.flush() 386 sys.stdout.flush()
383 387
384 RenameToSha1(output) 388 RenameToSha1(output)
385 389
386 return 0 390 return 0
387 391
388 392
389 if __name__ == '__main__': 393 if __name__ == '__main__':
390 sys.exit(main()) 394 sys.exit(main())
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