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

Side by Side Diff: tools/create_sdk.py

Issue 63363007: SDK build bits for dartfmt. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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) 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 file_extension = '' 98 file_extension = ''
99 if HOST_OS == 'win32': 99 if HOST_OS == 'win32':
100 file_extension = '.bat' 100 file_extension = '.bat'
101 101
102 src = src_file + file_extension 102 src = src_file + file_extension
103 dest = join(dest_dir, basename(src_file) + file_extension) 103 dest = join(dest_dir, basename(src_file) + file_extension)
104 Copy(src, dest) 104 Copy(src, dest)
105 105
106 106
107 def CopyDartScripts(home, sdk_root): 107 def CopyDartScripts(home, sdk_root):
108 for executable in ['dart2js', 'dartanalyzer', 'dartdoc', 'pub']: 108 for executable in ['dart2js', 'dartanalyzer', 'dartdoc', 'dartfmt', 'pub']:
109 CopyShellScript(os.path.join(home, 'sdk', 'bin', executable), 109 CopyShellScript(os.path.join(home, 'sdk', 'bin', executable),
110 os.path.join(sdk_root, 'bin')) 110 os.path.join(sdk_root, 'bin'))
111 111
112 112
113 def CopySnapshots(snapshots, sdk_root): 113 def CopySnapshots(snapshots, sdk_root):
114 for snapshot in ['dart2js', 'utils_wrapper', 'pub']: 114 for snapshot in ['dart2js', 'dartfmt', 'utils_wrapper', 'pub']:
115 snapshot += '.dart.snapshot' 115 snapshot += '.dart.snapshot'
116 copyfile(join(snapshots, snapshot), 116 copyfile(join(snapshots, snapshot),
117 join(sdk_root, 'bin', 'snapshots', snapshot)) 117 join(sdk_root, 'bin', 'snapshots', snapshot))
118 118
119 119
120 def Main(argv): 120 def Main(argv):
121 # Pull in all of the gypi files which will be munged into the sdk. 121 # Pull in all of the gypi files which will be munged into the sdk.
122 HOME = dirname(dirname(realpath(__file__))) 122 HOME = dirname(dirname(realpath(__file__)))
123 123
124 (options, args) = GetOptions() 124 (options, args) = GetOptions()
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 252 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
253 f.write(revision + '\n') 253 f.write(revision + '\n')
254 f.close() 254 f.close()
255 255
256 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) 256 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README'))
257 257
258 move(SDK_tmp, SDK) 258 move(SDK_tmp, SDK)
259 259
260 if __name__ == '__main__': 260 if __name__ == '__main__':
261 sys.exit(Main(sys.argv)) 261 sys.exit(Main(sys.argv))
OLDNEW
« sdk/bin/dartfmt ('K') | « sdk/bin/dartfmt.bat ('k') | utils/dartfmt/dartfmt.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698