Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

(Difference between revisions)

Archived:Setting up environment for Qt Mobility API

From Wiki
Jump to: navigation, search
treinio (Talk | contribs)
(Prerequisite)
treinio (Talk | contribs)
(Complete overhaul for everything)
Line 14: Line 14:
 
= Steps =  
 
= Steps =  
  
== Setup Qt 4.6.2 ==
+
== Setup Qt for Symbian ==
* Download Qt 4.6.2 for Symbian from here: [http://qt.nokia.com/downloads/symbian-cpp qt-symbian-opensource-4.6.2.exe]
+
* Download [http://qt.nokia.com/downloads/symbian-cpp Qt for Symbian].
* Install it on your PC.  
+
 
[[File:Qt4.6.2.PNG]]
+
* Install it on your PC.
 +
[[File:Qt4.6.2.PNG]]<br>
  
 
* Choose the path of installation
 
* Choose the path of installation
[[File:Qt4.6.2_choose_path.PNG]]
+
[[File:Qt4.6.2_choose_path.PNG]]<br>
 +
 
 +
 
 +
* Choose the Symbian SDK(s)
 +
[[File:Qt4.6.2_choose_SDK.PNG]]<br>
 +
 
 +
 
 +
* Qt for Symbian provides a command prompt configured with the correct paths and environment variables for building Qt applications from the command line:
 +
[[File:Qt4.6.2_command_prompt.PNG]]<br>
 +
 
 +
 
 +
{{Note|Before testing a Qt application on a (S60 3rd Edition or 5th Edition) phone, Qt libraries must be installed on the device. Easiest way to do this is to connect the device to the PC using Nokia [[PC Suite]] and use the '''''qt_installer.sis''''', located in the root folder of Qt installation. This .sis file will install all Qt libraries and dependencies to an S60 device.}}
 +
 
 +
 
 +
== Setup Qt Mobility API ==
 +
* After successful installation of Qt for Symbian, the next step is to set up Qt Mobility APIs
 +
* Download [http://qt.nokia.com/developer/new-qt-apis QtMobility API] (also known as ''New Qt APIs'') source and binary package for Symbian.
 +
* Extract the file to a suitable location. Here, <tt>C:\Qt</tt> is used.
 +
* Inside the package, you'll find the following files:
 +
 
 +
** <tt>qt-mobility-1.0.0-epoc32-3.1.zip</tt>
 +
** <tt>qt-mobility-1.0.0-epoc32-3.2.zip</tt>
 +
** <tt>qt-mobility-1.0.0-epoc32-5.0.zip</tt>
 +
** <tt>convenienceheaders.zip</tt>
 +
** <tt>qtmobility.sis</tt><br>
 +
 
 +
* Extract <tt>qt-mobility-1.0.0-epoc32-<nowiki><S60 SDK></nowiki>.zip</tt> packages into the root folder of the respective S60 SDK.
 +
 
 +
** For example, if using S60 5th Edition SDK, extract <tt>qt-mobility-1.0.0-epoc32-5.0.zip</tt> into <tt>C:\S60\devices\S60_5th_Edition_SDK_v1.0</tt>. Repeat this step for all the Symbian SDKs you selected during Qt for Symbian installation.
 +
 
 +
 
 +
* Extract <tt>convenienceheaders.zip</tt> into the root folder of each S60 SDK (as above).
 +
** This will enable Qt style include statements (e.g. <tt>#include <QSystemInfo></tt> instead of <tt>#include <qsysteminfo.h></tt>).
 +
 
 +
 
 +
* Install <tt>qtmobility.sis</tt> file to device. You can do this, for example, via bluetooth or using Nokia [[PC Suite]] (recommended).
 +
** Supported devices: S60 3rd Edition, Feature Pack 1 or later. see http://www.forum.nokia.com/devices/ for device-specific information.
 +
 
 +
 
 +
* Copy (and rename) <tt>C:/Qt/qt-mobility-symbian-opensource-1.0.0/features/mobility.prf.template</tt> file to <tt><nowiki><QTDIR></nowiki>/mkspecs/features/mobility.prf</tt>
 +
** <QTDIR> can be obtained by running 'qmake -v' from the Qt for Symbian command prompt.
 +
 
 +
 
 +
You now have a working environment for building Qt projects that use QtMobility libraries.
 +
 
 +
== Building the examples ==
 +
 
 +
To test that you have a working environment, try building the examples from Qt for Symbian command prompt:
 +
 
 +
<code>
 +
C:/Qt/qt-mobility-symbian-opensource-1.0.0> configure -examples
 +
</code><br>
 +
 
 +
 
 +
If configure completes successfully, build the examples:
 +
 
 +
<code>
 +
C:/Qt/qt-mobility-symbian-opensource-1.0.0> cd examples
 +
C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples> qmake
 +
C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples> make release-gcce
 +
</code><br>
 +
 
  
* Choose the Symbian SDK
+
To generate a sis package and automatically deploy it to a device connected to [[PC Suite]],  use <tt>createpackage</tt> command with <tt>-i</tt> option. For example:
[[File:Qt4.6.2_choose_SDK.PNG]]
+
  
* Qt 4.6.2 provides its own configured command prompt with the variables set
+
<code>
* Once the installation of Qt 4.6.2 is completed, you can find the Qt command prompt as shown in the following picture:
+
C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples> cd bearercloud
[[File:Qt4.6.2_command_prompt.PNG]]
+
C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples/bearercloud> createpackage -i bearercloud_template.pkg release-gcce
* Use this command prompt to work with Qt development which will make the process easier
+
</code><br>
{{Note|Current set of S60 devices do not have pre-installed Qt libraries on device. Please do not forget to install Qt libraries on the device before testing it on real device. You will find '''''qt_installer.sis''''' under '''C:\Qt\4.6.2''' folder. It contains all the dependency files in a single .sis file.}}
+
  
== Setup Qt Mobility API 1.0.0 beta 1 ==
 
* After successful installation of Qt 4.6.2, the next step is to build Qt Mobility APIs
 
* Download QtMobility API: [http://qt.nokia.com/developer/new-qt-apis new-qt-apis]
 
* Extract it to the folder of your wish. In this series, it is extracted to '''C:\QtMobility\''' (Make sure to extract all the files directly under C:\QtMobility API to make the efforts easier)
 
* Once you have extracted the Qt Mobility API, perform the following steps:
 
* configure
 
[[File:Qt4.6.2_command_prompt_2.PNG]]
 
* make debug-winscw
 
[[File:Qt4.6.2_command_prompt_3.PNG]]
 
* make release-gcce
 
[[File:Qt4.6.2_command_prompt_4.PNG]]
 
  
=== Installation for device ===
+
{{Note|Using <tt>createpackage</tt> without ''certificate'' option will sign the application with a self-signed certificate. Only those examples that use basic capabilities (<tt>[http://library.forum.nokia.com/topic/Qt_for_Symbian_Developers_Library/GUID-5D7478BB-FFC0-48D3-ABB6-76E12F6AC3D5.html TARGET.CAPABILITY]</tt> in .pro file), granted by the user during installation, can be self-signed. See [[Capabilities]] for more information. }}<br>
* Download .sis  for your Symbian device from this link: http://get.qt.nokia.com/qt/solutions/qt-mobility-symbian-1.0.0-beta1.zip
+
* Extract that .zip file and you will find '''''install_to_device''''' folder in it.  
+
* Install the '''''qt-mobility-1.0.0-beta1.sis''''' from '''''install_to_device''''' on your mobile phone.
+
  
 
= Related articles =  
 
= Related articles =  

Revision as of 14:34, 22 June 2010


Contents

Overview

This article covers how to set up environment to work with Qt Mobility API.


Prerequisites

Steps

Setup Qt for Symbian

  • Install it on your PC.

Qt4.6.2.PNG

  • Choose the path of installation

Qt4.6.2 choose path.PNG


  • Choose the Symbian SDK(s)

Qt4.6.2 choose SDK.PNG


  • Qt for Symbian provides a command prompt configured with the correct paths and environment variables for building Qt applications from the command line:

Qt4.6.2 command prompt.PNG


Note.pngNote: Before testing a Qt application on a (S60 3rd Edition or 5th Edition) phone, Qt libraries must be installed on the device. Easiest way to do this is to connect the device to the PC using Nokia PC Suite and use the qt_installer.sis, located in the root folder of Qt installation. This .sis file will install all Qt libraries and dependencies to an S60 device.


Setup Qt Mobility API

  • After successful installation of Qt for Symbian, the next step is to set up Qt Mobility APIs
  • Download QtMobility API (also known as New Qt APIs) source and binary package for Symbian.
  • Extract the file to a suitable location. Here, C:\Qt is used.
  • Inside the package, you'll find the following files:
    • qt-mobility-1.0.0-epoc32-3.1.zip
    • qt-mobility-1.0.0-epoc32-3.2.zip
    • qt-mobility-1.0.0-epoc32-5.0.zip
    • convenienceheaders.zip
    • qtmobility.sis
  • Extract qt-mobility-1.0.0-epoc32-<S60 SDK>.zip packages into the root folder of the respective S60 SDK.
    • For example, if using S60 5th Edition SDK, extract qt-mobility-1.0.0-epoc32-5.0.zip into C:\S60\devices\S60_5th_Edition_SDK_v1.0. Repeat this step for all the Symbian SDKs you selected during Qt for Symbian installation.


  • Extract convenienceheaders.zip into the root folder of each S60 SDK (as above).
    • This will enable Qt style include statements (e.g. #include <QSystemInfo> instead of #include <qsysteminfo.h>).


  • Install qtmobility.sis file to device. You can do this, for example, via bluetooth or using Nokia PC Suite (recommended).


  • Copy (and rename) C:/Qt/qt-mobility-symbian-opensource-1.0.0/features/mobility.prf.template file to <QTDIR>/mkspecs/features/mobility.prf
    • <QTDIR> can be obtained by running 'qmake -v' from the Qt for Symbian command prompt.


You now have a working environment for building Qt projects that use QtMobility libraries.

Building the examples

To test that you have a working environment, try building the examples from Qt for Symbian command prompt:

C:/Qt/qt-mobility-symbian-opensource-1.0.0> configure -examples


If configure completes successfully, build the examples:

C:/Qt/qt-mobility-symbian-opensource-1.0.0> cd examples
C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples> qmake
C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples> make release-gcce


To generate a sis package and automatically deploy it to a device connected to PC Suite, use createpackage command with -i option. For example:

C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples> cd bearercloud
C:/Qt/qt-mobility-symbian-opensource-1.0.0/examples/bearercloud> createpackage -i bearercloud_template.pkg release-gcce


Note.pngNote: Using createpackage without certificate option will sign the application with a self-signed certificate. Only those examples that use basic capabilities (TARGET.CAPABILITY in .pro file), granted by the user during installation, can be self-signed. See Capabilities for more information.


Related articles

Reference links

217 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×