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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Installation Guide

Get the Qt Mobility API Package

To begin, obtain the most recent distribution package from http://get.qt.nokia.com

Pre-requisites & Dependencies

To install Qt Mobility you must already have installed Qt 4.6 or higher, visit http://get.qt.nokia.com to obtain a copy. However Mobility's QML components are not enabled unless Qt 4.7 or higher is used. Furthermore perl must be installed and available in the environment path. Windows environments may require the installation of a perl interpreter such as ActivePerl. On the Maemo 5 (Fremantle) platform PR1.2 firmware release or newer is required, and the Qt 4.7 packages are required.

Qt Mobility Project APIs are comprised of a number of domains. Some of these domains have dependencies and these are outlined below:

APIDependency

Bearer Management

The Linux backend depends on QtDBus (auto-detected) and NetworkManager, although Bearer Management will compile without them there will be reduced functionality.

On Mac, QtBearer depends on CoreWLAN (auto-detected) if Mac OS X SDK 10.6 is available. Functionality will be reduced if CoreWLAN is not available.

Contacts

The Maemo 5 backend depends on libosso-abook.

Document Gallery

The Maemo 5 backend depends on QtDBus and Tracker.

Location

The Symbian backend uses the LBT (Location Based Triggering) library for area notifications. Area notifications will be disabled at compile time if the LBT library is not found.

The LBT library is not publicly available at the time of writing. The developer documentation for S60 Location Services is probably the best source for LBT availability updates, as it will be updated when the library is released.

The landmarks backend for *nix,Windows and Fremantle platforms depends on QtSql. QtSql also needs the SQLite 3 driver (enabled by default in qt) at runtime.

The landmarks backend on the harmattan platform depends on QtSparql and QtSparql Tracker Extensions. There is also a runtime dependency for Tracker 0.9.30 or greater, and on libqtsparql-tracker which is the Tracker driver for QtSparql.

Messaging

On Linux, QtMessaging depends on qtopiamail from QMF.

The Windows Mobile backend depends on ActiveSync version 4.5.

While not supported for this release the desktop Windows backend requires that a MAPI subsystem is installed. Note that messaging functionality will not work if you are using the MinGW compiler. Additionally note that CE MAPI is available on Windows Mobile and does not need to be installed separately.

For more detailed instructions on installation on Windows Mobile see Messaging Installation On Windows Mobile

The messaging API SMS/MMS functionality requires that the platform provides SMS/MMS facilities. Email functionality requires that an email account is available on the platform.

Multimedia

On all platforms, QtMultimediaKit depends on QtGui and QtNetwork.

On all platforms, QML elements for sound effects and music and video playing are exported if QtDeclarative (auto-detected) is available.

On all platforms, additional rendering paths are enabled of QtOpenGL (auto-detected) is available.

Multimedia mediaservice plugins

The audioengine plugin for Unix depends on QtMultimediaKit.

The dsengine plugin for desktop Windows depends on QtMultimediaKit.

The gstengine plugin for Linux and Maemo depends on gstreamer-0.10 (>= 0.10.19), gstreamer-audio-0.10 (>= 0.10.19), gstreamer-base-0.10 (>= 0.10.19), gstreamer-interfaces-0.10 (>= 0.10.19) and gstreamer-video-0.10 (>= 0.10.19). If asound (auto-detected) is available, ALSA device detection will be enabled.

To enable all mediaservices on Symbian one must download sdk plugins. Sdk plugins are available at http://wiki.forum.nokia.com/index.php/SDK_API_Plug-in For 5th edition sdk plugins are installed with installer (all at once), but for FP1 and FP2 devices a zip is provided. You will need following plugins to compile all features: AudioRoutingAPI, Tuner Utility, (only for 3rd FP1), Radio Utility API (for 3rd FP2 and 5th ed), SymbianOnboardCameraAdvancedSettings API (for 3rd FP2 and 5th ed), MDF DevVideoRecord API (for 3rd FP2 and 5th ed). For camera autofocus support in 3rd edition FP1 one must download the following camera example app at http://www.forum.nokia.com/info/sw.nokia.com/id/2f492479-ac8c-4c3e-aa90-cc883e190d83/S60_Platform_Camera_Example_with_AutoFocus_Support_v2_2_en.zip.html and extract the autofocus extension plugin that is contained within it, namely autofocus_extension_library_s60_3rd_ed.zip.

Multimedia also includes audio and video (from 1.0.1 onwards) and in Symbian we need MMFDevSound API-SDK plugin to compile/link API. This is also available in Forum Nokia as a supplementary pack.

Publish & Subscribe

On Linux, QtPublishSubscribe depends on QtNetwork.

Sensors

The QtSensors s60_sensor_api plugin for S60 3.1 depends on the Sensor API Plug-in

The QtSensors symbian plugin for S60 3.2 depends on the backported Sensor API Plug-in

Service Framework

On all platforms, QtServiceFramework depends on QtSql. QtSql also needs the SQLite 3 driver (enabled by default) at runtime.

System Information

On all platforms, QtSystemInfo depends on QtNetwork.

Linux backend depends on QtDBus (auto-detected), HAL and NetworkManager, although System Information will compile without them, there will be reduced functionality. It also depends on QtGui, and on libbluetooth development headers.

The Mac backend depends on CoreWLAN (auto-detected) if the Mac OS X 10.6 SDK is available. It will compile with older SSDKsbut there will be reduced functionality.

For Maemo depends on QtDBus (auto-detected). QtDBus is used to communicate with HAL, and functionality will be reduced if either is unavailable.

The Symbian backend depends on WLANManagementAPI. WLANManagementAPI plugin is available at http://wiki.forum.nokia.com/index.php/SDK_API_Plug-in For 5th edition sdk plugins are installed with installer (all at once), but for FP1 and FP2 devices a WLANManagementAPI.zip is provided.

Also for Symbian, it depends on SIM Utils API SDK plugin available from Forum Nokia http://wiki.forum.nokia.com/index.php/File:SIMUtilsAPI_3x_50.zip

On Symbian 3 FP2, it depends on the Multiple Drive Support available from Forum Nokia http://www.forum.nokia.com/Library/Tools_and_downloads/Other/Multiple_Drive_Support_plug-in.xhtml

QtVersit

On all platforms, QtVersit depends on QtContacts and QtOrganizer.

Unpacking

Unpack the Qt Mobility archive if you have not done so already, on Unix (X11 and Mac):

 cd /tmp
 gunzip %DISTNAME%.tar.gz        #uncompress the archive
 tar xvf %DISTNAME%.tar          #unpack it

This creates the directory /tmp/%DISTNAME% containing the files from the archive. We only support the GNU version of the tar archiving utility. Note on some systems it is called gtar.

On windows, uncompress the zip file into the directory you want Qt Mobility Project installed, extracting to C:\QtMobility will create the directory C:\QtMobility\%DISTNAME%

NOTE: The install path(prefix) must not contain any spaces.

Building

Ensure that all compile time dependencies for your particular platform have been met before building.

If Qt is installed for multiple platforms it is also important to ensure that the correct version of qmake is being used.

Note: Static builds of Qt are not supported by Qt Mobility.

Building On Unix

To configure the Qt Mobility libraries for your machine, run the ./configure script in the package directory.

To specify the installation directory you may use the -prefix option. Not passing a prefix installs the mobility libraries into $PWD/install.

 cd /tmp/%DISTNAME%
 ./configure -prefix $TARGET_DIR

Type ./configure -help to get a list of all available options. If you are building for maemo you need to use the -maemo option with configure.

To create all the libraries and tools, type:

 make

To install the libraries and tools to $TARGET_DIR, type:

 make install

If you have specified an install directory with root ownership, you will need to type:

 su -c "make install"
     or
 sudo make install

and enter in the appropriate password.

Note that on some systems the make utility is named differently, e.g. gmake. The configure script tells you which make utility to use.

Building On Windows

To configure the Qt Mobility libraries for your machine, run configure in the package directory.

To specify the installation directory you may use the -prefix option. Not passing a prefix installs the mobility libraries into an install directory within the current working directory.

     cd c:\QtMobility\%DISTNAME%
     configure -prefix %TARGET_DIR%

Type configure -help to get a list of all available options.

The actual commands needed to build and install Qt Mobility depends on your development system. To create and install the libraries and tools from a Microsoft Visual Studio command prompt, type:

 nmake
 nmake install

Building For Windows CE

The process is much the same as for Windows, although it is important to run the setcepaths script from the bin directory of the Qt for Windows CE installation to ensure that the correct headers and libraries are used.

Building For Symbian On Windows

Building Qt Mobility for Symbian is not necessary as the package contains pre-built binaries for the SDK and SIS file for the device. See the INSTALL.symbian file on how to deploy these. The file is located in the root directory of the package.

If you wish to build QtMobility yourself, run configure in the package directory. (-prefix cannot be used since the libraries are installed into the SDK directory)

     cd c:\QtMobility\%DISTNAME%
     configure

Type configure -help to get a list of all available options.

To create and deploy the libraries and tools for the emulator run:

 make debug-winscw

To create the libraries and tools using the commercial compiler RVCT for a device, run:

 make release-armv5

Note: make install has no meaning for building on Symbian. The libraries will be deployed into the SDK (when running make) and will be ready to use for compiling applications for the emulator and/or device.

Building For Mac OS X

The process is the same as for Unix, with the additional configuration option of -sdk /Developer/SDKs/MacOSX10.5.sdk to specify an Apple SDK version other than the default.

Note: QtMobility currently has no support for building with Xcode.

Note: QtMobility will be built using the same frameworks configuration option that Qt was built with.

Building Individual Qt Mobility Modules

Qt Mobility is comprised of several modules but all of these may not need to be built. To specify which modules should be built, use the -modules switch with the configure script when performing the configure step as outlined above.

e.g. To build just the bearer module:

 configure -modules bearer

If multiple modules are required the module names should be separated by a space and surrounded by double quotation marks. If a selected module depends on other modules the dependencies will be enabled automatically.

.e.g. To build just the bearer and location modules:

 configure -modules "bearer location"

Type configure -help to see the names of the available modules.

Making the libraries available to applications

In order to use QtMobility some environment variables need to be extended to locate the libraries, which are placed in the lib directory of the install path.

Making the libraries available on Unix

The environment variable LD_LIBRARY_PATH should be extended to include: $TARGET_DIR/lib

In .profile (if your Unix shell is bash,ksh,zsh or sh), add the following lines

 LD_LIBRARY_PATH=$TARGET_DIR/lib:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH

In .login (incase your shell is csh or tcsh), add the following line:

 setenv LD_LIBRARY_PATH=$TARGET_DIR/lib:$LD_LIBRARY_PATH

If you use a different Unix shell, please modify your your environment variables accordingly.

Making the libraries available on Windows

The environment variable PATH should be extended to include: C:\%TARGET_DIR%\lib

For newer versions of windows, PATH can be extended through "Start->Settings->Control Panel->System->Advanced-> Environment variables" and for older versions by editing C:\autoexec.bat

Making the libraries available on Windows CE

Environment variables do not exist on Windows CE, and so users of Qt Mobility for Windows CE have to do things slightly differently. A pre-requisite for Qt Mobility applications is that the Qt libraries and plugins have been deployed as per Qt's documentation.

The deployment of the libraries to the device is normally done with Microsoft Visual Studio or Microsoft ActiveSync.

The libraries can be made globally available by deploying them to C:\Windows on the device, or can be deployed once per application by copying them into the same directory as the executable. Mobility expects plug-ins in the subdirecty plugins/<APIname> in one of the locations specified by QCoreApplication::libraryPaths() which includes C:\Windows and the Mobility application's directory.

And now the installation is complete, we hope you enjoy using Qt Mobility.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();
Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année

Le blog Digia au hasard

Logo

Déploiement d'applications Qt Commercial sur les tablettes Windows 8

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 qtmobility-1.1
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