find cmds from SDK build-tools in a more flexible way, on the fly

This is a more flexible approach than testing for the complete SDK and
build-tools up front.  This will only test for the commands that are
actually being run, so that if you only have `aapt` installed, you can do
`fdroid update` without errors, but other commands will still give
appropriate errors.

This also makes the build_tools item in config.py optional, it is only
needed if you want to force a specific version of the build-tools.
This commit is contained in:
Hans-Christoph Steiner 2014-12-09 14:12:41 +01:00
parent 298a88a498
commit 9244256461
6 changed files with 132 additions and 46 deletions

View file

@ -35,7 +35,7 @@ import logging
import common
import metadata
from common import FDroidException, BuildException, VCSException, FDroidPopen, SilentPopen
from common import FDroidException, BuildException, VCSException, FDroidPopen, SdkToolsPopen
try:
import paramiko
@ -754,7 +754,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
if not os.path.exists(src):
raise BuildException("Unsigned apk is not at expected location of " + src)
p = SilentPopen([config['aapt'], 'dump', 'badging', src])
p = SdkToolsPopen(['aapt', 'dump', 'badging', src])
vercode = None
version = None