Merge branch 'master' of https://github.com/zworkb/buildozer into zworkb-master
This commit is contained in:
commit
7fb6535c08
2 changed files with 19 additions and 5 deletions
|
@ -744,7 +744,7 @@ class Buildozer(object):
|
||||||
|
|
||||||
rmtree(self.app_dir)
|
rmtree(self.app_dir)
|
||||||
|
|
||||||
for root, dirs, files in walk(source_dir):
|
for root, dirs, files in walk(source_dir, followlinks=True):
|
||||||
# avoid hidden directory
|
# avoid hidden directory
|
||||||
if True in [x.startswith('.') for x in root.split(sep)]:
|
if True in [x.startswith('.') for x in root.split(sep)]:
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -285,6 +285,13 @@ class TargetAndroid(Target):
|
||||||
_version = re.search('(.+?)[a-z]', self.android_ndk_version).group(1)
|
_version = re.search('(.+?)[a-z]', self.android_ndk_version).group(1)
|
||||||
|
|
||||||
self.buildozer.info('Android NDK is missing, downloading')
|
self.buildozer.info('Android NDK is missing, downloading')
|
||||||
|
# Welcome to the NDK URL hell!
|
||||||
|
# a list of all NDK URLs up to level 14 can be found here:
|
||||||
|
# https://gist.github.com/roscopecoltran/43861414fbf341adac3b6fa05e7fad08
|
||||||
|
# it seems that from level 11 on the naming schema is consistent
|
||||||
|
# from 10e on the URLs can be looked up at
|
||||||
|
# https://developer.android.com/ndk/downloads/older_releases
|
||||||
|
|
||||||
if platform in ('win32', 'cygwin'):
|
if platform in ('win32', 'cygwin'):
|
||||||
# Checking of 32/64 bits at Windows from: http://stackoverflow.com/a/1405971/798575
|
# Checking of 32/64 bits at Windows from: http://stackoverflow.com/a/1405971/798575
|
||||||
import struct
|
import struct
|
||||||
|
@ -292,16 +299,18 @@ class TargetAndroid(Target):
|
||||||
is_64 = (8 * struct.calcsize("P") == 64)
|
is_64 = (8 * struct.calcsize("P") == 64)
|
||||||
|
|
||||||
elif platform in ('darwin', ):
|
elif platform in ('darwin', ):
|
||||||
if int(_version) > 9:
|
if _version >= '10e':
|
||||||
|
archive = 'android-ndk-r{0}-darwin-{1}.zip'
|
||||||
|
elif _version >= '10c':
|
||||||
archive = 'android-ndk-r{0}-darwin-{1}.bin'
|
archive = 'android-ndk-r{0}-darwin-{1}.bin'
|
||||||
else:
|
else:
|
||||||
archive = 'android-ndk-r{0}-darwin-{1}.tar.bz2'
|
archive = 'android-ndk-r{0}-darwin-{1}.tar.bz2'
|
||||||
is_64 = (os.uname()[4] == 'x86_64')
|
is_64 = (os.uname()[4] == 'x86_64')
|
||||||
|
|
||||||
elif platform.startswith('linux'):
|
elif platform.startswith('linux'):
|
||||||
if int(_version) > 10:
|
if _version >= '10e':
|
||||||
archive = 'android-ndk-r{0}-linux-{1}.zip'
|
archive = 'android-ndk-r{0}-linux-{1}.zip'
|
||||||
elif int(_version) > 9: # if greater than 9, take it as .bin file
|
elif _version >= '10c':
|
||||||
archive = 'android-ndk-r{0}-linux-{1}.bin'
|
archive = 'android-ndk-r{0}-linux-{1}.bin'
|
||||||
else:
|
else:
|
||||||
archive = 'android-ndk-r{0}-linux-{1}.tar.bz2'
|
archive = 'android-ndk-r{0}-linux-{1}.tar.bz2'
|
||||||
|
@ -313,7 +322,12 @@ class TargetAndroid(Target):
|
||||||
unpacked = 'android-ndk-r{0}'
|
unpacked = 'android-ndk-r{0}'
|
||||||
archive = archive.format(self.android_ndk_version, architecture)
|
archive = archive.format(self.android_ndk_version, architecture)
|
||||||
unpacked = unpacked.format(self.android_ndk_version)
|
unpacked = unpacked.format(self.android_ndk_version)
|
||||||
url = 'http://dl.google.com/android/repository/'
|
|
||||||
|
if _version >= '10e':
|
||||||
|
url = 'https://dl.google.com/android/repository/'
|
||||||
|
else:
|
||||||
|
url = 'http://dl.google.com/android/ndk/'
|
||||||
|
|
||||||
self.buildozer.download(url,
|
self.buildozer.download(url,
|
||||||
archive,
|
archive,
|
||||||
cwd=self.buildozer.global_platform_dir)
|
cwd=self.buildozer.global_platform_dir)
|
||||||
|
|
Loading…
Reference in a new issue