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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 common_prefix = 'common', | 124 common_prefix = 'common', |
125 super_map = webkit_renames_inverse, | 125 super_map = webkit_renames_inverse, |
126 html_map = html_renames_inverse, | 126 html_map = html_renames_inverse, |
127 systems = systems) | 127 systems = systems) |
128 | 128 |
129 generator.Flush() | 129 generator.Flush() |
130 | 130 |
131 if 'frog' in systems: | 131 if 'frog' in systems: |
132 _logger.info('Copy dom_frog to frog/') | 132 _logger.info('Copy dom_frog to frog/') |
133 subprocess.call(['cd ../generated ; ' | 133 subprocess.call(['cd ../generated ; ' |
134 '../../../client/tools/copy_dart.py ../frog dom_frog.dart']
, | 134 '../../../tools/copy_dart.py ../frog dom_frog.dart'], |
135 shell=True); | 135 shell=True); |
136 | 136 |
137 if 'htmlfrog' in systems: | 137 if 'htmlfrog' in systems: |
138 _logger.info('Copy html_frog to ../html/frog/') | 138 _logger.info('Copy html_frog to ../html/frog/') |
139 subprocess.call(['cd ../../html/generated ; ' | 139 subprocess.call(['cd ../../html/generated ; ' |
140 '../../../client/tools/copy_dart.py ../frog html_frog.dart'
], | 140 '../../../tools/copy_dart.py ../frog html_frog.dart'], |
141 shell=True); | 141 shell=True); |
142 | 142 |
143 if 'htmldartium' in systems: | 143 if 'htmldartium' in systems: |
144 _logger.info('Copy html_dartium to ../html/dartium/') | 144 _logger.info('Copy html_dartium to ../html/dartium/') |
145 subprocess.call(['cd ../../html/generated ; ' | 145 subprocess.call(['cd ../../html/generated ; ' |
146 '../../../client/tools/copy_dart.py ../dartium html_dartium
.dart'], | 146 '../../../tools/copy_dart.py ../dartium html_dartium.dart']
, |
147 shell=True); | 147 shell=True); |
148 | 148 |
149 # Copy dummy DOM where dartc build expects it. | 149 # Copy dummy DOM where dartc build expects it. |
150 if 'dummy' in systems: | 150 if 'dummy' in systems: |
151 _logger.info('Copy dom_dummy to dom.dart') | 151 _logger.info('Copy dom_dummy to dom.dart') |
152 subprocess.call(['cd ../generated ; ' | 152 subprocess.call(['cd ../generated ; ' |
153 '../../../client/tools/copy_dart.py dummy dom_dummy.dart ;' | 153 '../../../tools/copy_dart.py dummy dom_dummy.dart ;' |
154 'cp dummy/dom_dummy.dart ../dom.dart'], | 154 'cp dummy/dom_dummy.dart ../dom.dart'], |
155 shell=True); | 155 shell=True); |
156 | 156 |
157 def main(): | 157 def main(): |
158 parser = optparse.OptionParser() | 158 parser = optparse.OptionParser() |
159 parser.add_option('--systems', dest='systems', | 159 parser.add_option('--systems', dest='systems', |
160 action='store', type='string', | 160 action='store', type='string', |
161 default='frog,dummy,wrapping,htmlfrog,htmldartium', | 161 default='frog,dummy,wrapping,htmlfrog,htmldartium', |
162 help='Systems to generate (frog, native, dummy, ' | 162 help='Systems to generate (frog, native, dummy, ' |
163 'htmlfrog, htmldartium)') | 163 'htmlfrog, htmldartium)') |
(...skipping 22 matching lines...) Expand all Loading... |
186 '../generated') | 186 '../generated') |
187 GenerateDOM(dom_systems, False, output_dir, use_database_cache) | 187 GenerateDOM(dom_systems, False, output_dir, use_database_cache) |
188 | 188 |
189 if html_systems: | 189 if html_systems: |
190 output_dir = options.output_dir or os.path.join(current_dir, | 190 output_dir = options.output_dir or os.path.join(current_dir, |
191 '../../html/generated') | 191 '../../html/generated') |
192 GenerateDOM(html_systems, True, output_dir, use_database_cache or dom_system
s) | 192 GenerateDOM(html_systems, True, output_dir, use_database_cache or dom_system
s) |
193 | 193 |
194 if __name__ == '__main__': | 194 if __name__ == '__main__': |
195 sys.exit(main()) | 195 sys.exit(main()) |
OLD | NEW |