add check on aidl / 64 bits platform, and refer on installation instructions if it can't be runned.
Closes #228
This commit is contained in:
parent
3fc3c63e47
commit
04e3530fdb
2 changed files with 42 additions and 8 deletions
|
@ -257,6 +257,7 @@ class TargetAndroid(Target):
|
|||
self.buildozer.file_rename(unpacked, sdk_dir,
|
||||
cwd=self.buildozer.global_platform_dir)
|
||||
self.buildozer.info('Android SDK installation done.')
|
||||
|
||||
return sdk_dir
|
||||
|
||||
def _install_android_ndk(self):
|
||||
|
@ -401,6 +402,8 @@ class TargetAndroid(Target):
|
|||
if ver and ver > v_build_tools:
|
||||
self._android_update_sdk(self._build_package_string('build-tools',
|
||||
ver))
|
||||
# 2.bis check aidl can be runned
|
||||
self._check_aidl(v_build_tools)
|
||||
|
||||
# 3. finally, install the android for the current api
|
||||
android_platform = join(self.android_sdk_dir, 'platforms',
|
||||
|
@ -413,9 +416,30 @@ class TargetAndroid(Target):
|
|||
|
||||
self.buildozer.info('Android packages installation done.')
|
||||
|
||||
|
||||
self.buildozer.state[cache_key] = cache_value
|
||||
self.buildozer.state.sync()
|
||||
|
||||
def _check_aidl(self, v_build_tools):
|
||||
self.buildozer.debug('Check that aidl can be executed')
|
||||
v_build_tools = self._read_version_subdir(
|
||||
self.android_sdk_dir, 'build-tools')
|
||||
aidl_cmd = join(self.android_sdk_dir, 'build-tools', str(v_build_tools), 'aidl')
|
||||
self.buildozer.checkbin('Aidl', aidl_cmd)
|
||||
_, _, returncode = self.buildozer.cmd(aidl_cmd, break_on_error=False, show_output=False)
|
||||
if returncode != 1:
|
||||
self.buildozer.error('Aidl cannot be executed')
|
||||
if sys.maxint > 2 ** 32:
|
||||
self.buildozer.error('')
|
||||
self.buildozer.error('You might have missed to install 32bits libs')
|
||||
self.buildozer.error('Check http://buildozer.readthedocs.org/en/latest/installation.html')
|
||||
self.buildozer.error('')
|
||||
else:
|
||||
self.buildozer.error('')
|
||||
self.buildozer.error('In case of a bug report, please add a full log with log_level = 2')
|
||||
self.buildozer.error('')
|
||||
raise BuildozerException()
|
||||
|
||||
def install_platform(self):
|
||||
cmd = self.buildozer.cmd
|
||||
self.pa_dir = pa_dir = join(self.buildozer.platform_dir,
|
||||
|
|
|
@ -2,8 +2,8 @@ Installation
|
|||
============
|
||||
|
||||
Buildozer itself doesn't depend on any library, and works on Python 2.7 and >=
|
||||
3.3. Depending the platform you want to target, you might need more tools
|
||||
installed. Buildozer tries to give you hints or tries to install few things for
|
||||
3.3. Depending the platform you want to target, you might need more tools
|
||||
installed. Buildozer tries to give you hints or tries to install few things for
|
||||
you, but it doesn't cover every situation.
|
||||
|
||||
First, install the buildozer project with::
|
||||
|
@ -13,24 +13,34 @@ First, install the buildozer project with::
|
|||
Targeting Android
|
||||
-----------------
|
||||
|
||||
If you target Android, you must install at least Cython, few build libs, and a
|
||||
Java SDK. Some binaries of the Android SDK are still in 32 bits, so you need
|
||||
If you target Android, you must install at least Cython, few build libs, and a
|
||||
Java SDK. Some binaries of the Android SDK are still in 32 bits, so you need
|
||||
few 32bits libraries available::
|
||||
|
||||
Android on Ubuntu 12.04 (64bit)
|
||||
Android on Ubuntu 14.10 (64bit)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
::
|
||||
|
||||
sudo pip install --upgrade cython
|
||||
sudo apt-get install build-essential ccache git ia32-libs python2.7 python2.7-dev openjdk-7-jdk unzip zlib1g-dev
|
||||
sudo pip install --upgrade cython==0.21
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update
|
||||
sudo apt-get install build-essential ccache git lib32z1 lib32z1-dev python2.7 python2.7-dev openjdk-7-jdk unzip zlib1g-dev
|
||||
|
||||
Android on Ubuntu 13.10 (64bit)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
::
|
||||
|
||||
sudo pip install --upgrade cython
|
||||
sudo pip install --upgrade cython==0.21
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update
|
||||
sudo apt-get install build-essential ccache git ia32-libs libncurses5:i386 libstdc++6:i386 python2.7 python2.7-dev openjdk-7-jdk unzip zlib1g-dev zlib1g:i386
|
||||
|
||||
Android on Ubuntu 12.04 (64bit)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
::
|
||||
|
||||
sudo pip install --upgrade cython==0.21
|
||||
sudo apt-get install build-essential ccache git ia32-libs python2.7 python2.7-dev openjdk-7-jdk unzip zlib1g-dev
|
||||
|
|
Loading…
Reference in a new issue