| 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()) |
| 96 return join(os.environ['JAVA_HOME'], 'bin', 'javac' + GetExecutableExtension
()) | 97 return join(os.environ['JAVA_HOME'], 'bin', 'javac' + GetExecutableExtension
()) |
| 97 else: | 98 else: |
| 98 return "javac" | 99 return "javac" |
| 99 | 100 |
| 100 def GetJarToolPath(): | 101 def GetJarToolPath(): |
| 101 if 'JAVA_HOME' in os.environ: | 102 if 'JAVA_HOME' in os.environ: |
| 102 return join(os.environ['JAVA_HOME'], 'bin', 'jar' + GetExecutableExtension()
) | 103 return join(os.environ['JAVA_HOME'], 'bin', 'jar' + GetExecutableExtension()
) |
| 103 else: | 104 else: |
| 104 return "jar" | 105 return "jar" |
| 105 | 106 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 122 os.makedirs(options.output_dir) | 123 os.makedirs(options.output_dir) |
| 123 | 124 |
| 124 CopyFiles(options) | 125 CopyFiles(options) |
| 125 CreateManifestFile(options) | 126 CreateManifestFile(options) |
| 126 CompileAnalyzer(options, args) | 127 CompileAnalyzer(options, args) |
| 127 CreateJarFile(options) | 128 CreateJarFile(options) |
| 128 | 129 |
| 129 | 130 |
| 130 if __name__ == '__main__': | 131 if __name__ == '__main__': |
| 131 main() | 132 main() |
| OLD | NEW |