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

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 6 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
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 #
11 # The SDK will be used either from the command-line or from the editor. 11 # The SDK will be used either from the command-line or from the editor.
12 # Top structure is 12 # Top structure is
13 # 13 #
14 # ..dart-sdk/ 14 # ..dart-sdk/
15 # ....bin/ 15 # ....bin/
16 # ......dart or dart.exe (executable) 16 # ......dart or dart.exe (executable)
17 # ......dart.lib (import library for VM native extensions on Windows) 17 # ......dart.lib (import library for VM native extensions on Windows)
18 # ......dart2js 18 # ......dart2js
19 # ......dartanalyzer 19 # ......dartanalyzer
20 # ......pub 20 # ......pub
21 # ......snapshots/ 21 # ......snapshots/
22 # ........utils_wrapper.dart.snapshot 22 # ........utils_wrapper.dart.snapshot
23 # ........pub.dart.snapshot 23 # ........pub.dart.snapshot
kustermann 2014/02/10 08:31:35 Please update this list with the new snapshot (and
pquitslund 2014/02/10 18:51:11 Fixed. Updated bin/ listing too.
24 # ....include/ 24 # ....include/
25 # ......dart_api.h 25 # ......dart_api.h
26 # ......dart_debugger_api.h 26 # ......dart_debugger_api.h
27 # ......dart_mirrors_api.h 27 # ......dart_mirrors_api.h
28 # ......dart_native_api.h 28 # ......dart_native_api.h
29 # ....lib/ 29 # ....lib/
30 # ......_internal/ 30 # ......_internal/
31 # ......async/ 31 # ......async/
32 # ......collection/ 32 # ......collection/
33 # ......convert/ 33 # ......convert/
(...skipping 64 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', 'docgen', 'pub']: 108 for executable in ['dart2js', 'dartanalyzer', 'dartfmt', 'docgen', '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
« no previous file with comments | « dart.gyp ('k') | utils/dartfmt/dartfmt.gyp » ('j') | utils/dartfmt/dartfmt.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698