OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Entry point for both build and try bots | 6 """Entry point for both build and try bots |
7 | 7 |
8 This script is invoked from XXX, usually without arguments | 8 This script is invoked from XXX, usually without arguments |
9 to package an SDK. It automatically determines whether | 9 to package an SDK. It automatically determines whether |
10 this SDK is for mac, win, linux. | 10 this SDK is for mac, win, linux. |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 if not os.path.exists(os.path.join(pepperdir, 'toolchain')): | 394 if not os.path.exists(os.path.join(pepperdir, 'toolchain')): |
395 ErrorExit('Examples depend on missing toolchains.') | 395 ErrorExit('Examples depend on missing toolchains.') |
396 exampledir = os.path.join(pepperdir, 'examples') | 396 exampledir = os.path.join(pepperdir, 'examples') |
397 RemoveDir(exampledir) | 397 RemoveDir(exampledir) |
398 MakeDir(exampledir) | 398 MakeDir(exampledir) |
399 AddMakeBat(exampledir) | 399 AddMakeBat(exampledir) |
400 for filename in files: | 400 for filename in files: |
401 oshelpers.Copy(['-v', os.path.join(SDK_EXAMPLE_DIR, filename), exampledir]) | 401 oshelpers.Copy(['-v', os.path.join(SDK_EXAMPLE_DIR, filename), exampledir]) |
402 for example in examples: | 402 for example in examples: |
403 CopyDir(os.path.join(SDK_EXAMPLE_DIR, example), exampledir) | 403 CopyDir(os.path.join(SDK_EXAMPLE_DIR, example), exampledir) |
| 404 AddMakeBat(exampledir) |
404 | 405 |
405 | 406 |
406 def BuildUpdater(): | 407 def BuildUpdater(): |
407 BuildStep('Create Updater') | 408 BuildStep('Create Updater') |
408 tooldir = os.path.join(SRC_DIR, 'out', 'sdk_tools') | 409 tooldir = os.path.join(SRC_DIR, 'out', 'sdk_tools') |
409 sdkupdate = os.path.join(SDK_SRC_DIR, 'build_tools', 'sdk_tools', 'sdk_update.
py') | 410 sdkupdate = os.path.join(SDK_SRC_DIR, 'build_tools', 'sdk_tools', 'sdk_update.
py') |
410 license = os.path.join(SDK_SRC_DIR, 'LICENSE') | 411 license = os.path.join(SDK_SRC_DIR, 'LICENSE') |
411 RemoveDir(tooldir) | 412 RemoveDir(tooldir) |
412 MakeDir(tooldir) | 413 MakeDir(tooldir) |
413 args = ['-v', sdkupdate, license, CYGTAR, tooldir] | 414 args = ['-v', sdkupdate, license, CYGTAR, tooldir] |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 | 520 |
520 # Build SDK Tools | 521 # Build SDK Tools |
521 # if not skip_update: | 522 # if not skip_update: |
522 # BuildUpdater() | 523 # BuildUpdater() |
523 | 524 |
524 return 0 | 525 return 0 |
525 | 526 |
526 | 527 |
527 if __name__ == '__main__': | 528 if __name__ == '__main__': |
528 sys.exit(main(sys.argv)) | 529 sys.exit(main(sys.argv)) |
OLD | NEW |