[Jaffa Software]

Sunday 6 March 2011

Cross-platform Qt dev: deploying to Symbian

I've gone beyond the playing with QML stage and now want to port my first Maemo 5 application, Attitude, to Qt Quick; with the aim of having it run on Maemo, Symbian, MeeGo and Android.


Development environment

I'm using the Qt SDK 1.1 beta on Ubuntu 10.10. I'll deal with developing with this in another post (Eclipse keybindings, the combination of graphical and source editing (and the limitations therein), issues to bear in mind). Here I want to deal with deployment. Qt Creator offers a number of targets:

  • Desktop (not relevant to this app)
  • Maemo
  • Simulator
  • Remote compiler

I chose the last three. On Linux, there is no native support for deploying or compiling for Symbian. Compiling can be dealt with by the "remote compiler", but what about deploying?

I can, now, to the following; all from within Qt Creator:

  • Compile Qt applications and get a signed SIS file for installation
  • Install the SIS file on to a USB-connected N8
  • Start the application and get its console output back in the IDE.

Configuring the remote compiler

  1. Get a Forum Nokia account, if you do not have one.
  2. Install runonphone.
  3. Download this script: runonphone.wrap, and put it on your PATH (make sure it's executable).
  4. In Qt Creator, select Tools > Options... > Projects > Remote compiler and authenticate with your Forum Nokia details:


    Screenshot of Qt Creator options
  5. Open your project, and select Projects > Remote Compiler > Build. Ensure Signed is checked.


    Screenshot of Qt Creator options
  6. Switch to the Run tab and create a new deployment and run configuration.

    • Command: runonphone.wrap
    • Working directory: $BUILDDIR
    • Arguments: either install (for deploy) or run.

    Screenshot of Qt Creator options

Configuring the device

  1. Go to <QT_SDK>/Symbian/sis/Symbian^3.
  2. Send the SIS files under Qt/4.7.2, QtMobility/1.1.0 and TRK to your phone (e.g. via Bluetooth) and install via launching them.
  3. Go to the main launcher menu and launch RnD Tools > TRK.
  4. Under Options > Settings ensure USB is set as the connection method.
  5. Connect your Symbian phone via a USB cable.
  6. Select Options > Connect.

Then, when you deploy and run in Qt Creator the SIS file should be sent over the usbserial connection and launched on the device.

Unfortunately, if there's a problem you can sometimes end up in a state where you need to kill -9 the processes blocking the port. It also doesn't seem to like working on /dev/ttyUSB1, only /dev/ttyUSB0 - but these could all be interrelated problems. Improvements to the script very welcome!