| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 # | 6 # |
| 7 | 7 |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import shutil | 10 import shutil |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 metavar='[all,ia32,x64,simarm,arm,simmips,mips]', | 33 metavar='[all,ia32,x64,simarm,arm,simmips,mips]', |
| 34 default=utils.GuessArchitecture()) | 34 default=utils.GuessArchitecture()) |
| 35 result.add_option("--os", | 35 result.add_option("--os", |
| 36 help='Target OSs (comma-separated).', | 36 help='Target OSs (comma-separated).', |
| 37 metavar='[all,host,android]', | 37 metavar='[all,host,android]', |
| 38 default='host') | 38 default='host') |
| 39 result.add_option("-j", | 39 result.add_option("-j", |
| 40 help='The number of parallel jobs to run.', | 40 help='The number of parallel jobs to run.', |
| 41 metavar=HOST_CPUS, | 41 metavar=HOST_CPUS, |
| 42 default=str(HOST_CPUS)) | 42 default=str(HOST_CPUS)) |
| 43 (vs_directory, vs_executable) = utils.GuessVisualStudioPath() |
| 43 result.add_option("--devenv", | 44 result.add_option("--devenv", |
| 44 help='Path containing devenv.com on Windows', | 45 help='Path containing devenv.com on Windows', |
| 45 default='C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7' | 46 default=vs_directory) |
| 46 '\\IDE') | |
| 47 result.add_option("--executable", | 47 result.add_option("--executable", |
| 48 help='Name of the devenv.com/msbuild executable on Windows (varies for ' | 48 help='Name of the devenv.com/msbuild executable on Windows (varies for ' |
| 49 'different versions of Visual Studio)', default='devenv.com') | 49 'different versions of Visual Studio)', |
| 50 default=vs_executable) |
| 50 return result | 51 return result |
| 51 | 52 |
| 52 | 53 |
| 53 def ProcessOsOption(os): | 54 def ProcessOsOption(os): |
| 54 if os == 'host': | 55 if os == 'host': |
| 55 return HOST_OS | 56 return HOST_OS |
| 56 return os | 57 return os |
| 57 | 58 |
| 58 | 59 |
| 59 def ProcessOptions(options, args): | 60 def ProcessOptions(options, args): |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 process.wait() | 320 process.wait() |
| 320 if process.returncode != 0: | 321 if process.returncode != 0: |
| 321 print "BUILD FAILED" | 322 print "BUILD FAILED" |
| 322 return 1 | 323 return 1 |
| 323 | 324 |
| 324 return 0 | 325 return 0 |
| 325 | 326 |
| 326 | 327 |
| 327 if __name__ == '__main__': | 328 if __name__ == '__main__': |
| 328 sys.exit(Main()) | 329 sys.exit(Main()) |
| OLD | NEW |