OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, 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 """Tool for automating creation of a Dart bundle.""" | 8 """Tool for automating creation of a Dart bundle.""" |
9 | 9 |
10 import optparse | 10 import optparse |
(...skipping 13 matching lines...) Expand all Loading... |
24 self._top_dir = top_dir | 24 self._top_dir = top_dir |
25 self._dest = dest | 25 self._dest = dest |
26 self._verbose = verbose | 26 self._verbose = verbose |
27 self._skip_build = skip_build | 27 self._skip_build = skip_build |
28 self._os = utils.GuessOS() | 28 self._os = utils.GuessOS() |
29 self._release_build_root = utils.GetBuildRoot(self._os, mode='release', | 29 self._release_build_root = utils.GetBuildRoot(self._os, mode='release', |
30 arch='ia32') | 30 arch='ia32') |
31 self._debug_build_root = utils.GetBuildRoot(self._os, mode='debug', | 31 self._debug_build_root = utils.GetBuildRoot(self._os, mode='debug', |
32 arch='ia32') | 32 arch='ia32') |
33 self._dartc_build_root = utils.GetBuildRoot(self._os, mode='release', | 33 self._dartc_build_root = utils.GetBuildRoot(self._os, mode='release', |
34 arch='dartc') | 34 FOOBAR='dartc') |
35 | 35 |
36 @staticmethod | 36 @staticmethod |
37 def BuildOptions(): | 37 def BuildOptions(): |
38 """Make an option parser with the options supported by this tool. | 38 """Make an option parser with the options supported by this tool. |
39 | 39 |
40 Returns: | 40 Returns: |
41 A newly created OptionParser. | 41 A newly created OptionParser. |
42 """ | 42 """ |
43 op = optparse.OptionParser('usage: %prog [options]') | 43 op = optparse.OptionParser('usage: %prog [options]') |
44 op.add_option('-d', '--dest') | 44 op.add_option('-d', '--dest') |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 try: | 220 try: |
221 op = BundleMaker.BuildOptions() | 221 op = BundleMaker.BuildOptions() |
222 options = BundleMaker.CheckOptions(op, top_dir, cmd_line_args) | 222 options = BundleMaker.CheckOptions(op, top_dir, cmd_line_args) |
223 except utils.Error: | 223 except utils.Error: |
224 return 1 | 224 return 1 |
225 sys.exit(BundleMaker(**options).MakeBundle()) | 225 sys.exit(BundleMaker(**options).MakeBundle()) |
226 | 226 |
227 | 227 |
228 if __name__ == '__main__': | 228 if __name__ == '__main__': |
229 main() | 229 main() |
OLD | NEW |