| Index: tools/create_sdk.py
|
| diff --git a/tools/create_sdk.py b/tools/create_sdk.py
|
| index e77e8582ace20feca22c17159bd3606bd698044e..2fef199c9146e2ed780716df1295cbc51bec6ef4 100644
|
| --- a/tools/create_sdk.py
|
| +++ b/tools/create_sdk.py
|
| @@ -10,7 +10,7 @@
|
| #
|
| # The SDK will be used either from the command-line or from the editor.
|
| # Top structure is
|
| -#
|
| +#
|
| # ..dart-sdk/
|
| # ....bin/
|
| # ......dart or dart.exe (executable)
|
| @@ -19,6 +19,8 @@
|
| # ....lib/
|
| # ......builtin/
|
| # ........builtin_runtime.dart
|
| +# ......io/
|
| +# ........io_runtime.dart
|
| # ........runtime/
|
| # ......core/
|
| # ........core_{frog, runtime}.dart
|
| @@ -55,6 +57,8 @@ def Main(argv):
|
| # Pull in all of the gpyi files which will be munged into the sdk.
|
| builtin_runtime_sources = \
|
| (eval(open("runtime/bin/builtin_sources.gypi").read()))['sources']
|
| + io_runtime_sources = \
|
| + (eval(open("runtime/bin/io_sources.gypi").read()))['sources']
|
| corelib_sources = \
|
| (eval(open("corelib/src/corelib_sources.gypi").read()))['sources']
|
| corelib_frog_sources = \
|
| @@ -133,24 +137,41 @@ def Main(argv):
|
|
|
|
|
| #
|
| - # Create and populate lib/runtime.
|
| + # Create and populate lib/builtin.
|
| #
|
| builtin_dest_dir = join(LIB, 'builtin')
|
| os.makedirs(builtin_dest_dir)
|
| - os.makedirs(join(builtin_dest_dir, 'runtime'))
|
| - for filename in builtin_runtime_sources:
|
| - if filename.endswith('.dart'):
|
| - copyfile(join(HOME, 'runtime', 'bin', filename),
|
| - join(builtin_dest_dir, 'runtime', filename))
|
| + assert len(builtin_runtime_sources) == 1
|
| + assert builtin_runtime_sources[0] == 'builtin.dart'
|
| + copyfile(join(HOME, 'runtime', 'bin', 'builtin.dart'),
|
| + join(builtin_dest_dir, 'builtin_runtime.dart'))
|
|
|
| - # Construct lib/builtin/builtin_runtime.dart from whole cloth.
|
| - dest_file = open(join(builtin_dest_dir, 'builtin_runtime.dart'), 'w')
|
| - dest_file.write('#library("dart:builtin");\n')
|
| - for filename in builtin_runtime_sources:
|
| - if filename.endswith('.dart'):
|
| - dest_file.write('#source("runtime/' + filename + '");\n')
|
| +
|
| + #
|
| + # Create and populate lib/io.
|
| + #
|
| + io_dest_dir = join(LIB, 'io')
|
| + os.makedirs(io_dest_dir)
|
| + os.makedirs(join(io_dest_dir, 'runtime'))
|
| + for filename in io_runtime_sources:
|
| + assert filename.endswith('.dart')
|
| + if filename == 'io.dart':
|
| + copyfile(join(HOME, 'runtime', 'bin', filename),
|
| + join(io_dest_dir, 'io_runtime.dart'))
|
| + else:
|
| + copyfile(join(HOME, 'runtime', 'bin', filename),
|
| + join(io_dest_dir, 'runtime', filename))
|
| +
|
| + # Construct lib/io/io_runtime.dart from whole cloth.
|
| + dest_file = open(join(io_dest_dir, 'io_runtime.dart'), 'a')
|
| + for filename in io_runtime_sources:
|
| + assert filename.endswith('.dart')
|
| + if filename == 'io.dart':
|
| + continue
|
| + dest_file.write('#source("runtime/' + filename + '");\n')
|
| dest_file.close()
|
|
|
| +
|
| #
|
| # Create and populate lib/frog.
|
| #
|
|
|