Changes between Version 25 and Version 26 of android


Ignore:
Timestamp:
Feb 5, 2013, 2:31:05 PM (11 years ago)
Author:
Martin Kolman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • android

    v25 v26  
    3030[wiki:androidPython27_qtReadme README - build with PyQt]
    3131
     32'''Python from the Kivi project'''
     33
     34There is another actively maintaned Python distribution for Android, provided by the [http://kivy.org/ Kivi] project. It seems to work as well as android-python27, but I had issues building it on my Ubuntu 12.10 & NDK r8 machine. Built just fine on 12.04 @ NDK r7. There is also a [http://python-for-android.readthedocs.org/en/latest/android/#prebuilt-virtualbox virtual machine] for even easier building
     35
     36See the [wiki:kivyPythonForAndroid Kivy Python for Android article] for build instructions.
    3237
    3338===== Building SIP =====
    3439
    3540'''error: cannot find -lsupc++'''
    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
     42Probably 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.'''
    7845
    7946=== Qt + QML ===
    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.
     47The 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
     49When 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
     51If the libraries are updated or the application needs more libraries, the Ministro service handles everything automatically.
     52
     53It 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.
    8354
    8455There are two Ministro versions:
    85 * Ministro - provides Alpha 2 (0.2) libraries
     56* Ministro - provides Alpha 2 (0.2) libraries <- '''OBSOLETE'''
    8657* Ministro II - provides Alpha 3 libraries (cca 0.34)
    8758
    88 The Alpha 2 Qt libraries provided by necessitas are suable, but have a few issues, for example:
     59The Alpha 2 Qt libraries provided by necessitas are outdated and have many issues, such as:
    8960 * text both in Qt widgets and QML is rendered as rectangles '''unless it is set to italic'''
    9061 
     62So use Alpha 3+ libries if possible. This unfortunately means that the precompiled PySide libraries provided by THP will no longer work - use the [http://modrana.org/platforms/android/pyqt4/PyQt4-android.zip PyQt libraries] from the [http://code.google.com/p/android-python27/ android-python27] project instead.
     63
    9164This is more of a technical overview as from the point of view of the Python application, all this (making sure Ministro is installed & requesting Qt Libraries) is handled by the !PySide Launcher and the application does'n need to be even aware of it.
    9265