| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 elif system == 'htmlfrog': | 135 elif system == 'htmlfrog': |
| 136 implementation_system = HtmlFrogSystem( | 136 implementation_system = HtmlFrogSystem( |
| 137 TemplateLoader(template_dir, | 137 TemplateLoader(template_dir, |
| 138 ['html/frog', 'html/impl', 'html', ''], | 138 ['html/frog', 'html/impl', 'html', ''], |
| 139 {'DARTIUM': False, 'FROG': True}), | 139 {'DARTIUM': False, 'FROG': True}), |
| 140 target_database, emitters, output_dir) | 140 target_database, emitters, output_dir) |
| 141 elif system == 'htmldartium': | 141 elif system == 'htmldartium': |
| 142 # Generate native wrappers. | 142 # Generate native wrappers. |
| 143 native_system = NativeImplementationSystem( | 143 native_system = NativeImplementationSystem( |
| 144 TemplateLoader(template_dir, ['dom/native', 'dom', '']), | 144 TemplateLoader(template_dir, ['dom/native', 'dom', '']), |
| 145 dom_database, html_renames, emitters, auxiliary_dir, | 145 dom_database, html_database, html_renames, emitters, auxiliary_dir, |
| 146 output_dir) | 146 output_dir) |
| 147 generator.Generate(dom_database, native_system, | 147 generator.Generate(dom_database, native_system, |
| 148 source_filter=['WebKit', 'Dart'], | 148 source_filter=['WebKit', 'Dart'], |
| 149 super_database=common_database, | 149 super_database=common_database, |
| 150 common_prefix='common', | 150 common_prefix='common', |
| 151 webkit_renames=_webkit_renames, | 151 webkit_renames=_webkit_renames, |
| 152 html_renames=html_renames) | 152 html_renames=html_renames) |
| 153 dom_implementation_classes = native_system.DartImplementationFiles() | 153 dom_implementation_classes = native_system.DartImplementationFiles() |
| 154 implementation_system = HtmlDartiumSystem( | 154 implementation_system = HtmlDartiumSystem( |
| 155 TemplateLoader(template_dir, | 155 TemplateLoader(template_dir, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 dom_output_dir = options.output_dir or os.path.join(current_dir, | 228 dom_output_dir = options.output_dir or os.path.join(current_dir, |
| 229 '../generated') | 229 '../generated') |
| 230 html_output_dir = options.output_dir or os.path.join(current_dir, | 230 html_output_dir = options.output_dir or os.path.join(current_dir, |
| 231 '../../html/generated') | 231 '../../html/generated') |
| 232 Generate(systems, database_dir, options.use_database_cache, | 232 Generate(systems, database_dir, options.use_database_cache, |
| 233 dom_output_dir, html_output_dir) | 233 dom_output_dir, html_output_dir) |
| 234 GenerateSingleFile(systems) | 234 GenerateSingleFile(systems) |
| 235 | 235 |
| 236 if __name__ == '__main__': | 236 if __name__ == '__main__': |
| 237 sys.exit(main()) | 237 sys.exit(main()) |
| OLD | NEW |