| 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 logging.config | 10 import logging.config |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 ['html/frog', 'html/impl', 'html', ''], | 76 ['html/frog', 'html/impl', 'html', ''], |
| 77 {'DARTIUM': False, 'FROG': True}), | 77 {'DARTIUM': False, 'FROG': True}), |
| 78 webkit_database, emitters, output_dir) | 78 webkit_database, emitters, output_dir) |
| 79 else: | 79 else: |
| 80 backend = NativeImplementationSystem( | 80 backend = NativeImplementationSystem( |
| 81 TemplateLoader(template_dir, ['dom/native', 'html/dartium', | 81 TemplateLoader(template_dir, ['dom/native', 'html/dartium', |
| 82 'html/impl', ''], | 82 'html/impl', ''], |
| 83 {'DARTIUM': True, 'FROG': False}), | 83 {'DARTIUM': True, 'FROG': False}), |
| 84 webkit_database, emitters, output_dir, auxiliary_dir) | 84 webkit_database, emitters, output_dir, auxiliary_dir) |
| 85 html_system = HtmlInterfacesSystem( | 85 html_system = HtmlInterfacesSystem( |
| 86 TemplateLoader(template_dir, ['html/interface', 'html', '']), | 86 TemplateLoader(template_dir, ['html/interface', 'html/impl', 'html', |
| 87 '']), |
| 87 webkit_database, emitters, output_dir, backend) | 88 webkit_database, emitters, output_dir, backend) |
| 88 Generate(html_system) | 89 Generate(html_system) |
| 89 else: | 90 else: |
| 90 output_dir = dom_output_dir | 91 output_dir = dom_output_dir |
| 91 interface_system = InterfacesSystem( | 92 interface_system = InterfacesSystem( |
| 92 TemplateLoader(template_dir, ['dom/interface', 'dom', '']), | 93 TemplateLoader(template_dir, ['dom/interface', 'dom', '']), |
| 93 webkit_database, emitters, output_dir) | 94 webkit_database, emitters, output_dir) |
| 94 if system_name == 'dummy': | 95 if system_name == 'dummy': |
| 95 implementation_system = dartgenerator.DummyImplementationSystem( | 96 implementation_system = dartgenerator.DummyImplementationSystem( |
| 96 TemplateLoader(template_dir, ['dom/dummy', 'dom', '']), | 97 TemplateLoader(template_dir, ['dom/dummy', 'dom', '']), |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 dom_output_dir = options.output_dir or os.path.join(current_dir, | 165 dom_output_dir = options.output_dir or os.path.join(current_dir, |
| 165 '../generated') | 166 '../generated') |
| 166 html_output_dir = options.output_dir or os.path.join(current_dir, | 167 html_output_dir = options.output_dir or os.path.join(current_dir, |
| 167 '../../html/generated') | 168 '../../html/generated') |
| 168 Generate(systems, database_dir, options.use_database_cache, | 169 Generate(systems, database_dir, options.use_database_cache, |
| 169 dom_output_dir, html_output_dir) | 170 dom_output_dir, html_output_dir) |
| 170 GenerateSingleFile(systems) | 171 GenerateSingleFile(systems) |
| 171 | 172 |
| 172 if __name__ == '__main__': | 173 if __name__ == '__main__': |
| 173 sys.exit(main()) | 174 sys.exit(main()) |
| OLD | NEW |