Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Installing Qt for the Symbian platform using Linux (experimental)

This document describes how to install and configure Qt for the Symbian platform from scratch, using Linux as the build host. Qt for Symbian binaries can be downloaded directly so development of applications using Qt for Symbian can start right away.

Step 1: Setup the Development Environment

Qt for the Symbian platform has some requirements on the development platform. The Symbian SDK for Linux as well as a cross compiler for the ARM processor used on Symbian devices should be present on the development machine.

See http://qt.gitorious.org/qt/pages/QtCreatorSymbianLinux for more details.

Step 2: Unpack the Archive

Uncompress the downloaded source package into the directory you want Qt installed, e.g. /home/user/qt/%VERSION%.

Step 3: Set the Environment Variables

In order to build and use Qt, the PATH environment variable needs to be extended to fine Qt tools and also to find the Symbian platform tools:

First you need to set the EPOCROOT environment variable to point to the location of your S60 SDK:

 EPOCROOT=/home/user/s60-sdk/
 export EPOCROOT

Then you can update the PATH variable;

 PATH=/home/user/qt/%VERSION%/bin:$EPOCROOT/epoc32/tools:$PATH
 export PATH

Step 4: Configure Qt

To configure Qt for the Symbian platform, do:

 cd /home/user/qt/%VERSION%
 ./configure -platform linux-g++ -xplatform symbian-armcc

to build the libraries using RVCT or

 cd /home/user/qt/%VERSION%
 ./configure -platform linux-g++ -xplatform symbian-gcce -no-webkit

to build the libraries using GCCE.

Type ./configure -help to get a list of all available options. The Configuration Options for Qt page gives a brief overview of these.

Step 5: Build Qt

To build Qt for the device, type:

 make

Congratulations, Qt is now ready to use.

Step 6: Building Qt Packages for the Device

To run any application or demo on a real device, you need to install it on the device. To do this you first have to create a a package for the device, containing the libraries:

Building a Qt package without a certificate

If you have no certificate, build a self signed Qt:

 cd src
 make sis

The Qt libraries are built with "All -Tcb" capability, so that they can support all types of applications. However, these capabilities are automatically lowered if you make a self-signed package.

Building a Qt package with a Symbian developer certificate

If you have a Symbian-signed developer certificate, specify the capabilities you can sign for, for example:

 cd src/s60installs
 patch_capabilities.pl Qt_template.pkg - "ALL -Tcb -AllFiles -DRM"
 make sis QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
 cd ../3rdparty/webkit/WebCore
 patch_capabilities.pl QtWebKit_template.pkg - "ALL -Tcb -AllFiles -DRM"
 make sis QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>

Installing Qt Packages to the Device.

It is possible to install packages to a phone in Linux by putting the package on the phone memory card and then installing manually from the phone menu. However, this is tedious and will not work on phones without a memory card, so the method recommended by Qt is to use the App TRK tool.

Obtaining the App TRK package.

Download the package from the following location.

  • Application TRK. Choose the correct installation package based on the S60 version of your device (S60_<S60-version>_app_trk_<TRK-version>.sisx).

This package currently has to be installed by putting the package on the memory card and installing from the phone menu, or using a Windows PC for doing the install. However, the installation only has to be done once.

Configuring App TRK on the Phone

When App TRK is installed, connect the phone to the PC using the USB cable. Select "PCSuite" as connection type. Then run App TRK on the phone, and make sure that the connection type is USB. This can be changed under the Settings menu entry. If necessary, choose Connect from the menu.

Configuring the USB Serial Driver on the Linux System

On Linux, phone should appear as the /dev/ttyUSB1 device, however if you are running an old kernel, you may need to force the USB module to be loaded correctly before the device will appear:

 lsusb

Note the identifier on the line where your Symbian device appears. Then execute the following, using the first and second part of the identifier in place of XXX, respectively.

 sudo rmmod usbserial
 sudo modprobe usbserial vendor=0x0XXX product=0x0XXX

The rmmod step may fail if the module is not already loaded, but that is harmless.

Building the runonphone Tool.

Note that building the runonphone tool requires a separate installation of Qt for Linux. If there is a version of Qt installed by your distribution's package mechanism, that that should do fine. Some distributions separate the libraries from the development setup which includes qmake. Make sure you have both installed.

You will also need the libusb libraries and header files installed. Usually, installing a development package such as libusb-dev will ensure that you have all the necessary dependencies installed.

First, make sure that the qmake you use is taken from the Linux installation of Qt. The easiest way to make sure of this is to open a new shell and run the following command:

 $ qmake -version
 QMake version 2.01a
 Using Qt version 4.6.2 in /usr/lib/qt4

qmake will tell you where it is installed.

Copy the %QTDIR%/tools/runonphone folder to a place outside of the Qt tree. Then go to the folder in a shell and build it:

 cd $HOME/runonphone
 qmake
 make

Copy the resulting executable to a folder which is in your PATH environment variable.

Installing the Built Package onto the Phone

Note: Before starting, please make sure that there is no previously installed version of Qt on the phone.

Return to the root of the Qt tree configured for Symbian. Then install the Qt libraries by running the following:

 runonphone -s lib/Qt.sis

You may need to supply the path of the serial device file using the -p option:

 runonphone -s lib/Qt.sis -p /dev/ttyUSB1

If the installation fails, please make sure that there is no previously installed version of Qt on the phone.

Qt requires some dependent packages to be installed on the device, which can be installed using the runonphone tool as well. One is the sqlite3.sis, which is included in the Qt distribution, while the others are shipped with the Symbian SDK. The required packages can be found from the following locations:

 src/s60installs/sqlite3.sis
 $EPOCROOT/nokia_plugin/openc/s60opencsis/openc_ssl_s60_1_6_ss.sis
 $EPOCROOT/nokia_plugin/openc/s60opencsis/pips_s60_1_6_ss.sis
 $EPOCROOT/nokia_plugin/opencpp/s60opencppsis/stdcpp_s60_1_6_ss.sis

It is also possible to install packages onto the device using the runonphone build rule that qmake automatically generates for each Qt project. Options can be supplied to the runonphone tool that is invoked begind the scenes:

 make runonphone "QT_RUN_ON_PHONE_OPTIONS=-p /dev/ttyUSB1"

If you are running runonphone or invoking the runonphone build rule often, it is possible to set the QT_RUN_ON_PHONE_OPTIONS environment variable with the options you normally use:

 export QT_RUN_ON_PHONE_OPTIONS="-p /dev/ttyUSB1"
 make runonphone

This makes installation of packages onto a device easier and less error-prone.

Running Qt Demos

We've included a subset of the Qt examples in this package for you to try out. An excellent starting point is the "fluidlauncher" example.

Install and run the example by using the following commands:

 cd examples/embedded/fluidlauncher
 runonphone -s fluidlauncher.sis fluidlauncher.exe

The same command can be used for other applications:

 cd myapp
 qmake
 make
 make sis
 runonphone -s myapp.sis myapp.exe

For more information about building and running Qt programs on the Symbian platform, see The Symbian platform - Introduction to Qt.

We hope you will enjoy using Qt.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web