Difference between revisions of "Qt4 Maemo Binding"

From Lazarus wiki
Jump to navigationJump to search
Line 1: Line 1:
 
= Qt4 Maemo Binding =
 
= Qt4 Maemo Binding =
  
This page describes the Free Pascal Qt4 Binding for Maemo.
+
This page describes the Free Pascal Qt4 Binding for Maemo.  
Currently Maemo5 on N900 PR1.2 is supported.
+
Currently Maemo5 on the Nokia N900 version PR1.2 is supported.
 +
The binding is an interface to the Qt 4.6.2 of the PR1.2 release.
  
 
== Introduction ==
 
== Introduction ==
To develop with Qt for the N900, the scratchbox based Maemo SDK is used.
+
To develop with C++ Qt for the N900, Nokia provides a scratchbox based SDK: [http://wiki.maemo.org/Documentation/Maemo_5_Final_SDK_Installation Maemo5 SDK Installation]
The Free Pascal binding is technically a Qt C++ library, so to compile this binding library, the Qt Maemo Scratchbox instructions by Nokia should suffice.
+
The Free Pascal binding is technically just a Qt C++ library, so to compile this binding library, the scratchbox SDK is needed.
However if you use the provided binary of the FreePascal Binding for Maemo, you do not need to install the scratchbox environment.
+
However if you use the provided library binary of the Free Pascal Binding for Maemo, you do not need to install the scratchbox environment.
  
  
Line 13: Line 14:
  
 
These instructions explain how to compile the Free Pascal Qt4 Binding for Maemo sources.
 
These instructions explain how to compile the Free Pascal Qt4 Binding for Maemo sources.
 
+
If you use the provided binary of the binding, this is not necessary.
  
 
* Install the scratchbox based Maemo5 SDK: [http://wiki.maemo.org/Documentation/Maemo_5_Final_SDK_Installation Maemo5 SDK Installation]
 
* Install the scratchbox based Maemo5 SDK: [http://wiki.maemo.org/Documentation/Maemo_5_Final_SDK_Installation Maemo5 SDK Installation]
Line 30: Line 31:
  
 
== Installation on the N900 device ==
 
== Installation on the N900 device ==
 +
 +
These instructions explain how to install the Free Pascal Qt4 Binding for Maemo on the Nokia N900 device.
 +
 +
How to setup a wifi or usb access to the device is out of the scope (see Nokia instructions)
 +
The instructions assume a working ssh access to the N900 using hostname n900.
 +
 +
First obtain the binding library (libQt4Pas.so.6.2.2) either from the provided binary or from compilation within scratchbox.
 +
 +
Note that it is possible to setup ssh from within scratchbox and ssh from scratchbox to the N900. You can also access the compiled library in scratchbox outside the scratchbox environment. If you installed scratchbox to /scratchbox, then the scratchbox user home directory is located at /scratchbox/users/myusername/home/myusername/.
 +
 +
 +
* Copy the library to the device opt directory ([http://wiki.maemo.org/Opt_Problem#The_.2Fopt_Problem optify])
 +
scp libQt4Pas.so.6.2.2 root@n900:/opt/lib/
 +
* login to the device as root
 +
ssh root@n900
 +
* create symlinks
 +
ln -s /opt/lib/libQt4Pas.so.6.2.2 /usr/lib/libQt4Pas.so.6
 +
ln -s /opt/lib/libQt4Pas.so.6.2.2 /usr/lib/libQt4Pas.so

Revision as of 10:44, 28 July 2010

Qt4 Maemo Binding

This page describes the Free Pascal Qt4 Binding for Maemo. Currently Maemo5 on the Nokia N900 version PR1.2 is supported. The binding is an interface to the Qt 4.6.2 of the PR1.2 release.

Introduction

To develop with C++ Qt for the N900, Nokia provides a scratchbox based SDK: Maemo5 SDK Installation The Free Pascal binding is technically just a Qt C++ library, so to compile this binding library, the scratchbox SDK is needed. However if you use the provided library binary of the Free Pascal Binding for Maemo, you do not need to install the scratchbox environment.


Compilation of the binding

These instructions explain how to compile the Free Pascal Qt4 Binding for Maemo sources. If you use the provided binary of the binding, this is not necessary.

  • Install the scratchbox based Maemo5 SDK: Maemo5 SDK Installation
  • After installation, start as root scratchbox: /scratchbox/sbin/sbox_ctl start
  • As normal user login: /scratchbox/login
  • select using sb-menu the arm environment
  • install the Qt4 devel package
    • fakeroot apt-get update
    • fakeroot apt-get install libqt4-dev
  • download (e.g. using wget) and unpack the sources
  • cd into the sources directory
  • qmake (creates Makefile)
  • make (compiles)
  • strip LibraryFileName (reduce filesize)
  • fakeroot make install (installs in scratchbox)

Installation on the N900 device

These instructions explain how to install the Free Pascal Qt4 Binding for Maemo on the Nokia N900 device.

How to setup a wifi or usb access to the device is out of the scope (see Nokia instructions) The instructions assume a working ssh access to the N900 using hostname n900.

First obtain the binding library (libQt4Pas.so.6.2.2) either from the provided binary or from compilation within scratchbox.

Note that it is possible to setup ssh from within scratchbox and ssh from scratchbox to the N900. You can also access the compiled library in scratchbox outside the scratchbox environment. If you installed scratchbox to /scratchbox, then the scratchbox user home directory is located at /scratchbox/users/myusername/home/myusername/.


  • Copy the library to the device opt directory (optify)
scp libQt4Pas.so.6.2.2 root@n900:/opt/lib/
  • login to the device as root
ssh root@n900
  • create symlinks
ln -s /opt/lib/libQt4Pas.so.6.2.2 /usr/lib/libQt4Pas.so.6
ln -s /opt/lib/libQt4Pas.so.6.2.2 /usr/lib/libQt4Pas.so