chiark / gitweb /
Deprecate aapt_path in favour of sdk_path + build_tools
authorDaniel Martí <mvdan@mvdan.cc>
Thu, 8 Aug 2013 11:00:02 +0000 (13:00 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 8 Aug 2013 11:00:02 +0000 (13:00 +0200)
config.sample.py
fdroidserver/build.py
fdroidserver/common.py
fdroidserver/update.py

index 02d048073421bcfa0f7ca11fc4655174d3a5320e..d1417362dd5a4f7029813bdff3cc161fa53cc40c 100644 (file)
@@ -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"
 
index e0caa615c303c659ed6e59db7b3f0f1f676834d8..5f0056ec95a143d2c301e31716ea0527ae33b168 100644 (file)
@@ -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]
index 3ff3461414582bdf88cad461f552299277687188..6b06871ccb06d090822c06d4ea76aaa18a217679 100644 (file)
@@ -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]
index c705cb4bbbd1d1a545125742d9910eb77c3bbb22..d40773d5c7f36c1e4a1c3a2129369f362df0cca2 100644 (file)
@@ -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]