|  | Home · All Classes · All Functions · Overviews

[Deploying Qt Applications]

# Deploying an Application on the Symbian platform

Applications are deployed to Symbian devices in signed `.sis` package files. The `.sis` file content is controlled with `.pkg` files. The `.pkg` file contains a set of instructions used by tools to produce a `.sis` file. `qmake` generates a default `.pkg` file for your project. The `.pkg` file generated by `qmake` is typically fully functional for testing purposes but when planning to deliver your application to end-users some changes are needed. This document describes what changes are typically needed and how to implement them.

## Static Linking

Qt for the Symbian platform does currently not support static linking of Qt libraries.

## Shared Libraries

When deploying the application using the shared libraries approach we must ensure that the Qt runtime is correctly redistributed along with the application executable, and also that all Qt dependencies are redistributed along with the application.

We will demonstrate these procedures in terms of deploying the Wiggly application that is provided in Qt's examples directory.

### Building Qt as a Shared Library

We assume that you already have installed Qt as a shared library, in the `C:\path\to\Qt` directory which is the default when installing Qt for Symbian. For more information on how to build Qt, see the Installation documentation.

## Shared Libraries

After ensuring that Qt is built as a shared library, we can build the Wiggly application. First, we must go into the directory that contains the application:

     cd examples\widgets\wiggly

To prepare the application for deployment we must ensure that the `.pkg` file generated by `qmake` contains the relevant vendor information and embeds the necessary dependencies to the application deployment file (`.sis`). The content of the generated `.pkg` file can be controlled with the Symbian specific `qmake` DEPLOYMENT keyword extensions.

First, we will change the vendor statement to something more meaningful. The application vendor is visible to end-user during the installation.

     vendorinfo = \
         "%{\"Example Localized Vendor\"}" \
         ":\"Example Vendor\""

     default_deployment.pkg_prerules = vendorinfo

Second we will tell the Symbian application installer that this application supports only S60 5.0 based devices:

     supported_platforms = \
         "; This demo only supports S60 5.0" \
         "[0x1028315F],0,0,0,{\"S60ProductID\"}"

     default_deployment.pkg_prerules += supported_platforms

You can find a list of platform and device indentification codes from Forum Nokia Wiki. By default `.pkg` file generated by `qmake` adds support for all S60 3rd edition FP1, S60 3rd edition FP2 and S60 5th edition devices.

As a last step we will embed the `qt_installer.sis` file to the Wiggly deployment file:

     embedded_deployments = \
         "; Embed Qt dependencies" \
         "@\"$$[QT_INSTALL_PREFIX]/qt_installer.sis\",(0x2001E62D)"

     default_deployment.pkg_prerules += embedded_deployments

When `qt_installer.sis` is embedded to the application deployment file, the end-user does not need to download and install all dependencies separately. The drawback of `.sis` embedding is that the application `.sis` file size becomes big. To address these problems Forum Nokia is planning to release a smart installer which will take care of downloading and installing the necessary dependencies over-the-air. The expected availability of smart installer is 1Q 2010.

Now we are ready to compile the application and create the application deployment file. Run `qmake` to create Symbian specific makefiles, resources (.rss) and deployment packaging files (`.pkg`). And do build to create the application binaries and resources.

     qmake
     make release-gcce

If everything compiled and linked without any errors, we are now ready to create an application installation file:

     make sis

If all binaries and dependencies were found, we should now have a self-signed `wiggly_release-gcce.sis` ready to be installed on a device. For more information about creating a `.sis` file and installing it to device see also here.

[Deploying Qt Applications]