OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, 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 # A script which will be invoked from gyp to create an SDK. | 7 # A script which will be invoked from gyp to create an SDK. |
8 # | 8 # |
9 # Usage: create_sdk.py sdk_directory | 9 # Usage: create_sdk.py sdk_directory |
10 # | 10 # |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 DARTDOC = join(RESOURCE_DIR, 'dartdoc') | 142 DARTDOC = join(RESOURCE_DIR, 'dartdoc') |
143 | 143 |
144 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'templates'), | 144 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'templates'), |
145 join(DARTDOC, 'templates')) | 145 join(DARTDOC, 'templates')) |
146 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'resources'), | 146 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'resources'), |
147 join(DARTDOC, 'resources')) | 147 join(DARTDOC, 'resources')) |
148 # write the .packages file | 148 # write the .packages file |
149 PACKAGES_FILE = join(DARTDOC, '.packages') | 149 PACKAGES_FILE = join(DARTDOC, '.packages') |
150 packages_file = open(PACKAGES_FILE, 'w') | 150 packages_file = open(PACKAGES_FILE, 'w') |
151 packages_file.write('dartdoc:.') | 151 packages_file.write('dartdoc:.') |
152 packages_file.close() | 152 packages_file.close() |
153 | 153 |
154 | 154 |
155 def Main(): | 155 def Main(): |
156 # Pull in all of the gypi files which will be munged into the sdk. | 156 # Pull in all of the gypi files which will be munged into the sdk. |
157 HOME = dirname(dirname(realpath(__file__))) | 157 HOME = dirname(dirname(realpath(__file__))) |
158 | 158 |
159 (options, args) = GetOptions() | 159 (options, args) = GetOptions() |
160 | 160 |
161 SDK = options.sdk_output_dir | 161 SDK = options.sdk_output_dir |
162 SDK_tmp = '%s.tmp' % SDK | 162 SDK_tmp = '%s.tmp' % SDK |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 229 |
230 for library in [join('_blink', 'dartium'), | 230 for library in [join('_blink', 'dartium'), |
231 join('_chrome', 'dart2js'), join('_chrome', 'dartium'), | 231 join('_chrome', 'dart2js'), join('_chrome', 'dartium'), |
232 join('_internal', 'js_runtime'), | 232 join('_internal', 'js_runtime'), |
233 join('_internal', 'sdk_library_metadata'), | 233 join('_internal', 'sdk_library_metadata'), |
234 'async', 'collection', 'convert', 'core', 'developer', | 234 'async', 'collection', 'convert', 'core', 'developer', |
235 'internal', 'io', 'isolate', | 235 'internal', 'io', 'isolate', |
236 join('html', 'dart2js'), join('html', 'dartium'), | 236 join('html', 'dart2js'), join('html', 'dartium'), |
237 join('html', 'html_common'), | 237 join('html', 'html_common'), |
238 join('indexed_db', 'dart2js'), join('indexed_db', 'dartium'), | 238 join('indexed_db', 'dart2js'), join('indexed_db', 'dartium'), |
239 'js', 'math', 'mirrors', 'typed_data', | 239 'js', 'math', 'mirrors', 'profiler', 'typed_data', |
240 join('svg', 'dart2js'), join('svg', 'dartium'), | 240 join('svg', 'dart2js'), join('svg', 'dartium'), |
241 join('web_audio', 'dart2js'), join('web_audio', 'dartium'), | 241 join('web_audio', 'dart2js'), join('web_audio', 'dartium'), |
242 join('web_gl', 'dart2js'), join('web_gl', 'dartium'), | 242 join('web_gl', 'dart2js'), join('web_gl', 'dartium'), |
243 join('web_sql', 'dart2js'), join('web_sql', 'dartium')]: | 243 join('web_sql', 'dart2js'), join('web_sql', 'dartium')]: |
244 copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library), | 244 copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library), |
245 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh', | 245 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh', |
246 '.gitignore')) | 246 '.gitignore')) |
247 | 247 |
248 # Copy the platform descriptors. | 248 # Copy the platform descriptors. |
249 for file_name in ["dart_client.platform", | 249 for file_name in ["dart_client.platform", |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 f.close() | 300 f.close() |
301 | 301 |
302 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 302 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
303 Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE')) | 303 Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE')) |
304 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) | 304 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) |
305 | 305 |
306 move(SDK_tmp, SDK) | 306 move(SDK_tmp, SDK) |
307 | 307 |
308 if __name__ == '__main__': | 308 if __name__ == '__main__': |
309 sys.exit(Main()) | 309 sys.exit(Main()) |
OLD | NEW |