OLD | NEW |
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 for file in f: | 86 for file in f: |
87 if file.endswith('.jar'): | 87 if file.endswith('.jar'): |
88 print >> output, file, | 88 print >> output, file, |
89 print >> output | 89 print >> output |
90 | 90 |
91 # version | 91 # version |
92 print >> output, 'Implementation-Version: %s' % GetDartVersion() | 92 print >> output, 'Implementation-Version: %s' % GetDartVersion() |
93 | 93 |
94 def GetJavacPath(): | 94 def GetJavacPath(): |
95 if 'JAVA_HOME' in os.environ: | 95 if 'JAVA_HOME' in os.environ: |
96 print 'JAVA_HOME in environment variables ' + join(os.environ['JAVA_HOME'],
'bin', 'javac' + GetExecutableExtension()) | |
97 return join(os.environ['JAVA_HOME'], 'bin', 'javac' + GetExecutableExtension
()) | 96 return join(os.environ['JAVA_HOME'], 'bin', 'javac' + GetExecutableExtension
()) |
98 else: | 97 else: |
99 return "javac" | 98 return "javac" |
100 | 99 |
101 def GetJarToolPath(): | 100 def GetJarToolPath(): |
102 if 'JAVA_HOME' in os.environ: | 101 if 'JAVA_HOME' in os.environ: |
103 return join(os.environ['JAVA_HOME'], 'bin', 'jar' + GetExecutableExtension()
) | 102 return join(os.environ['JAVA_HOME'], 'bin', 'jar' + GetExecutableExtension()
) |
104 else: | 103 else: |
105 return "jar" | 104 return "jar" |
106 | 105 |
(...skipping 16 matching lines...) Expand all Loading... |
123 os.makedirs(options.output_dir) | 122 os.makedirs(options.output_dir) |
124 | 123 |
125 CopyFiles(options) | 124 CopyFiles(options) |
126 CreateManifestFile(options) | 125 CreateManifestFile(options) |
127 CompileAnalyzer(options, args) | 126 CompileAnalyzer(options, args) |
128 CreateJarFile(options) | 127 CreateJarFile(options) |
129 | 128 |
130 | 129 |
131 if __name__ == '__main__': | 130 if __name__ == '__main__': |
132 main() | 131 main() |
OLD | NEW |