0% found this document useful (0 votes)
256 views

A Guide To Creating A QT Environment Using Binaries On Windows

Uploaded by

jack_wootton
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
256 views

A Guide To Creating A QT Environment Using Binaries On Windows

Uploaded by

jack_wootton
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

A Guide to Creating a Qt Environment

using binaries on Windows


July 2010
Table of Contents
1 Introduction ....................................................................................................................................... 1
2 Windows 7 / Vista .............................................................................................................................. 1
3 The Guide........................................................................................................................................... 2
4 People .............................................................................................................................................. 15
5 History .............................................................................................................................................. 15
6 References ....................................................................................................................................... 15
7 Feedback.......................................................................................................................................... 16

Copyright © 2010 Accenture. All Rights Reserved


1 Introduction
This guide documents the steps followed to setup a Qt 4.7 environment using only binaries. Once the
environment has been setup it should be possible to develop both on the emulator and hardware. This
guide is not necessarily the recommended way to set-up an environment, but it did work for us and as a
result we thought it worth sharing.
The author tested the guide using Windows XP Professional Service Pack 2 on a laptop with 3 GB of
RAM and an Intel Core 2 Duo CPU.
Throughout this guide “V:” is used as the Windows subst drive, but you can use whichever letter you
want. It is useful to compare the examples using “V:” throughout the guide with your equivalent.
The instructions in this guide are based on the official Qt 4.7 installation documentation [1].The author
would like to acknowledge the help received from contributors on the following mailing lists:
[email protected]
[email protected]
[email protected]
[email protected]
This guide uses binaries of:
N97 SDK 5th Edition version 1.1 [6]
Nokia Open C Plugin version 1.6 [7]
Qt 4.7 for Symbian [4]
Qt Creator version 2.0 [4]
Carbide version 2.0 [8]
Active Perl 5.6.1 build 638 or higher [9]
Arm Compiler (RVCT) version 2.2 or higher [10]. This guide uses the RVCT compiler and has
not been tested with any other compiler however GCCE should work, however it has not been
tested with the steps detailed in this guide.

Qt SDK [11] and Nokia Qt SDK [5] are two distinct SDKs. Nokia Qt SDK refers to the new all-in-one
SDK which contains a simulator for different mobile platforms – it contains everything you need to get
started. Qt SDK refers to the binary containing only Qt Creator and the Qt libraries.
At the time of writing the Nokia Qt SDK didn‟t work as expected and wasn‟t used. In the future it is
almost certainly better to use the all-in-one Nokia Qt SDK rather than the combination of separate tools
as is the case in this guide. In fact, it is highly recommended to check the current status of the Nokia Qt
SDK before choosing to continue through this guide.

2 Windows 7 / Vista
If you wish to use this guide to install onto Windows 7 this section should be read. It is likely the same
issues apply to Windows Vista since both follow similar security models. If however, User-access
Control is turned off, then this section does not apply.
Subst-ed drives
When an application is installed, the installer runs in administrator mode. When (most) applications run,
they run in user mode. A drive subst-ed in a user mode terminal is only available to user mode
applications. A drive subst-ed in an administrator mode terminal is only available to administrator mode
applications.
So, when installing Qt for Symbian 4.7 beta, the V:\ drive first needs to be subst-ed in an administrator
mode terminal (Start -> Accessories -> (right click) Terminal -> Run as Administrator).

Copyright © 2010 Accenture. All Rights Reserved 1


When Qt Creator is run, the V:\ drive needs to be subst-ed in a normal terminal. There‟s no need to un-
subst the drive in an administrator terminal first. They‟ll happily co-exist.

Editing devices.xml
By default, devices.xml is only writable by the administrator. The permissions for the file need to be
changed before editing it. Also, devices.xml is found under C:\Program Files (x86)\Common
Files\Symbian on Windows 7 64-bit (and 64-bit edition Windows operating systems) edition.

3 The Guide
Step 1
Download and install Carbide.c++ v2.0.0 [8] or higher. Make a note of the installation directory as this
is required later on. It may be necessary to update the Carbide Compiler, in which case follow Qt
documentation for this [2]. Carbide isn‟t used when building for a device and is only required when
building for the emulator.
Step 2
Download and install ActivePerl 5.6.1 build 638 or higher. This is a little problematic since Symbian
platform Requirements for Qt [3]state “According to Symbian, version 5.6.1 build 638 is mandatory for
building Symbian applications, but that version is no longer available from ActiveState. However, Qt for
Symbian has been successfully compiled using both 5.8.x and 5.10.x versions.”
Step 3
Download an install the S60 N97 SDK from Forum Nokia [6]. Install it to something like
D:\Nokia\Nokia_N97_SDK_v1.0. It should not be installed onto the susbt drive.
There is no need to provide a value for Eclipse installation directory.

Copyright © 2010 Accenture. All Rights Reserved 2


Nokia N97 SDK Installation

Nokia N97 SDK installation – select “Typical” installation

Nokia N97 SDK Installation – no need to provide Eclipse installation

Copyright © 2010 Accenture. All Rights Reserved 3


Nokia N97 SDK Installation – installed onto physical drive D:

Step 4
Subst a drive to the N97 SDK such that the epoc32 directory is in the root of the subst drive. For
example, to subst a drive “V:” to the Nokia SDK installed on “D:” do
subst V: D:\S60\devices\Nokia_N97_SDK_v1.0

Nokia N97 SDK Installation – subst drive “V:” and epoc32 directory
Ensure your %PATH% environment variable contains the following values at the beginning:
\epoc32\gcc\bin
\epoc32\tools

Copyright © 2010 Accenture. All Rights Reserved 4


Step 5
On a Windows command line navigate to the root of your subst drive (V:\). Run the command 'epoc'
and check the emulator launches. Warning, this may take up to ten minutes first time this is done.
Throughout the rest of this guide this step will be referred to as “running epoc”.
Do not worry if you see a white screen for approximately five minutes

The emulator may require some configuration such as time zone.

Step 6
Install the Open C library plugin by Nokia [7]. At the time of writing only version 1.6 is available. The
installer should pick up the installed N97 SDK.

Copyright © 2010 Accenture. All Rights Reserved 5


Nokia Open C Plugin installation – N97 SDK detected

Nokia Open C Plugin installation into the previously detected SDK

Step 7
Run “epoc” and check the emulator launches.

Step 8
Install Qt 4.7 Beta binary for Symbian. At the time of writing Qt 4.7 Beta 2 is available [4]. Ensure it is
installed to the subst drive, for example Qt root should be similar to V:\Qt\4.7.0-beta1 and Qt bin
V:\Qt\4.7.0-beta1\bin.

Copyright © 2010 Accenture. All Rights Reserved 6


Qt 4.7 Beta for Symbian installation

Qt 4.7 Beta for Symbian installation – ensure source is installed and N97 SDK selected

Copyright © 2010 Accenture. All Rights Reserved 7


Qt 4.7 Beta for Symbian installation to the subst drive!
Ensure you select the drive letter of your subst drive when installing Qt and tick the option to install Qt
source code (this may come in useful if you need to build components).

Step 9
Install QtCreator to a physical drive (not to your subst drive) using the binary. Accept the option to
install the MinGW compiler. At the time of writing QtCreator 2.0 is available [4]. In the screen capture
below, Qt Creator Release Candidate was used which reported a broken version number of “1.3.85” – it
is actually release candidate 2.0.

Qt Creator 2.0 – ignore the incorrect version number “1.3.85”

Copyright © 2010 Accenture. All Rights Reserved 8


Qt Creator 2.0 can be installed anywhere

Qt Creator 2.0 must be installed with MinGW

Step 10
Ensure your environment variable %PATH% contains the location of the “bin” directory of the Qt for
Symbian installation. Your value may look similar to:
V:\Qt\4.7.0-beta1\bin

Copyright © 2010 Accenture. All Rights Reserved 9


Ensure also that the location of the “bin” directory of the MinGW installation is present (this was
installed as part of QtCreator). Your value may look similar to:
C:\Qt\qtcreator-1.3.81\mingw\bin;

Combined with the previous modifications to %PATH%, the beginning of your environment variable
should look similar to:
\epoc32\gcc\bin;\epoc32\tools;V:\Qt\4.7.0-beta1\bin;C:\Qt\qtcreator-1.3.81\mingw\bin;C:\Perl\bin;

Notice the location of the “bin” directory of the Active Perl installation was added during the installation
of Active Perl.
Everything is now installed but some additional steps are required for a working environment.

Step 11
Qt Example applications must be built manually in order for them to be displayed on the emulator. The
examples are located in [QT_HOME]\examples and are built by running 'qmake' to generate the make
files, followed by 'make' to actually build the Examples.

Build the Qt Examples manually

Step 12
Qt Demo applications must be built manually in order for them to be displayed on the emulator. The
examples are located in [QT_HOME]\demos and are built by running 'qmake' to generate the make
files, followed by 'make' to actually build the Demos.

Copyright © 2010 Accenture. All Rights Reserved 10


Build the Qt Demos manually

Step 13
Modify devices.xml („C:\Program Files\Common Files\Symbian\devices.xml‟) such that the N97 SDK
path uses the subst drive and not the physical location on C: or D: (for example).
Here is an unmodified devices.xml file:
<?xml version="1.0"?>
<devices version="1.0">
<device id="Nokia_N97_SDK_v1.0" name="com.nokia.s60" default="yes"
userdeletable="yes">
<epocroot>D:\S60\devices\Nokia_N97_SDK_v1.0</epocroot>
<toolsroot>D:\S60\devices\Nokia_N97_SDK_v1.0</toolsroot>
</device>
</devices>

Here is an example devices.xml after modification:


<?xml version="1.0"?>
<devices version="1.0">
<device id="Nokia_N97_SDK_v1.0" name="com.nokia.s60" default="yes" userdeletable="yes">
<epocroot>V:\</epocroot>
<toolsroot>V:\epoc32\tools</toolsroot>
</device>
</devices>

Copyright © 2010 Accenture. All Rights Reserved 11


Step 14
In QtCreator, ensure the SDK is listed using the subst drive and not the physical drive it was installed
to. This can be checked in QtCreator by clicking on Tools > Options > QT4 > S60 SDKs.

Qt Creator 2.0 setup – the SDK is listed using the subst drive.

Step 15
In QtCreator, configure a Qt version using a subst drive (Tools > Options > QT4 > Qt Versions). You
should have an auto-detected entry which looks something like
"Nokia_N97_SDK_Version_1.0(Qt4.7)". This should be using your subst drive and not a physical drive
for any of its values. For example, if your susbt drive is “V:”, SDK properties should be:
Version name: Nokia_N97_SDK_Version_1.0(Qt4.7)
qmake location: V:\Qt\4.7.0-beta1\bin
S60 SDK: V:\
CSL/GCCE directory: [EMPTY]
Carbide Directory: C:\Program Files\Nokia\Carbide.c++ v2

Note the only exception is the value for the Carbide installation directory which is not on your subst
drive). You will need to add the Carbide directory yourself, but everything else should be correct. Don't
worry that the debugger helper library hasn't built - it isn't required.

Copyright © 2010 Accenture. All Rights Reserved 12


Qt Creator 2.0 setup – Qt version is configured to use the subst drive
At this point you will need to import or create a Qt project to continue.

Step 16
Now you can add a Symbian Emulator target in QtCreator by clicking on the 'Projects' tab.

Add a Symbian Device if you want to run on hardware


However you will need to modify a few values before it works as expected:
a. Modify 'Build Steps' to override the Make command, for example, if your susbt drive is “V:” -
overridden Make value is 'V:\epoc32\tools\make.exe'
b. Modify 'Clean Steps' to override the Make command, for example, if your subst drive is “V:” –
overridden Make value is 'V:\epoc32\tools\make.exe'
c. Modify 'Build Environment' to override the PATH environment variable in QtCreator. The PATH
value should already contain the entries 'epoc32\' and 'epoc32\tools' and '\epoc32\gcc\bin'. These
need to be modified to include the subst drive letter otherwise Creator gets confused.

Copyright © 2010 Accenture. All Rights Reserved 13


If your subst drive is “V:”, modify the following entries so they look like: 'V:\epoc32', 'V:\epoc32\tools\'
and 'V:\epoc32\gcc\bin'. Note, this will not modify the actual environment variable on Windows - it's just
a temporary modification for this specific build target in QtCreator.

Step 17
The armv5 compiler was used to build the project and as such the Tool Chain setting should be set to
RVCT (armv5).

RVCT (armv5) tool chain is used

Copyright © 2010 Accenture. All Rights Reserved 14


4 People

Authors Aaron Tunney, Jack Wootton

Contributors

Reviewers

5 History
Version Date Author Description

0.1 16-05-10 Jack Wootton Initial draft.

0.2 18-05-10 Jack Wootton Typos corrected.

0.3 07-07-10 Jack Wootton Windows 7 chapter added.

6 References
Ref Title Link

[1] Qt Reference Documentation – Platform installation guide Link

[2] Required software for S60 development environment Link

[3] Qt for Symbian platform requirements Link

[4] Qt 4.7 Beta 2 and Creator 2.0 download Link

[5] Qt All-in-one SDK Link

[6] N97 SDK 5th Edition V 1.1 Link

[7] Nokia Open C Plugin Link

[8] Carbide Link

[9] Active Perl Link

[10] Arm Compiler (RVCT) Link

[11] Qt Downloads Link

Copyright © 2010 Accenture. All Rights Reserved 15


7 Feedback
Any suggestions, criticisms, improvements or questions are more than welcome. Please send any
feedback to [email protected].

Copyright © 2010 Accenture. All Rights Reserved 16


About Accenture
Accenture is a global management
consulting, technology services and
outsourcing company, with more than
190,000 people serving clients in more than
120 countries. Combining unparalleled
experience, comprehensive capabilities
across all industries and business functions,
and extensive research on the world‟s most
successful companies, Accenture
collaborates with clients to help them
become high-performance businesses and
governments. The company generated net
revenues of US$21.58 billion for the fiscal
year ended Aug. 31, 2009. Its home page is
www.accenture.com.

Copyright © 2010 Accenture


All rights reserved.

Accenture, its logo, and


High Performance Delivered
are trademarks of Accenture.

You might also like