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

Unified Diff: dart/tools/create_sdk.py

Issue 10266011: Shoehorn dart2js into the SDK. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: dart/tools/create_sdk.py
diff --git a/dart/tools/create_sdk.py b/dart/tools/create_sdk.py
index 4c573d80acf0c17927ef188f95957b2f3f22f0bc..a219a548bb6e9595a0adf5393943b711ffe55867 100755
--- a/dart/tools/create_sdk.py
+++ b/dart/tools/create_sdk.py
@@ -74,6 +74,33 @@ def ReplaceInFiles(paths, subs):
dest.write(contents)
dest.close()
+
+def Copy(src, dest):
+ copyfile(src, dest)
+ copymode(src, dest)
+
+
+def CopyDart2Js(build_dir, sdk_root):
kasperl 2012/05/01 05:51:07 Maybe add a comment that explains what you're copy
ahe 2012/05/02 10:32:17 Done.
+ copytree('lib', os.path.join(sdk_root, 'lib', 'dart2js', 'lib'),
+ ignore=ignore_patterns('.svn'))
+ copytree(os.path.join('corelib', 'src'),
+ os.path.join(sdk_root, 'lib', 'dart2js', 'corelib', 'src'),
+ ignore=ignore_patterns('.svn'))
+ copytree(os.path.join('runtime', 'lib'),
+ os.path.join(sdk_root, 'lib', 'dart2js', 'runtime', 'lib'),
+ ignore=ignore_patterns('.svn'))
+ copytree(os.path.join('runtime', 'bin'),
+ os.path.join(sdk_root, 'lib', 'dart2js', 'runtime', 'bin'),
+ ignore=ignore_patterns('.svn'))
dgrove 2012/05/01 06:54:58 This approach generally looks orthogonal to the wa
dgrove 2012/05/01 06:54:58 What are you doing about the html and isolate libr
ahe 2012/05/02 10:32:17 I'm copying dart/lib to PRODUCT_DIR/dart-sdk/lib/d
ahe 2012/05/02 10:32:17 I thought the plan was to shuffle directories arou
+ dart2js = os.path.join(sdk_root, 'bin', 'dart2js')
kasperl 2012/05/01 05:51:07 Shouldn't this be different on Windows? Don't you
ahe 2012/05/02 10:32:17 I think I'll break Windows if I don't create the B
+ Copy(os.path.join(build_dir, 'dart2js'), dart2js)
+
+ ReplaceInFiles([dart2js],
+ [(r'\$BIN_DIR/\.\./\.\./lib',
+ r'$BIN_DIR/../lib/dart2js/lib')])
+
+
+
def Main(argv):
# Pull in all of the gpyi files which will be munged into the sdk.
builtin_runtime_sources = \
@@ -424,6 +451,8 @@ def Main(argv):
import_dst = join(LIB, 'config', 'import_' + platform + '.config')
copyfile(import_src, import_dst);
+ CopyDart2Js(build_dir, SDK_tmp)
+
# Write the 'revision' file
revision = utils.GetSVNRevision()
if revision is not None:

Powered by Google App Engine
This is Rietveld 408576698