Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: tools/create_sdk.py

Issue 9860009: Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated editor to use "Any" config Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 30 matching lines...) Expand all
41 # ......json/ 41 # ......json/
42 # ........json_frog.dart 42 # ........json_frog.dart
43 #.........json.dart 43 #.........json.dart
44 # ........{frog}/ 44 # ........{frog}/
45 # ......uri/ 45 # ......uri/
46 # ........uri.dart 46 # ........uri.dart
47 # ......utf/ 47 # ......utf/
48 # ......(more will come here) 48 # ......(more will come here)
49 # ....util/ 49 # ....util/
50 # ......(more will come here) 50 # ......(more will come here)
51 # ....analysis/
dgrove 2012/03/26 23:21:56 I don't believe this is the right place for this.
zundel 2012/03/27 00:38:12 Oops, this was from another CL before our latest d
52 # ......darta
53 # ......darta.jar
54 # ......<third party libs>
51 55
52 56
53 57
54 import os 58 import os
55 import re 59 import re
56 import sys 60 import sys
57 import tempfile 61 import tempfile
58 import utils 62 import utils
59 63
60 from os.path import dirname, join, realpath, exists, isdir 64 from os.path import dirname, join, realpath, exists, isdir
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 join(LIB, 'dartdoc', 'client-live-nav.dart'), 300 join(LIB, 'dartdoc', 'client-live-nav.dart'),
297 join(LIB, 'dartdoc', 'client-static.dart') 301 join(LIB, 'dartdoc', 'client-static.dart')
298 ], [ 302 ], [
299 ("#import\('../../frog", "#import('../frog") 303 ("#import\('../../frog", "#import('../frog")
300 ]) 304 ])
301 305
302 # Create and populate lib/isolate 306 # Create and populate lib/isolate
303 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), 307 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'),
304 ignore=ignore_patterns('.svn')) 308 ignore=ignore_patterns('.svn'))
305 309
310 isolate_runtime_src = join('runtime', 'lib', 'isolate.dart')
dgrove 2012/03/26 23:21:56 I think you want join(HOME, 'runtime', 'lib' , ...
zundel 2012/03/27 00:38:12 Done.
311 isolate_runtime_dest = join(LIB, 'isolate', 'runtime', 'isolate.dart')
312 copyfile(isolate_runtime_src, isolate_runtime_dest)
dgrove 2012/03/26 23:21:56 Why is this needed? All of the classes in isolate.
zundel 2012/03/27 00:38:12 I think we need this file to resolve the VM versio
dgrove 2012/03/27 04:29:27 Got it. On 2012/03/27 00:38:12, zundel wrote:
313
306 # 314 #
307 # Create and populate lib/core. 315 # Create and populate lib/core.
308 # 316 #
309 317
310 # First, copy corelib/* to lib/{frog, runtime} 318 # First, copy corelib/* to lib/{frog, runtime}
311 for filename in corelib_sources: 319 for filename in corelib_sources:
312 for target_dir in ['frog', 'runtime']: 320 for target_dir in ['frog', 'runtime']:
313 copyfile(join('corelib', 'src', filename), 321 copyfile(join('corelib', 'src', filename),
314 join(corelib_dest_dir, target_dir, filename)) 322 join(corelib_dest_dir, target_dir, filename))
315 323
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 for filename in coreimpl_runtime_sources: 396 for filename in coreimpl_runtime_sources:
389 if filename.endswith('.dart'): 397 if filename.endswith('.dart'):
390 dest_file.write('#source("runtime/' + filename + '");\n') 398 dest_file.write('#source("runtime/' + filename + '");\n')
391 dest_file.close() 399 dest_file.close()
392 400
393 # Create and copy tools. 401 # Create and copy tools.
394 402
395 UTIL = join(SDK_tmp, 'util') 403 UTIL = join(SDK_tmp, 'util')
396 os.makedirs(UTIL) 404 os.makedirs(UTIL)
397 405
406
407 # Copy import maps
408 PLATFORMS = ['any', 'vm', 'dartium', 'dart2js', 'frog' ]
409 for platform in PLATFORMS:
410 import_src = join(HOME, 'lib', 'import_' + platform + '.config')
411 import_dst = join(LIB, 'import_' + platform + '.config')
412 copyfile(import_src, import_dst);
413
398 move(SDK_tmp, SDK) 414 move(SDK_tmp, SDK)
399 415
400 if __name__ == '__main__': 416 if __name__ == '__main__':
401 sys.exit(Main(sys.argv)) 417 sys.exit(Main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698