From ece2ece0719e243dd5b7084b51987efabf61c87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 8 Aug 2013 13:00:02 +0200 Subject: [PATCH] Deprecate aapt_path in favour of sdk_path + build_tools --- config.sample.py | 4 ---- fdroidserver/build.py | 8 +------- fdroidserver/common.py | 9 ++------- fdroidserver/update.py | 5 +---- 4 files changed, 4 insertions(+), 22 deletions(-) diff --git a/config.sample.py b/config.sample.py index 02d04807..d1417362 100644 --- a/config.sample.py +++ b/config.sample.py @@ -8,10 +8,6 @@ ndk_path = "/path/to/android-ndk-r8e" # Build tools version to be used build_tools = "18.0.1" -# May be necessary for fdroid update; you may still need to make a symlink to -# aapt in platform-tools -aapt_path = "/path/to/android-sdk-linux_x86/build-tools/17.0.0/aapt" - #You probably don't need to change this... javacc_path = "/usr/share/java" diff --git a/fdroidserver/build.py b/fdroidserver/build.py index e0caa615..5f0056ec 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -483,14 +483,8 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d print "Checking " + src if not os.path.exists(src): raise BuildException("Unsigned apk is not at expected location of " + src) - if ('aapt_path' not in globals()): - # (re-)read configuration - execfile('config.py', globals()) - if not os.path.exists(aapt_path): - print "Missing aapt - check aapt_path in your config" - sys.exit(1) - p = subprocess.Popen([aapt_path, + p = subprocess.Popen([os.path.join(sdk_path, 'build-tools', build_tools, 'aapt'), 'dump', 'badging', src], stdout=subprocess.PIPE) output = p.communicate()[0] diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 3ff34614..6b06871c 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1589,14 +1589,9 @@ def isApkDebuggable(apkfile): :param apkfile: full path to the apk to check""" - if ('aapt_path' not in globals()): - # (re-)read configuration - execfile('config.py', globals()) - if not os.path.exists(aapt_path): - print "Missing aapt - check aapt_path in your config" - sys.exit(1) + execfile('config.py', globals()) - p = subprocess.Popen([aapt_path, + p = subprocess.Popen([os.path.join(sdk_path, 'build-tools', build_tools, 'aapt'), 'dump', 'xmltree', apkfile, 'AndroidManifest.xml'], stdout=subprocess.PIPE) output = p.communicate()[0] diff --git a/fdroidserver/update.py b/fdroidserver/update.py index c705cb4b..d40773d5 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -267,10 +267,7 @@ def scan_apks(apps, apkcache, repodir, knownapks): thisinfo['size'] = os.path.getsize(apkfile) thisinfo['permissions'] = [] thisinfo['features'] = [] - if not os.path.exists(aapt_path): - print "Missing aapt - check aapt_path in your config" - sys.exit(1) - p = subprocess.Popen([aapt_path, + p = subprocess.Popen([os.path.join(sdk_path, 'build-tools', build_tools, 'aapt'), 'dump', 'badging', apkfile], stdout=subprocess.PIPE) output = p.communicate()[0]