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 24 matching lines...) Expand all Loading... |
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 result.add_option("--devenv", | 43 result.add_option("--devenv", |
44 help='Path containing devenv.com on Windows', | 44 help='Path containing devenv.com on Windows', |
45 default='C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7' | 45 default=utils.GuessVisualStudioPath()) |
46 '\\IDE') | |
47 result.add_option("--executable", | 46 result.add_option("--executable", |
48 help='Name of the devenv.com/msbuild executable on Windows (varies for ' | 47 help='Name of the devenv.com/msbuild executable on Windows (varies for ' |
49 'different versions of Visual Studio)', default='devenv.com') | 48 'different versions of Visual Studio)', default='devenv.com') |
50 return result | 49 return result |
51 | 50 |
52 | 51 |
53 def ProcessOsOption(os): | 52 def ProcessOsOption(os): |
54 if os == 'host': | 53 if os == 'host': |
55 return HOST_OS | 54 return HOST_OS |
56 return os | 55 return os |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 process.wait() | 318 process.wait() |
320 if process.returncode != 0: | 319 if process.returncode != 0: |
321 print "BUILD FAILED" | 320 print "BUILD FAILED" |
322 return 1 | 321 return 1 |
323 | 322 |
324 return 0 | 323 return 0 |
325 | 324 |
326 | 325 |
327 if __name__ == '__main__': | 326 if __name__ == '__main__': |
328 sys.exit(Main()) | 327 sys.exit(Main()) |
OLD | NEW |