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

Side by Side Diff: tools/create_sdk.py

Issue 12084010: Change option --use_script_snapshot to --use-script-snapshot (easier to type). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « sdk/bin/dartdoc.bat ('k') | utils/compiler/compiler.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if version: 103 if version:
104 ReplaceInFiles([os.path.join(sdk_root, 'lib', '_internal', 'compiler', 104 ReplaceInFiles([os.path.join(sdk_root, 'lib', '_internal', 'compiler',
105 'implementation', 'compiler.dart')], 105 'implementation', 'compiler.dart')],
106 [(r"BUILD_ID = 'build number could not be determined'", 106 [(r"BUILD_ID = 'build number could not be determined'",
107 r"BUILD_ID = '%s'" % version)]) 107 r"BUILD_ID = '%s'" % version)])
108 # TODO(dgrove) - add pub once issue 6619 is fixed 108 # TODO(dgrove) - add pub once issue 6619 is fixed
109 for executable in ['dart2js', 'dartdoc']: 109 for executable in ['dart2js', 'dartdoc']:
110 CopyShellScript(os.path.join(home, 'sdk', 'bin', executable), 110 CopyShellScript(os.path.join(home, 'sdk', 'bin', executable),
111 os.path.join(sdk_root, 'bin')) 111 os.path.join(sdk_root, 'bin'))
112 112
113 subprocess.call([os.path.join(build_dir, 'gen_snapshot'), 113 subprocess.call([os.path.join(build_dir, 'dart'),
114 '--script_snapshot=%s' % 114 '--generate-script-snapshot=%s' %
115 os.path.join(sdk_root, 'lib', '_internal', 'compiler', 115 os.path.join(sdk_root, 'lib', '_internal', 'compiler',
116 'implementation', 'dart2js.dart.snapshot'), 116 'implementation', 'dart2js.dart.snapshot'),
117 os.path.join(sdk_root, 'lib', '_internal', 'compiler', 117 os.path.join(sdk_root, 'lib', '_internal', 'compiler',
118 'implementation', 'dart2js.dart')]) 118 'implementation', 'dart2js.dart')])
119 119
120 120
121 121
122 def Main(argv): 122 def Main(argv):
123 # Pull in all of the gpyi files which will be munged into the sdk. 123 # Pull in all of the gpyi files which will be munged into the sdk.
124 HOME = dirname(dirname(realpath(__file__))) 124 HOME = dirname(dirname(realpath(__file__)))
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 309 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
310 f.write(revision + '\n') 310 f.write(revision + '\n')
311 f.close() 311 f.close()
312 312
313 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) 313 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README'))
314 314
315 move(SDK_tmp, SDK) 315 move(SDK_tmp, SDK)
316 316
317 if __name__ == '__main__': 317 if __name__ == '__main__':
318 sys.exit(Main(sys.argv)) 318 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « sdk/bin/dartdoc.bat ('k') | utils/compiler/compiler.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698