Symbian developer community

 
wiki

How to add Qt to Syborg

From Symbian Developer Community

Jump to: navigation, search

Qt is not currently included in the scheduled platform builds. However, it is still possible to create a ROM image where the framework is pre-installed, both on Syborg and on BeagleBoard. This article explains how this can be done. Please note that part of the approach followed here is intentionally "hackish" and is far away from best practices: it's a temporary solution and of course a good proof of concept.

Contents

Get a full UI ROM working

Gareth's Wiki page, with some clarifications in Arunabh's forum post should give you a working UI ROM for Syborg.

Install Qt

Download the latest Qt libraries for Symbian (as of writing this article it is 4.6.1) from the right column on that page.

Install the Qt libraries by running the qt-symbian-opensource-4.6.1.exe (or later) installer, nothing that:

  • You don't need to install the sources unless you want to compile Qt applications
  • For Symbian SDKs, deselect all except "Select additional folder(s)"
  • Destination folder probably doesn't matter, but we used C:\qt\4.6.1-symbian
  • And finally when asked for additional SDK folders you add your PDK EPOCROOT

Qt should now install all the required libraries inside the PDK.

Add the qt.iby to your bigrom.iby

The Qt package includes an IBY file, which can be found in the src/s60installs directory.

Open \epoc32\rom\config\syborg\bigrom.iby and add

 
#include <qt.iby>
 

Make sure your ROM is large enough to fit Qt

Since Qt takes up about 10 MB of space, your ROM size must be able to fit this.

Edit \epoc32\rom\include\base_syborg.iby and make sure your romsize is:

 
romsize=0x9000000
 

And also edit \epoc32\rom\include\syborg.oby and ensure ROMMEGS is:

 
define ROMMEGS 90 /* !! HEX !! */
 

Rebuild the ROM

 
iMaker --file=/epoc32/rom/config/syborg/image_conf_syborg.mk flash
 

Verify that Qt was included

Open your \epoc32\rombuild\syborg\core\syborg.rom.log and check that you have something like the following:

 
Loading E32Image file \epoc32\release\armv5\udeb\phonon_mmf.dll
compression format:0x101f7afc
Loading E32Image file \epoc32\release\armv5\udeb\QtCore.dll
compression format:0x101f7afc
Loading E32Image file \epoc32\release\armv5\udeb\QtXml.dll
compression format:0x101f7afc
...
 

Install a test Qt application

To test Qt we installed the HyperUI example application. One way to obtain is it to download the SIS file and extract its contents using a tool like SISXplorer. The iby file below shows where it expects the extracted files to live.

Follow the instructions above to create a hyperui.iby and add it to your bigrom.iby.

Our hyperui.iby looks like this:

 
#ifndef __HYPERUI_IBY__
#define __HYPERUI_IBY__
 
file=\epoc32\release\armv5\udeb\hyperui.exe \sys\bin\hyperui.exe
data=\epoc32\data\z\resource\apps\hyperui.rsc \resource\apps\hyperui.rsc
data=\epoc32\data\z\private\10003a3f\import\apps\hyperui_reg.rsc \private\10003a3f\import\apps\hyperui_reg.rsc
data=\epoc32\data\z\resource\apps\hyperui.mif \resource\apps\hyperui.mif
 
#endif
 

Although changing the PlatSec behavior is not generally recommended, an alternative to having to install an application directly into a ROM is to configure the software installer to consider all capabilities user grantable. This can be done by changing the file swipolicy.ini: add all capabilities to the User Capabilities field, rebuild your image and you're done. If you do go for this approach, make sure the application you're installing doesn't use a protected UID or you'll see a "Cannot install a protected application from untrusted supplier" error message.

Run the Syborg ROM and start the Qt app

Now you should be able to run the ROM and the Qt application should appear in the program launcher. If it doesn't, try to run the application from the file explorer.

Good luck!

Comments

Sign in to comment…