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

6 comments:

  1. Guys check out The Nokia Qt SDK has ushered in a new era in mobile development for Symbian and Maemo , and forthcoming MeeGo devices from Nokia.
    With the Nokia Qt SDK, creating apps for hundreds of millions of Nokia device owners has never been easier or more rewarding.

    For details on all QT Tools and Downloads check the link: http://www.forum.nokia.com/Develop/Qt/Tools/

    ReplyDelete
  2. Hi,

    I have a couple of questions: How do you get the verbose output on the remote compiler? I tried to use the smart_installer option, because that includes the smart installer into the package. Do you know if they are using the latest version of the smart installer? Do you know if this really works (tested it)?

    ReplyDelete
  3. Another thing is, if you want to publish your Qt app on PublishtoOvi, you need to submit an unsigned sis file to the intake tool, which wraps up your app and the smart_installer, however, I believe those file need to be signed, once for the smart_installer, and once for your package. So the question is, does the remote compile method sign the wrapped package or just your app being signed? Anyway I tried this, then used your wine method for later signing in order to test my wrapped up package but the resulting sis file would not install on RDA devices.

    ReplyDelete
  4. The Smart Installer packaged by Qt Creator actually works/tested on my Nokia E5 device.

    Note that you first need to install the Developer Certificate Installer SIS provided by Ovi Publish, in order for the device to recognize your Ovi Publish cert-signed SIS applications. This might explain you not being able to run your app on RDA.

    The Ovi Publish certificates are actually held by Ovi Publish, and you're only given developer certificates. In effect, you can only publish your app using Ovi Publish certs using Ovi Store. i.e. you cannot distribute your apps stand-alone without publishing them first to Ovi Publish (signed by your Ovi Publish production certificates, which are kept by Ovi Publish).

    Regarding Ovi Publish + Smart Installer, I don't know yet, as my app is still going through QA... FYI I did use Qt Creator SDK with Remote Compiler to create a Smart Installer package and signed with my Ovi Publish developer certs, before submitting to Ovi Publish.

    So let's hope it's working well. :)

    ReplyDelete
  5. Guys check out the Online learning Mobile Hands-on Labs v1.4,
    This e-learning consists of ten hands-on modules that help you get started with the development of mobile applications in Qt, Web Runtime, and Java ME.

    Check the link for more info: http://www.forum.nokia.com/info/sw.nokia.com/id/a8e2f6a6-cb60-4433-8d38-206e3d9d3013/Mobile_Hands-on_Labs.zip.html

    ReplyDelete
  6. Interesting blog and i really enjoyed to visit your blog and i think most of the peoples are likes your entertainment blog because they get good enjoyment to read your information.
    domain hosting india

    ReplyDelete

Be the first to comment!