| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, 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 17 matching lines...) Expand all Loading... |
| 28 # ......coreimpl/ | 28 # ......coreimpl/ |
| 29 # ........coreimpl_{frog, runtime}.dart | 29 # ........coreimpl_{frog, runtime}.dart |
| 30 # ........{frog, runtime}/ | 30 # ........{frog, runtime}/ |
| 31 # ......dartdoc/ | 31 # ......dartdoc/ |
| 32 # ......isolate/ | 32 # ......isolate/ |
| 33 # ........isolate_{frog, runtime}.dart | 33 # ........isolate_{frog, runtime}.dart |
| 34 # ........{frog, runtime}/ | 34 # ........{frog, runtime}/ |
| 35 # ......dom/ | 35 # ......dom/ |
| 36 # ........dom.dart | 36 # ........dom.dart |
| 37 # ......frog/ | 37 # ......frog/ |
| 38 # ......html/ | 38 # ......html/ |
| 39 # ........html.dart | 39 # ........html_frog.dart |
| 40 # ......htmlimpl/ | 40 # ........html_dartium.dart |
| 41 # ........htmlimpl.dart | |
| 42 # ......json/ | 41 # ......json/ |
| 43 # ........json_frog.dart | 42 # ........json_frog.dart |
| 44 #.........json.dart | 43 #.........json.dart |
| 45 # ........{frog}/ | 44 # ........{frog}/ |
| 46 # ......uri/ | 45 # ......uri/ |
| 47 # ........uri.dart | 46 # ........uri.dart |
| 48 # ......utf8/ | 47 # ......utf8/ |
| 49 # ........utf8.dart | 48 # ........utf8.dart |
| 50 # ......(more will come here) | 49 # ......(more will come here) |
| 51 # ....util/ | 50 # ....util/ |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 for (dirpath, subdirs, _) in os.walk(frog_dest_dir): | 228 for (dirpath, subdirs, _) in os.walk(frog_dest_dir): |
| 230 for subdir in subdirs: | 229 for subdir in subdirs: |
| 231 for filename in os.listdir(join(dirpath, subdir)): | 230 for filename in os.listdir(join(dirpath, subdir)): |
| 232 if filename.endswith('.dart'): | 231 if filename.endswith('.dart'): |
| 233 file_contents = open(join(dirpath, subdir, filename)).read() | 232 file_contents = open(join(dirpath, subdir, filename)).read() |
| 234 file = open(join(dirpath, subdir, filename), 'w') | 233 file = open(join(dirpath, subdir, filename), 'w') |
| 235 file.write(re.sub("../lib/", "../", file_contents)) | 234 file.write(re.sub("../lib/", "../", file_contents)) |
| 236 file.close() | 235 file.close() |
| 237 | 236 |
| 238 # | 237 # |
| 239 # Create and populate lib/html and lib/htmlimpl. | 238 # Create and populate lib/html. |
| 240 # | 239 # |
| 241 html_src_dir = join(HOME, 'client', 'html') | 240 html_src_dir = join(HOME, 'client', 'html') |
| 242 html_dest_dir = join(LIB, 'html') | 241 html_dest_dir = join(LIB, 'html') |
| 243 os.makedirs(html_dest_dir) | 242 os.makedirs(html_dest_dir) |
| 244 htmlimpl_dest_dir = join(LIB, 'htmlimpl') | |
| 245 os.makedirs(htmlimpl_dest_dir) | |
| 246 | 243 |
| 247 copyfile(join(html_src_dir, 'release', 'html.dart'), | 244 copyfile(join(html_src_dir, 'frog', 'html_frog.dart'), |
| 248 join(html_dest_dir, 'html.dart')) | 245 join(html_dest_dir, 'html_frog.dart')) |
| 249 copyfile(join(html_src_dir, 'release', 'htmlimpl.dart'), | 246 copyfile(join(html_src_dir, 'dartium', 'html_dartium.dart'), |
| 250 join(htmlimpl_dest_dir, 'htmlimpl.dart')) | 247 join(html_dest_dir, 'html_dartium.dart')) |
| 251 | 248 |
| 252 # | 249 # |
| 253 # Create and populate lib/dom. | 250 # Create and populate lib/dom. |
| 254 # | 251 # |
| 255 dom_src_dir = join(HOME, 'client', 'dom') | 252 dom_src_dir = join(HOME, 'client', 'dom') |
| 256 dom_dest_dir = join(LIB, 'dom') | 253 dom_dest_dir = join(LIB, 'dom') |
| 257 os.makedirs(dom_dest_dir) | 254 os.makedirs(dom_dest_dir) |
| 258 | 255 |
| 259 copyfile(join(dom_src_dir, 'frog', 'dom_frog.dart'), | 256 copyfile(join(dom_src_dir, 'frog', 'dom_frog.dart'), |
| 260 join(dom_dest_dir, 'dom_frog.dart')) | 257 join(dom_dest_dir, 'dom_frog.dart')) |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 | 386 |
| 390 # Create and copy tools. | 387 # Create and copy tools. |
| 391 | 388 |
| 392 UTIL = join(SDK_tmp, 'util') | 389 UTIL = join(SDK_tmp, 'util') |
| 393 os.makedirs(UTIL) | 390 os.makedirs(UTIL) |
| 394 | 391 |
| 395 move(SDK_tmp, SDK) | 392 move(SDK_tmp, SDK) |
| 396 | 393 |
| 397 if __name__ == '__main__': | 394 if __name__ == '__main__': |
| 398 sys.exit(Main(sys.argv)) | 395 sys.exit(Main(sys.argv)) |
| OLD | NEW |