Changes between Version 2 and Version 3 of android


Ignore:
Timestamp:
Jul 7, 2012, 2:56:37 AM (12 years ago)
Author:
Martin Kolman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • android

    v2 v3  
    11= Porting modRana to Android =
    22As there is currently no GTK port for Android and not even any project trying to do this, only the QML GUI is relevant for running modRana on Android.
     3
     4Most of this is based on [http://thp.io/2011/pyside-android/ THP's excellent ''PySide for Android'' work].
    35
    46== Prerequisites ==
    57
    68=== Python ===
     9Python is needed as modRana is written in Python.
     10The [http://sourceforge.net/projects/pyside-android/files/data_python.tgz/download Python 2.6 binaries provided by THP] can be used. This archive also contains PySide binaries.
     11
     12To be usable, the a ''/data/python'' folder needs to be created on the Android folder, and the ''bin'' and ''lib'' folders need to be copied inside it (this can be easily done with the ''adb push'' command when the device is connected & in debugging mode).
     13
     14Then according to the THP, the main Python binary needs to be made executable:
     15
     16{{{
     17$ su
     18# chmod 755 /data/python/bin/python
     19}}}
     20
    721
    822=== Qt + QML ===
     23The 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.
     24
     25It 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.
     26
     27There are two Ministro versions:
     28* Ministro - provides Alpha 2 (0.2) libraries
     29* Ministro II - provides Alpha 3 libraries (cca 0.34)
     30
     31The ALpha 2 Qt libraries provided by necessitas are suable, but have a few issues, for example:
     32 * text both in Qt widgets and QML is rendered as rectangles '''unleess it is set to italic'''
     33 
     34This 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.
    935
    1036=== !PySide ===
     37To work, !PySide binaries need to be compatible with the installed Python & Qt versions.
     38
     39Compiled !PySide binaries are part of the Python tarball provided by THP.
    1140
    1241=== !PySide Launcher ===
     42!PySide programs can't be currently launched from the shell and have to use a special launcher application that makes sure all needed libraires are avalable and provides the application with acces to the screen.
     43
     44There is a !PySide Launcher APK on THPs site, but it doesn't work with !QtDeclarative due to missing dependency on libQtOpenGL.
     45
     46As a result, the !PySide launcher source needs to be slightly modified and a new APK created.
     47
     48
     49==== Modified !Pyside Launcher ====
     50
     51
     52 in:
     53''pyside-launcher-android/android/res/values/libs.xml''
     54
     55The ''qt_libs'' section should look like this:
     56{{{
     57    <array name="qt_libs">
     58        <item>QtCore</item>
     59        <item>QtGui</item>
     60        <item>QtDeclarative</item>
     61        <item>QtOpenGL</item>
     62    </array>
     63}}}
    1364
    1465=== Qt Components ===