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

Side by Side Diff: editor/tools/compile_analyzer.py

Issue 12335133: Create "binaries" for calling the new analyzer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | « editor/tools/analyzer.bat ('k') | 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 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 # 5 #
6 # Script to compile the analyzer. 6 # Script to compile the analyzer.
7 # 7 #
8 # Usage: compile_analyzer.py OPTIONS files 8 # Usage: compile_analyzer.py OPTIONS files
9 # 9 #
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 class_path_file_name = options.output_dir + options.class_path_file 62 class_path_file_name = options.output_dir + options.class_path_file
63 with open(class_path_file_name, 'w') as output: 63 with open(class_path_file_name, 'w') as output:
64 print >> output, 'Class-Path:', '.', 64 print >> output, 'Class-Path:', '.',
65 for r,d,f in os.walk(options.output_dir): 65 for r,d,f in os.walk(options.output_dir):
66 for file in f: 66 for file in f:
67 if file.endswith('.jar'): 67 if file.endswith('.jar'):
68 print >> output, file, 68 print >> output, file,
69 # Add new line 69 # Add new line
70 print >> output 70 print >> output
71 71
72 def CopyBinaries(options):
73 bin_directory = options.output_dir + "/bin"
74 os.makedirs(bin_directory)
75 unix_bin = os.path.join(os.path.dirname(__file__), "analyzer")
76 windows_bin = os.path.join(os.path.dirname(__file__), "analyzer.bat")
77 print unix_bin
kustermann 2013/03/12 08:45:17 Left over "print"s?
78 print os.path.dirname(__file__)
79 shutil.copy(unix_bin, bin_directory)
80 shutil.copy(windows_bin, bin_directory)
81
72 def main(): 82 def main():
73 (options, args) = GetOptions() 83 (options, args) = GetOptions()
74 # Clean out everything whenever we do a build, guarantees that we don't have 84 # Clean out everything whenever we do a build, guarantees that we don't have
75 # any leftover jar files. 85 # any leftover jar files.
76 shutil.rmtree(options.output_dir, ignore_errors=True) 86 shutil.rmtree(options.output_dir, ignore_errors=True)
77 os.makedirs(options.output_dir) 87 os.makedirs(options.output_dir)
78 88
79 CopyFiles(options) 89 CopyFiles(options)
80 CreateClassPathFile(options) 90 CreateClassPathFile(options)
81 CompileAnalyzer(options, args) 91 CompileAnalyzer(options, args)
82 CreateJarFile(options) 92 CreateJarFile(options)
83 93 CopyBinaries(options)
84 94
85 if __name__=='__main__': 95 if __name__=='__main__':
86 main() 96 main()
OLDNEW
« no previous file with comments | « editor/tools/analyzer.bat ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698