OLD | NEW |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 """This is the entry point to create Dart APIs from the IDL database.""" | 6 """This is the entry point to create Dart APIs from the IDL database.""" |
7 | 7 |
8 import dartgenerator | 8 import dartgenerator |
9 import database | 9 import database |
10 import fremontcutbuilder | 10 import fremontcutbuilder |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 | 197 |
198 _logger.info('Add documentation to generated classes.') | 198 _logger.info('Add documentation to generated classes.') |
199 html_to_json_script = os.path.relpath( | 199 html_to_json_script = os.path.relpath( |
200 '../../html_json_doc/bin/html_json_doc.dart', | 200 '../../html_json_doc/bin/html_json_doc.dart', |
201 current_dir) | 201 current_dir) |
202 html_output_dir = os.path.join(output_dir, 'dart2js/dart/html/') | 202 html_output_dir = os.path.join(output_dir, 'dart2js/dart/html/') |
203 svg_output_dir = os.path.join(output_dir, 'dart2js/dart/svg/') | 203 svg_output_dir = os.path.join(output_dir, 'dart2js/dart/svg/') |
204 html_json_path = os.path.relpath('../docs/html_docs.json') | 204 html_json_path = os.path.relpath('../docs/html_docs.json') |
205 svg_json_path = os.path.relpath('../docs/svg_docs.json') | 205 svg_json_path = os.path.relpath('../docs/svg_docs.json') |
206 | 206 |
207 path_to_dart = utils.DartBinary() | 207 path_to_dart = utils.DartSdkBinary() |
blois
2013/01/09 00:44:48
On second thought, it's probably OK to do this as
Andrei Mouravski
2013/01/09 15:33:45
So, LGTM?
On 2013/01/09 00:44:48, blois wrote:
| |
208 html_command = ' '.join([path_to_dart, html_to_json_script, | 208 html_command = ' '.join([path_to_dart, html_to_json_script, |
209 '--mode=json-to-html', html_output_dir, | 209 '--mode=json-to-html', html_output_dir, |
210 html_json_path]) | 210 html_json_path]) |
211 svg_command = ' '.join([path_to_dart, html_to_json_script, | 211 svg_command = ' '.join([path_to_dart, html_to_json_script, |
212 '--mode=json-to-html', svg_output_dir, svg_json_path]) | 212 '--mode=json-to-html', svg_output_dir, svg_json_path]) |
213 subprocess.call([html_command], shell=True) | 213 subprocess.call([html_command], shell=True) |
214 subprocess.call([svg_command], shell=True) | 214 subprocess.call([svg_command], shell=True) |
215 | 215 |
216 if 'htmldart2js' in systems: | 216 if 'htmldart2js' in systems: |
217 _logger.info('Generating dart2js single files.') | 217 _logger.info('Generating dart2js single files.') |
218 for library_name in _libraries: | 218 for library_name in _libraries: |
219 GenerateSingleFile( | 219 GenerateSingleFile( |
220 os.path.join(dart2js_output_dir, '%s_dart2js.dart' % library_name), | 220 os.path.join(dart2js_output_dir, '%s_dart2js.dart' % library_name), |
221 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dart2js')) | 221 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dart2js')) |
222 if 'htmldartium' in systems: | 222 if 'htmldartium' in systems: |
223 _logger.info('Generating dartium single files.') | 223 _logger.info('Generating dartium single files.') |
224 for library_name in _libraries: | 224 for library_name in _libraries: |
225 GenerateSingleFile( | 225 GenerateSingleFile( |
226 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), | 226 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), |
227 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) | 227 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) |
228 | 228 |
229 if __name__ == '__main__': | 229 if __name__ == '__main__': |
230 sys.exit(main()) | 230 sys.exit(main()) |
OLD | NEW |