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:
parent
a87532a54c
commit
4cfc02ae9d
1
README
1
README
@ -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=
|
||||
|
||||
|
14
build.py
14
build.py
@ -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:
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user