1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- installation.qdoc -->
<title>Qt 4.8: Installing Qt for the Symbian platform using Linux (experimental)</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="content">
<a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
</div>
<div class="breadcrumb toolblock">
<ul>
<li class="first"><a href="index.html">Home</a></li>
<!-- Breadcrumbs go here -->
<li>Installing Qt for the Symbian platform using Linux (experimental)</li>
</ul>
</div>
</div>
<div class="content mainContent">
<link rel="prev" href="installation.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="installation.html">Installation</a>
</p><p/>
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#step-1-setup-the-development-environment">Step 1: Setup the Development Environment</a></li>
<li class="level1"><a href="#step-2-unpack-the-archive">Step 2: Unpack the Archive</a></li>
<li class="level1"><a href="#step-3-set-the-environment-variables">Step 3: Set the Environment Variables</a></li>
<li class="level1"><a href="#step-4-configure-qt">Step 4: Configure Qt</a></li>
<li class="level1"><a href="#step-5-build-qt">Step 5: Build Qt</a></li>
<li class="level1"><a href="#step-6-building-qt-packages-for-the-device">Step 6: Building Qt Packages for the Device</a></li>
<li class="level2"><a href="#installing-qt-packages-to-the-device">Installing Qt Packages to the Device.</a></li>
<li class="level3"><a href="#obtaining-the-app-trk-package">Obtaining the App TRK package.</a></li>
<li class="level3"><a href="#configuring-app-trk-on-the-phone">Configuring App TRK on the Phone</a></li>
<li class="level3"><a href="#configuring-the-usb-serial-driver-on-the-linux-system">Configuring the USB Serial Driver on the Linux System</a></li>
<li class="level3"><a href="#building-the-runonphone-tool">Building the runonphone Tool.</a></li>
<li class="level3"><a href="#installing-the-built-package-onto-the-phone">Installing the Built Package onto the Phone</a></li>
<li class="level1"><a href="#running-qt-demos">Running Qt Demos</a></li>
</ul>
</div>
<h1 class="title">Installing Qt for the Symbian platform using Linux (experimental)</h1>
<span class="subtitle"></span>
<!-- $$$install-symbian-linux.html-description -->
<div class="descr"> <a name="details"></a>
<p>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.</p>
<a name="step-1-setup-the-development-environment"></a>
<h2>Step 1: Setup the Development Environment</h2>
<p>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.</p>
<p>See <a href="http://qt.gitorious.org/qt/pages/QtCreatorSymbianLinux">http://qt.gitorious.org/qt/pages/QtCreatorSymbianLinux</a> for more details.</p>
<a name="step-2-unpack-the-archive"></a>
<h2>Step 2: Unpack the Archive</h2>
<p>Uncompress the <a href="http://qt.nokia.com/downloads">downloaded</a> source package into the directory you want Qt installed, e.g. <tt>/home/user/qt/4.8.2</tt>.</p>
<a name="step-3-set-the-environment-variables"></a>
<h2>Step 3: Set the Environment Variables</h2>
<p>In order to build and use Qt, the <tt>PATH</tt> environment variable needs to be extended to fine Qt tools and also to find the Symbian platform tools:</p>
<p>First you need to set the <tt>EPOCROOT</tt> environment variable to point to the location of your S60 SDK:</p>
<pre class="cpp"> EPOCROOT=/home/user/s60-sdk/
export EPOCROOT</pre>
<p>Then you can update the PATH variable;</p>
<pre class="cpp"> PATH=/home/user/qt/4.8.2/bin:$EPOCROOT/epoc32/tools:$PATH
export PATH</pre>
<a name="step-4-configure-qt"></a>
<h2>Step 4: Configure Qt</h2>
<p>To configure Qt for the Symbian platform, do:</p>
<pre class="cpp"> cd /home/user/qt/4.8.2
./configure -platform linux-g++ -xplatform symbian-armcc</pre>
<p>to build the libraries using RVCT or</p>
<pre class="cpp"> cd /home/user/qt/4.8.2
./configure -platform linux-g++ -xplatform symbian-gcce -no-webkit</pre>
<p>to build the libraries using GCCE.</p>
<p>Type <tt>./configure -help</tt> to get a list of all available options. The <a href="configure-options.html">Configuration Options for Qt</a> page gives a brief overview of these.</p>
<a name="step-5-build-qt"></a>
<h2>Step 5: Build Qt</h2>
<p>To build Qt for the device, type:</p>
<pre class="cpp"> make</pre>
<p>Congratulations, Qt is now ready to use.</p>
<a name="step-6-building-qt-packages-for-the-device"></a>
<h2>Step 6: Building Qt Packages for the Device</h2>
<p>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:</p>
<p><b>Building a Qt package without a certificate</b></p>
<p>If you have no certificate, build a self signed Qt:</p>
<pre class="cpp"> cd src
make sis</pre>
<p>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.</p>
<p><b>Building a Qt package with a Symbian developer certificate</b></p>
<p>If you have a Symbian-signed developer certificate, specify the capabilities you can sign for, for example:</p>
<pre class="cpp"> 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></pre>
<a name="installing-qt-packages-to-the-device"></a>
<h3>Installing Qt Packages to the Device.</h3>
<p>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.</p>
<a name="obtaining-the-app-trk-package"></a>
<h4>Obtaining the App TRK package.</h4>
<p>Download the package from the following location.</p>
<ul>
<li><a href="http://tools.ext.nokia.com/trk/">Application TRK</a>. Choose the correct installation package based on the S60 version of your device (<tt>S60_<S60-version>_app_trk_<TRK-version>.sisx</tt>).</li>
</ul>
<p>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.</p>
<a name="configuring-app-trk-on-the-phone"></a>
<h4>Configuring App TRK on the Phone</h4>
<p>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 <tt>Settings</tt> menu entry. If necessary, choose <tt>Connect</tt> from the menu.</p>
<a name="configuring-the-usb-serial-driver-on-the-linux-system"></a>
<h4>Configuring the USB Serial Driver on the Linux System</h4>
<p>On Linux, phone should appear as the <tt>/dev/ttyUSB1</tt> 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:</p>
<pre class="cpp"> lsusb</pre>
<p>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 <tt>XXX</tt>, respectively.</p>
<pre class="cpp"> sudo rmmod usbserial
sudo modprobe usbserial vendor=0x0XXX product=0x0XXX</pre>
<p>The <tt>rmmod</tt> step may fail if the module is not already loaded, but that is harmless.</p>
<a name="building-the-runonphone-tool"></a>
<h4>Building the runonphone Tool.</h4>
<p>Note that building the <tt>runonphone</tt> 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 <tt>qmake</tt>. Make sure you have both installed.</p>
<p>You will also need the <a href="http://www.libusb.org/">libusb</a> libraries and header files installed. Usually, installing a development package such as <tt>libusb-dev</tt> will ensure that you have all the necessary dependencies installed.</p>
<p>First, make sure that the <tt>qmake</tt> 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:</p>
<pre class="cpp"> $ qmake -version
QMake version 2.01a
Using Qt version 4.6.2 in /usr/lib/qt4</pre>
<p><tt>qmake</tt> will tell you where it is installed.</p>
<p>Copy the <tt>%QTDIR%/tools/runonphone</tt> folder to a place outside of the Qt tree. Then go to the folder in a shell and build it:</p>
<pre class="cpp"> cd $HOME/runonphone
qmake
make</pre>
<p>Copy the resulting executable to a folder which is in your <tt>PATH</tt> environment variable.</p>
<a name="installing-the-built-package-onto-the-phone"></a>
<h4>Installing the Built Package onto the Phone</h4>
<p><b>Note:</b> Before starting, please make sure that there is no previously installed version of Qt on the phone.</p>
<p>Return to the root of the Qt tree configured for Symbian. Then install the Qt libraries by running the following:</p>
<pre class="cpp"> runonphone -s lib/Qt.sis</pre>
<p>You may need to supply the path of the serial device file using the <tt>-p</tt> option:</p>
<pre class="cpp"> runonphone -s lib/Qt.sis -p /dev/ttyUSB1</pre>
<p>If the installation fails, please make sure that there is no previously installed version of Qt on the phone.</p>
<p>Qt requires some dependent packages to be installed on the device, which can be installed using the runonphone tool as well. One is the <tt>sqlite3.sis</tt>, 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:</p>
<pre class="cpp"> 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</pre>
<p>It is also possible to install packages onto the device using the <tt>runonphone</tt> build rule that <tt>qmake</tt> automatically generates for each Qt project. Options can be supplied to the <tt>runonphone</tt> tool that is invoked begind the scenes:</p>
<pre class="cpp"> make runonphone "QT_RUN_ON_PHONE_OPTIONS=-p /dev/ttyUSB1"</pre>
<p>If you are running <tt>runonphone</tt> or invoking the <tt>runonphone</tt> build rule often, it is possible to set the <tt>QT_RUN_ON_PHONE_OPTIONS</tt> environment variable with the options you normally use:</p>
<pre class="cpp"> export QT_RUN_ON_PHONE_OPTIONS="-p /dev/ttyUSB1"
make runonphone</pre>
<p>This makes installation of packages onto a device easier and less error-prone.</p>
<a name="running-qt-demos"></a>
<h2>Running Qt Demos</h2>
<p>We've included a subset of the Qt demos in this package for you to try out. An excellent starting point is the "fluidlauncher" demo.</p>
<p>Install and run the demo by using the following commands:</p>
<pre class="cpp"> cd demos/embedded/fluidlauncher
runonphone -s fluidlauncher.sis fluidlauncher.exe</pre>
<p>The same command can be used for other applications:</p>
<pre class="cpp"> cd myapp
qmake
make
make sis
runonphone -s myapp.sis myapp.exe</pre>
<p>For more information about building and running Qt programs on the Symbian platform, see <a href="symbian-with-qt-introduction.html">The Symbian platform - Introduction to Qt</a>.</p>
<p>We hope you will enjoy using Qt.</p>
</div>
<!-- @@@install-symbian-linux.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="installation.html">Installation</a>
</p>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
The documentation provided herein is licensed under the terms of the
<a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
License version 1.3</a> as published by the Free Software Foundation.</p>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
Nokia, Qt and their respective logos are trademarks of Nokia Corporation
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|