1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-06 11:00:13 +02:00

Simplify SDK path configuration

As long as we're making the user specify the path to the SDK, we can
use that information to find all the tools - there's no need for
specifying the location of aapt separately or requiring the tools to
be in $PATH.
This commit is contained in:
Henrik Tunedal 2011-04-06 20:55:27 +02:00
parent a87532a54c
commit 4cfc02ae9d
4 changed files with 12 additions and 9 deletions

1
README
View File

@ -31,7 +31,6 @@ To be able to auto-build packages, you're going to need:
You then need to create a config.py (copy config.sample.py and follow the
instructions) to specify the locations of some of these things.
Also make sure the SDK tools - found in $SDK/tools/ - are in your $PATH.
=MetaData=

View File

@ -195,7 +195,8 @@ for app in apps:
# Generate (or update) the ant build file, build.xml...
if thisbuild.get('update', 'yes') == 'yes':
parms = ['android','update','project','-p','.']
parms = [os.path.join(sdk_path, 'tools', 'android'),
'update', 'project', '-p', '.']
parms.append('--subprojects')
if thisbuild.has_key('target'):
parms.append('-t')
@ -449,8 +450,10 @@ for app in apps:
# By way of a sanity check, make sure the version and version
# code in our new apk match what we expect...
p = subprocess.Popen([aapt_path,'dump','badging',
src], stdout=subprocess.PIPE)
p = subprocess.Popen([os.path.join(sdk_path, 'platform-tools',
'aapt'),
'dump', 'badging', src],
stdout=subprocess.PIPE)
output = p.communicate()[0]
if thisbuild.get('novcheck', 'no') == "yes":
vercode = thisbuild['vercode']
@ -531,8 +534,9 @@ for app in apps:
sys.exit(1)
# Zipalign it...
p = subprocess.Popen(['zipalign', '-v', '4',
dest_unsigned, dest], stdout=subprocess.PIPE)
p = subprocess.Popen([os.path.join(sdk_path,'tools','zipalign'),
'-v', '4', dest_unsigned, dest],
stdout=subprocess.PIPE)
output = p.communicate()[0]
print output
if p.returncode != 0:

View File

@ -2,7 +2,6 @@
#Copy this file to config.py, then amend the settings below according to
#your system configuration.
aapt_path = "/path/to/android-sdk-linux_86/platform-tools/aapt"
sdk_path = "/path/to/android-sdk-linux_86"
ndk_path = "/path/to/android-ndk-r5"

View File

@ -95,8 +95,9 @@ for apkfile in glob.glob(os.path.join('repo','*.apk')):
thisinfo['size'] = os.path.getsize(apkfile)
thisinfo['permissions'] = []
thisinfo['features'] = []
p = subprocess.Popen([aapt_path,'dump','badging',
apkfile], stdout=subprocess.PIPE)
p = subprocess.Popen([os.path.join(sdk_path, 'platform-tools', 'aapt'),
'dump', 'badging', apkfile],
stdout=subprocess.PIPE)
output = p.communicate()[0]
if options.verbose:
print output