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

Side by Side Diff: tools/create_sdk.py

Issue 10735050: Include new corelib/unified dir in sdk for dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « no previous file | no next file » | 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 dest.close() 91 dest.close()
92 92
93 93
94 def Copy(src, dest): 94 def Copy(src, dest):
95 copyfile(src, dest) 95 copyfile(src, dest)
96 copymode(src, dest) 96 copymode(src, dest)
97 97
98 # TODO(zundel): this excludes the analyzer from the sdk build until builders 98 # TODO(zundel): this excludes the analyzer from the sdk build until builders
99 # have all prerequisite software installed. Also update dart.gyp. 99 # have all prerequisite software installed. Also update dart.gyp.
100 def ShouldCopyAnalyzer(): 100 def ShouldCopyAnalyzer():
101 os = utils.GuessOS(); 101 os = utils.GuessOS();
102 return os == 'linux' or os == 'macos' 102 return os == 'linux' or os == 'macos'
103 103
104 104
105 def CopyShellScript(src_file, dest_dir): 105 def CopyShellScript(src_file, dest_dir):
106 '''Copies a shell/batch script to the given destination directory. Handles 106 '''Copies a shell/batch script to the given destination directory. Handles
107 using the appropriate platform-specific file extension.''' 107 using the appropriate platform-specific file extension.'''
108 file_extension = '' 108 file_extension = ''
109 if utils.GuessOS() == 'win32': 109 if utils.GuessOS() == 'win32':
110 file_extension = '.bat' 110 file_extension = '.bat'
111 111
(...skipping 11 matching lines...) Expand all
123 dealing with here which frees us from rewriting files. The long term 123 dealing with here which frees us from rewriting files. The long term
124 plan is to align the layout of the repository and the SDK, at which 124 plan is to align the layout of the repository and the SDK, at which
125 point we should be able to simplify Main below and share the dart 125 point we should be able to simplify Main below and share the dart
126 files between the various components to minimize SDK download size. 126 files between the various components to minimize SDK download size.
127 ''' 127 '''
128 copytree('lib', os.path.join(sdk_root, 'lib', 'dart2js', 'lib'), 128 copytree('lib', os.path.join(sdk_root, 'lib', 'dart2js', 'lib'),
129 ignore=ignore_patterns('.svn')) 129 ignore=ignore_patterns('.svn'))
130 copytree(os.path.join('corelib', 'src'), 130 copytree(os.path.join('corelib', 'src'),
131 os.path.join(sdk_root, 'lib', 'dart2js', 'corelib', 'src'), 131 os.path.join(sdk_root, 'lib', 'dart2js', 'corelib', 'src'),
132 ignore=ignore_patterns('.svn')) 132 ignore=ignore_patterns('.svn'))
133 copytree(os.path.join('corelib', 'unified'),
134 os.path.join(sdk_root, 'lib', 'dart2js', 'corelib', 'unified'),
135 ignore=ignore_patterns('.svn'))
133 copytree(os.path.join('runtime', 'lib'), 136 copytree(os.path.join('runtime', 'lib'),
134 os.path.join(sdk_root, 'lib', 'dart2js', 'runtime', 'lib'), 137 os.path.join(sdk_root, 'lib', 'dart2js', 'runtime', 'lib'),
135 ignore=ignore_patterns('.svn')) 138 ignore=ignore_patterns('.svn'))
136 copytree(os.path.join('runtime', 'bin'), 139 copytree(os.path.join('runtime', 'bin'),
137 os.path.join(sdk_root, 'lib', 'dart2js', 'runtime', 'bin'), 140 os.path.join(sdk_root, 'lib', 'dart2js', 'runtime', 'bin'),
138 ignore=ignore_patterns('.svn')) 141 ignore=ignore_patterns('.svn'))
139 if utils.GuessOS() == 'win32': 142 if utils.GuessOS() == 'win32':
140 dart2js = os.path.join(sdk_root, 'bin', 'dart2js.bat') 143 dart2js = os.path.join(sdk_root, 'bin', 'dart2js.bat')
141 Copy(os.path.join(build_dir, 'dart2js.bat'), dart2js) 144 Copy(os.path.join(build_dir, 'dart2js.bat'), dart2js)
142 ReplaceInFiles([dart2js], 145 ReplaceInFiles([dart2js],
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 if revision is not None: 465 if revision is not None:
463 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 466 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
464 f.write(revision + '\n') 467 f.write(revision + '\n')
465 f.close() 468 f.close()
466 469
467 move(SDK_tmp, SDK) 470 move(SDK_tmp, SDK)
468 utils.Touch(os.path.join(SDK, 'create.stamp')) 471 utils.Touch(os.path.join(SDK, 'create.stamp'))
469 472
470 if __name__ == '__main__': 473 if __name__ == '__main__':
471 sys.exit(Main(sys.argv)) 474 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698