Tuesday, November 30, 2010

I'm Now Posting on Forum Nokia Blogs!

Great news!

I'm now also posting articles on Forum Nokia Blogs titled Hendy Irawan on Mobile Qt.

I will still be posting here, though I'm not sure which articles should be on Forum Nokia and which ones should be here.

Or perhaps I will just cross-post. We'll see.

Anyway, it's good to have one more channel to share my experiences with Nokia, Qt and mobile applications development

Monday, November 29, 2010

fatal error: alsa/asoundlib.h: No such file or directory - building Qt Mobility 1.1.0

If you get this error message while compiling Nokia's Qt Mobility 1.1.0 :

In file included from audio/qaudiodevicefactory.cpp:60:
audio/qaudiodeviceinfo_alsa_p.h:57: fatal error: alsa/asoundlib.h: No such file or directory
compilation terminated.
make[2]: *** [../../build/Debug/QtMultimediaKit/qaudiodevicefactory.o] Error 1
make[2]: Leaving directory `/home/ceefour/Vendor/qt-mobility-opensource-src-1.1.0/src/multimedia'
make[1]: *** [sub-multimedia-make_default] Error 2
make[1]: Leaving directory `/home/ceefour/Vendor/qt-mobility-opensource-src-1.1.0/src'
make: *** [sub-src-make_default-ordered] Error 2

You need to install ALSA Shared Library headers. In Ubuntu you just need to:

sudo apt-get install libasound2-dev

Sunday, November 28, 2010

Sign Symbian/Qt SIS Apps with Qt Creator on Linux (Bonus: Qt+Qt Mobility Smart Installer for Nokia)

The latest version of Qt Creator 2.0+ (included in Nokia Qt SDK) can now easily sign Qt/Symbian applications (.SIS files) with your Symbian Signed certificate and key files.

The best part of it is that it can also be used with Linux operating systems (e.g. Ubuntu). And you don't have to install Wine!
(See my previous article on how to use makesis.exe to sign SIS files on Linux for more details.)

To build a Qt/Symbian application on Linux and also sign the generated SIS file with your developer certificate and key, first you must install the Nokia Qt SDK Remote Compiler.

Open your Qt/Symbian project, go to Projects facet and add "Remote compiler" configuration.

Under Build Steps, expand "Compile at Server" details and you will see Sis Type and Symbian Signing settings.

There you only need to specify certificate file, certificate key file, and password/passphrase (if any).

As a bonus, you can not only sign the SIS file, but also automatically package it with Nokia Smart Installer!
Therefore, your Qt and Qt Mobility application now complies with Ovi Publish requirements and can be published to the Nokia Ovi Store! :-)

Example Nokia Qt SDK Remote Compiler output with Symbian Signing enabled :

Running build steps for project messagemerge...

Uploading to remote compiler

Uploaded: 16/24 kB

Uploaded 24 kB, waiting for build

bldmake bldfiles

WARNING: When building for ARMV5 platform Compiler RVCT2.2 or later is required.

ABLD.BAT build gcce urel

make -r -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/EXPORT.make" EXPORT VERBOSE=-s

make[1]: Entering directory `/home/ceefour/project/MessageMerge/messagemerge'

Nothing to do

make[1]: Leaving directory `/home/ceefour/project/MessageMerge/messagemerge'

make -r -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/GCCE.make" MAKEFILE VERBOSE=-s

MMPFILE "/home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP"

make[1]: Entering directory `/home/ceefour/project/MessageMerge/messagemerge'

make -s -C /home/ceefour/project/MessageMerge/messagemerge -f "MAKEFILE_0XEA138C70.MK" TO_ROOT=../../../../../../../../.. EPOCBLD=../../../../../../../../../Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/MAKEFILE_0XEA138C70/GCCE TO_BLDINF=../../../../../../../../../home/ceefour/project/MessageMerge/messagemerge PLATFORM=GCCE MAKMAKE

MifConv version 1.11 build (39).

Checking: art/messagemerge-tiny.svg

Choosing...

Convert files...

.

Loading mif icons...

Loading file: /Symbian/9.2/S60_3rd_FP1/epoc32/winscw/c/system/temp/s1c0.tmp/art_messagemerge-tiny.svgb

Writing mif: /Symbian/9.2/S60_3rd_FP1/epoc32/data/z/resource/apps/messagemerge.mif

perl -S makmake.pl -D /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70 GCCE

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(51) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/osextensions/stdapis/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(52) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/osextensions/stdapis/sys/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(55) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/oem/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(57) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/domain/middleware/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(58) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/osextensions/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(59) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/domain/osextensions/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(61) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/domain/applications/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(62) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/domain/osextensions/loc/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(63) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/domain/middleware/loc/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(64) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/domain/applications/loc/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(65) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/domain/osextensions/loc/sc/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(66) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/domain/middleware/loc/sc/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(67) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/domain/applications/loc/sc/" not found

WARNING: /home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70.MMP(72) : SYSTEMINCLUDE path "/Symbian/9.2/S60_3rd_FP1/EPOC32/include/osextensions/stdapis/stlport/" not found

initialiseConfig: GCCE

perl -S ecopyfile.pl "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70/GCCE/messagemerge.rsg" "/Symbian/9.2/S60_3rd_FP1/EPOC32/INCLUDE/messagemerge.RSG"

make[1]: Leaving directory `/home/ceefour/project/MessageMerge/messagemerge'

make -r -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/GCCE.make" LIBRARY VERBOSE=-s

make[1]: Entering directory `/home/ceefour/project/MessageMerge/messagemerge'

make -s -C /home/ceefour/project/MessageMerge/messagemerge -f "MAKEFILE_0XEA138C70.MK" TO_ROOT=../../../../../../../../.. EPOCBLD=../../../../../../../../../Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/MAKEFILE_0XEA138C70/GCCE TO_BLDINF=../../../../../../../../../home/ceefour/project/MessageMerge/messagemerge PLATFORM=GCCE LIB

make -s -r -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70/GCCE/MESSAGEMERGE_0XEA138C70.GCCE" LIBRARY

make[1]: Leaving directory `/home/ceefour/project/MessageMerge/messagemerge'

make -r -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/GCCE.make" RESOURCE CFG=UREL VERBOSE=-s

Created /Symbian/9.2/S60_3rd_FP1/EPOC32/INCLUDE/messagemerge.RSG

make[1]: Entering directory `/home/ceefour/project/MessageMerge/messagemerge'

make -s -C /home/ceefour/project/MessageMerge/messagemerge -f "MAKEFILE_0XEA138C70.MK" TO_ROOT=../../../../../../../../.. EPOCBLD=../../../../../../../../../Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/MAKEFILE_0XEA138C70/GCCE TO_BLDINF=../../../../../../../../../home/ceefour/project/MessageMerge/messagemerge PLATFORM=GCCE CFG=UREL RESOURCE

make -s -r -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70/GCCE/MESSAGEMERGE_0XEA138C70.GCCE" RESOURCEUREL

Creating /symbian/9.2/s60_3rd_fp1/epoc32/build/home/ceefour/project/MessageMerge/messagemerge/messagemerge_0xea138c70/gcce/urel

make[1]: Leaving directory `/home/ceefour/project/MessageMerge/messagemerge'

make -r -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/GCCE.make" TARGET CFG=UREL VERBOSE=-s

make[1]: Entering directory `/home/ceefour/project/MessageMerge/messagemerge'

make -s -C /home/ceefour/project/MessageMerge/messagemerge -f "MAKEFILE_0XEA138C70.MK" TO_ROOT=../../../../../../../../.. EPOCBLD=../../../../../../../../../Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/MAKEFILE_0XEA138C70/GCCE TO_BLDINF=../../../../../../../../../home/ceefour/project/MessageMerge/messagemerge PLATFORM=GCCE CFG=UREL BLD

make -s -r -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/MESSAGEMERGE_0XEA138C70/GCCE/MESSAGEMERGE_0XEA138C70.GCCE" UREL

main.cpp

templatesdialog.cpp

templateeditdialog.cpp

mainwizard.cpp

messagemerger.cpp

moc_templatesdialog.cpp

moc_templateeditdialog.cpp

moc_mainwizard.cpp

qrc_images-symbian.cpp

make[1]: Leaving directory `/home/ceefour/project/MessageMerge/messagemerge'

make -r -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/GCCE.make" FINAL CFG=UREL VERBOSE=-s

make[1]: Entering directory `/home/ceefour/project/MessageMerge/messagemerge'

make -s -C /home/ceefour/project/MessageMerge/messagemerge -f "MAKEFILE_0XEA138C70.MK" TO_ROOT=../../../../../../../../.. EPOCBLD=../../../../../../../../../Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/home/ceefour/project/MessageMerge/messagemerge/MAKEFILE_0XEA138C70/GCCE TO_BLDINF=../../../../../../../../../home/ceefour/project/MessageMerge/messagemerge PLATFORM=GCCE CFG=UREL FINAL

make[1]: Leaving directory `/home/ceefour/project/MessageMerge/messagemerge'

make -s -f Makefile sis

Processing messagemerge_release-gcce.pkg...

Created messagemerge_unsigned.sis

Successfully created messagemerge.sis for release-gcce using certificate c/home/ceefour/project/MessageMerge/messagemerge/.cert/OVI_10-29-2010.crt!

make -s -f Makefile ok_installer_sis

Processing messagemerge_installer.pkg...

Created messagemerge_installer_unsigned.sis

Successfully created messagemerge_installer.sis using certificate c/home/ceefour/project/MessageMerge/messagemerge/.cert/OVI_10-29-2010.crt!

Binary downloaded to: /home/ceefour/project/MessageMerge/messagemerge-build-wcc/messagemerge_installer_qt-4_6_3_m1_0_2_s60_3_1.sis

Download complete

Signing Symbian/Qt Application in Linux

Signing Symbian/Qt Mobile Applications conventionally has to be done on Windows.
The good news is now it's possible to sign Symbian/Qt mobile applications in Linux-based operating systems such as Ubuntu, with the help of wine.

  1. First you need to get a Symbian certificate and key.
    You can get your applications Symbian signed for free and get developer certificates from Ovi Publish.

  2. Extract the signsis.exe file from this zip file.
    Source: FExplorer thread
    I recommend to make this file executable so you can run it directly with Wine and not having to prefix "wine" command for launching.
    Running this command on Terminal:
    chmod +x signsis.exe

  3. Install Wine.
    In Ubuntu, open Terminal and type:
    sudo apt-get install wine
Now you can sign your unsigned SIS application files.

Type this command in Terminal:

wine path/to/signsis.exe <application-file.sis> <certificate.crt> <certificate.key>

If you make signsis.exe executable you can simply type:

wine path/to/signsis.exe <application-file.sis> <certificate.crt> <certificate.key>

Now you can sign any SIS file at will. :-)

For example in my system this is how it looks:

$ /opt/signsis/signsis.exe -s -v messagemerge_qt-4_6_3_m1_0_2_s60_3_1.sis messagemerge_devsigned.sis OVI_10-29-2010.crt OVI_10-29-2010.key

SIGNSIS Version 4, 0, 0, 1
A utility for signing Software Installation (SIS) files.
Copyright (c) 2004 Symbian Software Ltd. All rights reserved.

Signing
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub

Wednesday, November 17, 2010

Download qt_installer.sis Qt Installer for Symbian and other goodies

Your Nokia/Symbian phone doesn't have the required version of Qt framework library yet.

And you're lazy to to install Qt for Symbian SDK.

What to do? You just need to download the qt_installer.sis file.

It can be found here:

ftp://ftp.qt.nokia.com/qt/symbian/

On the appropriate subfolder (Qt version), you'll find qt_installer.sis that can be transferred and installed on your Symbian/S60 Nokia device.

Nokia Qt SDK Remote Compiler - Available Environments

Here are the list of build environments provided by Nokia Qt SDK Remote Compiler :

(see attached image)

It's pretty exhaustive. And covers about all the most common options (or *all* possible options???)

I've tried building with Qt 4.6.3 + Mobility 1.0.2 on Symbian 3rd Edition Feature Pack 1 and it builds fine!!! :-)

Really cool!

Installing Nokia Qt SDK Remote Compiler

If you want to compile Qt Symbian/S60 applications on Linux/Ubuntu, you have to install Nokia Qt SDK Remote Compiler.

During Nokia Qt SDK installation, do not choose "Full", but choose "Custom" installation.
Then you can choose to install Experimental > Remote Compiler.

However, if you've already installed Nokia Qt SDK in "Full install" mode, you don't have to uninstall it.

  1. On panel, click Applications > Programming > SDK-Maintenance-Tool
  2. Now you can choose to install Experimental > Remote Compiler
    (see attached picture)

Compiling Qt Symbian S60 applications on Ubuntu/Linux !

I've just found a (very) hidden gem in Nokia Qt SDK : ability to compile/build Qt Symbian S60 applications on Ubuntu/Linux !

It uses a feature called Nokia Qt SDK Remote Qt Compiler.

Nokia Qt SDK has made it possible to simulate/run Symbian applications in a simulator (not emulator!) environment in Windows, Linux, or Mac OS X.

However, by using Nokia Qt Remote Qt Compiler, it's possible (and practical) to build Symbian/S60 applications on Linux/Ubuntu as well.
(Note that you still need to run the generated SIS files on a device, because Symbian/S60 emulator is not available for Linux, at least not with straightforward installation.)

I'm still on my way to installing the required stuff, but the steps are outlined here :