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  · 

Building for Multiple Targets

Different build configurations allow you to quickly switch between different build settings. By default, Qt Creator creates debug and release build configurations.

Building for Desktop

  1. Select Desktop as the target.
  2. Click the Run button.

Building for Qt Simulator

You can use the Qt Simulator to test Qt applications that are intended for mobile devices in an environment similar to that of the device. You can change the information that the device has about its configuration and environment.

  1. Select Qt Simulator as the target.
  2. Click the Run button.

For more information about using the Qt Simulator, see the Qt Simulator Manual.

Building for Maemo

  1. Build and run the application for Qt Simulator.
  2. Build and run the application for Maemo Emulator.
  3. Alternatively, you can build and run the application for a device:
    1. Set up the MADDE development environment and specify a connection to the device. For more information, see Setting Up Development Environment for Maemo.
    2. Connect the device to the development PC.
    3. Click the Run button.

Qt Creator uses the compiler specified in the MADDE toolchain to build the application.

Qt Creator generates an installation package, installs in on the device, and executes it. The application views are displayed on the Nokia N900. Command-line output is visible in the Qt Creator Application Output view.

Debugging also works transparently.

Creating Installation Packages

When you build the application for the Maemo target, Qt Creator automatically generates a debian installation package in the project folder. You can deliver the installation package to users for installation on Maemo devices.

You can add other files to the installation package in the Create package step in the build configuration. Add files to the Package contents field. In Local File Path, specify the location of the file on the development PC. In Remote File Path, specify the folder to install the file on the device.

"Create installation package"

Building for Symbian

  1. Build and run the application for Qt Simulator.
  2. If no problems are found, build and run the application for a device.
  3. To test functionality that uses Symbian APIs, you can build and run the application for Symbian Emulator.

The build configuration for the Symbian Device target uses the GCCE tool chain by default. If you want to build for the device using RVCT, select it in the Tool chain field in the General section.

Building and Running for a Device

  1. Install the required software on the device. For more information, see Setting Up Development Environment for Symbian.
  2. Connect the device to the development PC through a USB cable. The target selector displays a green check mark when a device is connected.

    The tool tip of the target selector shows more details about the actual device that will be used when you run your application.

  3. Start the App TRK application on your device.
  4. Click the Run button.

You can connect several devices to your development PC simultaneously. In the details of the run configuration for the Symbian Device target, select the device to run your application on.

Creating Installation Packages

When you build the application for the Symbian Device target, Qt Creator automatically generates a Symbian installation system (SIS) file in the project folder. You can deliver the installation file to users for installation on Symbian devices.

Only installation files signed with a certificate and private key are allowed to be installed onto Symbian devices. By default, Qt Creator self-signs the installation file. This self-signing allows you to install the application on a mobile device but places limits on what you can do with the installation file, including:

  • Self-signed applications cannot access the more sensitive capabilities of the mobile device.
  • Security warnings will be displayed when you install the self-signed application on a mobile device.
  • Self-signed applications cannot be distributed commercially on Ovi Store.

To get around these limitations, you need to go through the Symbian Signed process. The Symbian Signed organisation manages a public key infrastructure to provide public authentication of the information in the application signing certificates. Their security partner can validate your certificate and give you a Publisher ID. Then, when you sign an application, other people can be confident that the information in your certificate is correct and that the application does actually come from you.

There are also options that do not require you to get a Publisher ID. For more detail about how the Symbian Signed process works, see Complete Guide to Symbian Signed.

When you have your own certificate and private key, you can specify them in the Create SIS Package step in your build configuration.

Capabilities and Signing

Capabilities allow the Symbian platform to control access by applications to the functionality provided by the platform APIs. Access to capabilities is determined by the device configuration and how the application has been signed.

Symbian Signed offers the following signing options depending on the capabilities that the application accesses:

  • Express signed for applications that access only user and system capabilities.
  • Certified signed for applications that access also restricted or device manufacturer capabilities.

    Note: You need to request the rights to access device manufacturer capabilities from the manufacturer.

For more information about how to choose the appropriate signing option, see Symbian Signed For Distributing Your Application.

If you select a signing option that does not allow the application to access the defined capabilities, installing the application on mobile devices fails. To avoid problems, only define capabilities and link libraries to a project if you really need them.

For more information about capabilities and how you can check which ones you need, see Capabilities (Symbian Signed) and Required Capabilities for Qt Applications.

For more information on how to define capabilities for a project, see Capabilities.

Application UID

A UID is a globally unique identifier that is used to uniquely identify, for example, an object or file type. In Symbian development, objects are identified by compound identifiers that are constructed from three UIDs, namely UID1, UID2, and UID3. UID1 and UID2 specify the category of an object, whereas UID3 identifies a particular object, such as an application.

When you create a Mobile Qt Application, Qt Creator adds a UID3 suitable for development and debugging automatically to the application .pro file. However, to distribute your application and get it Symbian signed, you must apply for a UID from Symbian, who manages the allocation of UIDs. You can request UIDs either one at a time or as preallocated blocks on the Symbian Signed web site.

Replace the testing UID with the distribution UID in the .pro file before you build the final installation package. For more information, see Unique Identifiers.

Building and Running for Symbian Emulator

Select the Symbian Emulator target as the active one, and build and run your project.

Troubleshooting

If you cannot build the application, check if:

  • You selected the Symbian Device target for building the application.
  • The settings for the Qt version you use to build your project are correct. The path to the Symbian SDK must point to the Symbian SDK installation directory. Select Tools > Options... > Debugger > Symbian TRK and check if it points to the debugger toolchain.

If you cannot run the application on a device, check if:

  • The device is connected through the USB cable in PC Suite mode.
  • App TRK is running on the device, using the USB connection, with the status connected.
  • The device is detected and selected in the run configuration details.

If you cannot run the application in the emulator, check if:

  • You selected the Symbian Emulator target for your application.
  • If you cannot select Symbian Emulator as target, check that Carbide.c++ is installed correctly and that the path to the Carbide.c++ installation directory is specified in the Carbide directory field in the build settings.
  • If the emulator process cannot be started, try closing Qt Creator and starting the application directly from your file manager. Having done this, Qt Creator should be able to run your projects in the emulator.

Note: Qt Creator does not create release configurations for the Symbian Emulator target, because Symbian Emulator supports only debug builds.

If this does not help to solve your problem, search the qt-creator@trolltech.com mailing list archives or provide feedback to us via the methods described on the Qt Creator Development Wiki.

Building with Remote Compiler

The Remote Compiler target is an interface to a compilation service at Forum Nokia. It provides a simple, standardized environment for building Qt applications and creating installation packages for Symbian and Maemo devices when you do not have the necessary tool chains and SDKs installed or they are not supported on the development PC. You can choose from a set of supported devices, such as S60 3rd Edition or S60 5th Edition devices.

Note: Remote Compiler is an experimental component that you must install separately from the package that is included in the Nokia Qt SDK.

  1. In the Nokia Qt SDK installation directory, double-click SDKMaintenanceTool.exe to install Experimental APIs.
  2. In Qt Creator, choose Tools > Options > Projects > Remote Compiler to log on to Forum Nokia.

    "Remote Compiler options"

  3. Choose Projects.
  4. Click "Add Target button" and select Remote Compiler to add Remote Compiler as a target.
  5. Click Add to add mobile device platforms as build configurations.
  6. Click the Target Selector and select a build configuration.
  7. Choose Build > Build All.

The installation package is generated in the Build directory on the development PC.

For more information about Remote Compiler, choose Help > Contents > Remote Compiler. The document is added during the installation of experimental APIs.

X

rc="scripts/functions.js" type="text/javascript">
Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Comment fermer une application

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. 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 qtcreator-2.0
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