| OLD | NEW |
| 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 | 7 |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import re | 10 import re |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 CheckDirExists(THIRD_PARTY_ROOT, 'third party tools'); | 178 CheckDirExists(THIRD_PARTY_ROOT, 'third party tools'); |
| 179 android_tools = os.path.join(THIRD_PARTY_ROOT, 'android_tools') | 179 android_tools = os.path.join(THIRD_PARTY_ROOT, 'android_tools') |
| 180 CheckDirExists(android_tools, 'Android tools') | 180 CheckDirExists(android_tools, 'Android tools') |
| 181 android_ndk_root = os.path.join(android_tools, 'ndk') | 181 android_ndk_root = os.path.join(android_tools, 'ndk') |
| 182 CheckDirExists(android_ndk_root, 'Android NDK') | 182 CheckDirExists(android_ndk_root, 'Android NDK') |
| 183 | 183 |
| 184 # Set up the directory of the Android NDK cross-compiler toolchain. | 184 # Set up the directory of the Android NDK cross-compiler toolchain. |
| 185 toolchain_arch = 'arm-linux-androideabi-4.6' | 185 toolchain_arch = 'arm-linux-androideabi-4.6' |
| 186 if target_arch == 'ia32': | 186 if target_arch == 'ia32': |
| 187 toolchain_arch = 'x86-4.6' | 187 toolchain_arch = 'x86-4.6' |
| 188 toolchain_dir = 'linux-x86' | 188 toolchain_dir = 'linux-x86_64' |
| 189 android_toolchain = os.path.join(android_ndk_root, | 189 android_toolchain = os.path.join(android_ndk_root, |
| 190 'toolchains', toolchain_arch, | 190 'toolchains', toolchain_arch, |
| 191 'prebuilt', toolchain_dir, 'bin') | 191 'prebuilt', toolchain_dir, 'bin') |
| 192 CheckDirExists(android_toolchain, 'Android toolchain') | 192 CheckDirExists(android_toolchain, 'Android toolchain') |
| 193 | 193 |
| 194 return android_toolchain | 194 return android_toolchain |
| 195 | 195 |
| 196 | 196 |
| 197 def Execute(args): | 197 def Execute(args): |
| 198 process = subprocess.Popen(args) | 198 process = subprocess.Popen(args) |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 process.wait() | 405 process.wait() |
| 406 if process.returncode != 0: | 406 if process.returncode != 0: |
| 407 print "BUILD FAILED" | 407 print "BUILD FAILED" |
| 408 return 1 | 408 return 1 |
| 409 | 409 |
| 410 return 0 | 410 return 0 |
| 411 | 411 |
| 412 | 412 |
| 413 if __name__ == '__main__': | 413 if __name__ == '__main__': |
| 414 sys.exit(Main()) | 414 sys.exit(Main()) |
| OLD | NEW |