OLD | NEW |
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 Loading... |
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 Loading... |
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()) |
OLD | NEW |