36 | | Install: |
37 | | |
38 | | ==== Building Python for Android (Kivi)==== |
39 | | Based on [http://python-for-android.readthedocs.org/en/latest/prerequisites/ python-for-android documentation], built on Ubuntu 12.10 64-bit. |
40 | | |
41 | | Install prerequisites: |
42 | | {{{ |
43 | | sudo apt-get install build-essential patch git-core ccache ant python-pip python-dev |
44 | | }}} |
45 | | |
46 | | On a 64-bit distro: |
47 | | {{{ |
48 | | sudo apt-get install build-essential patch git-core ccache ant pip python-dev |
49 | | }}} |
50 | | |
51 | | Ensure you have the latest Cython version: |
52 | | |
53 | | {{{ |
54 | | sudo pip install --upgrade cython |
55 | | }}} |
56 | | |
57 | | Python for Android (the Kivi one) seems to build only with NDK-r7, so the NDK in current Necessitas SDK (NDK-r8b) can't be used. Just download the r7 NDK unpack it somewhere and set the NDK path. |
58 | | |
59 | | {{{ |
60 | | wget http://dl.google.com/android/ndk/android-ndk-r7-linux-x86.tar.bz2 |
61 | | tar xvf android-ndk-r7-linux-x86.tar.bz2 |
62 | | }}} |
63 | | |
64 | | The Android SDK from Necessitas can be used, just make sure API 14 is installed. |
65 | | |
66 | | |
67 | | {{{ |
68 | | cd python-for-android |
69 | | |
70 | | export ANDROIDSDK="<path to some android SDK that has API 14>" |
71 | | export ANDROIDNDK="<path to android ndk>" |
72 | | export ANDROIDNDKVER=r7 |
73 | | export ANDROIDAPI=14 |
74 | | |
75 | | ./distribute.sh -m "pyjnius kivy" -f |
76 | | }}} |
77 | | |
| 41 | |
| 42 | Probably cause - the source contains makefiles built against an old NDK version. |
| 43 | |
| 44 | '''I've not yet been able to rebuild PyQt for Android from source. The compiled binaries from the android-python27 project work fine though.''' |
80 | | The Necessitas project provides Qt libriries with QML support. Due to Android lacking proper package management, there is an android application called ''Ministro'' that handles library installation requests from ''Necessitas'' using applications. When an application using Necessitas is started for the first time, it redirects the user to the Google Play store to install Ministro (or Ministro II). Once Ministro is installed and its ''service'' is running, the application calls this service to request the Qt Libraries it needs. |
81 | | |
82 | | It seems that content of this request is governed by the '''libs.xml''' file in the Necessitas application package - if some libs are missing, this fil needs to be modified. |
| 47 | The Necessitas project provides Qt libriries with QML support. Due to Android lacking proper package management, there is an android application called ''Ministro'' that handles library installation requests from applications using ''Necessitas''. |
| 48 | |
| 49 | When an application using Necessitas is started for the first time, it redirects the user to the Google Play store to install Ministro. Once Ministro is installed and its ''service'' is running, the application calls this service to request the Qt Libraries it needs. |
| 50 | |
| 51 | If the libraries are updated or the application needs more libraries, the Ministro service handles everything automatically. |
| 52 | |
| 53 | It seems that content of this request is governed by the '''libs.xml''' file in the Necessitas application package - if some libs are missing, this file needs to be modified. Alternativelly, this can be easily from the the Necessitas Qt Creator. |