PySide for Maemo 5 rebuilt for Qt 4.6.2 final release

Qt 4.6.2 for Maemo 5 was released this week. Due to some changes prior to the final Qt release, PySide users might have seen this error when trying to use QtQui:

Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /usr/lib/pymodules/python2.5/PySide/QtGui.so: undefined symbol: _ZNK24QAbstractKineticScroller10metaObjectEv

To fix this, we rebuilt the PySide 0.2.3 packages against the Qt 4.6.2 release, and now it should be working again. So make sure you are using the latest PySide packages on Maemo 5 (0.2.3-1maemo3) and enjoy!

Posted in General | Tagged , , , | 2 Comments

Installing Qt for Symbian SDK 4.6.2 on Linux

Qt 4.6.2 was released last Monday, so I took some time to update the GnuPoc and Qt installer scripts I previously released for 4.6.1.

Besides the upgrade to Qt 4.6.2, there are other minor changes:

  • Both installers now check MD5 signatures of the necessary files, to make sure they are not corrupted.
  • The GnuPoc installer now supports the 3.1 SDK (see updated instructions below).
  • Added “unset QMAKESPEC” command to setup instructions (at least Gentoo sets it globally, which affects qmake).

The instructions are basically the same as the previous ones, but I will post the full instructions here for completeness.

Preparation

Download all required files to a single directory (e.g. “~/downloads”):

For building the native tools from gnupoc, you will need:

  • the GCC C/C++ compilers
  • development files for zlib
  • development files for openssl

On Ubuntu, you can install these using the following command:

sudo apt-get install build-essential zlib1g-dev libssl-dev

Installation

First, install GnuPoc + S60 SDK + the Open C/C++ plugin:

./gnupoc_1.15_installer_v2.sh \
    <download-dir> \
    <gnupoc-dir>\
    <x.y>

Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), <gnupoc-dir> with the destination directory for GnuPoc and the SDK files (e.g. “~/gnupoc”) and <x.y> with the SDK version you want to install (e.g. “3.1” or “5.0”). Note that both directories must have absolute paths.

If installation was successful, you should see an output like:

Installation has finished. Before using the GnuPoc SDK, run these commands on the console:
 
export PATH=<gnupoc-dir>/bin:$PATH
export EPOCROOT=<gnupoc-dir>/symbian-sdks/5.0/ # trailing "/" is required!
 
(These commands must be run again every time a new console is opened.)

Run the commands as instructed on the message. Next, install Qt for Symbian:

./qt_for_symbian_4.6.2_linux_installer_v3.sh \
    <download-dir> \
    <qt-s60-dir>

Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), and <qt-s60-dir> with the destination directory for the Qt files (e.g. “~/gnupoc/qt-4.6.2”). Note that both directories must have absolute paths.

If installation was successful, you should see an output like:
Installation has finished. Before using the Qt for Symbian SDK, run this command on the console:
 
export PATH=<qt-s60-dir>/bin:$PATH
unset QMAKESPEC    # make sure there is no QMAKESPEC variable set
 
(This command must be run again every time a new console is opened.)

Before using Qt for Symbian, you should run the command as instructed on the message above.

Usage example

To test the installation, I will describe how to build the “colliding mice” example.

  1. cd into the example source:
  2. cd <qt-s60-dir>/examples/graphicsview/collidingmice/

  3. Now build the example and generate the SIS file
  4. qmake
    make debug-gcce
    make sis

A few notes:

  • Make sure Qt is installed on the device before installing Qt applications. The easiest way to install it is to copy the “qt_installer.sis” package found under <qt-s60-dir> over bluetooth and open the received message to begin the installation.
  • Only the “debug-gcce” (if you are using the GCCE toolchain AKA “CodeSourcery toolchain”) or “debug-armv5” (if you are using RVCT) will work, because the current Qt releases only ship debug versions of the libraries
Posted in Linux | Tagged , , , | 48 Comments

Python tutorial: Accessing APIs without Python bindings

The PyMaemo team has prepared a short tutorial with an actual example on how to access APIs for which there are no Python bindings yet. libosso-abook was used as an example, but in practice, you can access any C libraries using the same approach. This technique can be used while we do not finish implementing the full Maemo API.

Enjoy. 🙂

Posted in General | Tagged , | Leave a comment

Installing Qt for Symbian SDK 4.6.1 on Linux

***For Qt 4.6.2 and S60 3.1 SDK support, be sure to read the updated post***

Update (2010-01-27): New version of Qt installer (v2).

Qt 4.6.1 was released last Tuesday, so I took some time to update my Linux support patches for Qt (which are now merged in qt-s60 tree and hopefully will be in main Qt tree at some point) and GnuPoc (which, thanks to Martin, are now integrated into the latest release).

I had a couple of previous posts detailing instructions on how to install the SDK on Linux, but after some time, it became too boring to run those commands manually, and some people asked for a script. So, from now on, I will provide two installers to make the process much more automated and simple: one installer for GnuPoc + Open C/C++ plugin, and another for the Qt for Symbian SDK.

Note that currently the GnuPoc installer handles only the S60 5.0 SDK. If someone is interested on a 3.1 SDK installer let me know so I can add support for it too.

Preparation

Download all required files to a single directory (e.g. “~/downloads”):

For building the native tools from gnupoc, you will need:

  • the GCC C/C++ compilers
  • development files for zlib
  • development files for openssl

On Ubuntu, you can install these using the following command:

sudo apt-get install build-essential zlib1g-dev libssl-dev

Installation

First, install GnuPoc + S60 5.0 SDK + the Open C/C++ plugin:

./gnupoc_1.15_S60_5.0_installer_v1.sh \
    <download-dir> \
    <gnupoc-dir>

Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), and <gnupoc-dir> with the destination directory for GnuPoc and the SDK files (e.g. “~/gnupoc”). Note that both directories must have absolute paths.

If installation was successful, you should see an output like:

Installation has finished. Before using the GnuPoc SDK, run these commands on the console:
 
export PATH=<gnupoc-dir>/bin:$PATH
export EPOCROOT=<gnupoc-dir>/symbian-sdks/5.0/ # trailing "/" is required!
 
(These commands must be run again every time a new console is opened.)

Run the commands as instructed on the message. Next, install Qt for Symbian:

./qt_for_symbian_4.6.1_linux_installer_v2.sh \
    <download-dir> \
    <qt-s60-dir>

Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), and <qt-s60-dir> with the destination directory for the Qt files (e.g. “~/gnupoc/qt-4.6.1”). Note that both directories must have absolute paths.

If installation was successful, you should see an output like:
Installation has finished. Before using the Qt for Symbian SDK, run this command on the console:
 
export PATH=<qt-s60-dir>/bin:$PATH
 
(This command must be run again every time a new console is opened.)

Before using Qt for Symbian, you should run the command as instructed on the message above.

Usage example

To test the installation, I will describe how to build the “colliding mice” example.

  1. cd into the example source:
  2. cd <qt-s60-dir>/examples/graphicsview/collidingmice/

  3. Open collidingmice.pro and replace these two lines:
  4.     TARGET.UID3 = 0xA000A643
        include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)

    with:
        TARGET.UID3 = 0xE000A643
    In other words: replace the UID3 “0xA000A643” with “0xE000A643” and remove (or comment out) the “include(…)” line. This will allow to sign the built SIS file using a self-signed certificate, otherwise you would need a R&D certificate.

  5. Now build the example and generate the SIS file
  6. qmake
    make debug-gcce
    make sis

A few notes:

  • Only the “debug-gcce” (if you are using the GCCE toolchain AKA “CodeSourcery toolchain”) or “debug-armv5” (if you are using RVCT) will work, because the 4.6.1 release only ships debug versions of the libraries
  • Make sure you do similar changes as described above if you want to try compiling other Qt examples. Otherwise, you will receive errors like “Unable to install” while trying to install the SIS file on the phone.
Posted in Linux | Tagged , , , | 45 Comments

Installing Qt for Symbian on Linux

*** These instructions have been superseded by the GnuPoc and Qt for Symbian unofficial installers, described in this post***

 

Update (2009-09-24): Add workaround for GCCE issue.
Update (2009-10-05): Update gnupoc patch to apply against 20091005 snapshot. Remove workarounds from “Known Issues” sections that are already integrated into new patch.
Update (2009-10-07): Add instruction for installing gnupoc build dependencies.
Update (2009-10-23): New patch version (v9), that now applies cleanly to latest snapshots.
Update (2009-11-17): New patch version (v10), now applies against the 4.6.0 RC1 release.

In a previous post, I provided instructions on running Qt for Symbian (the “Tower” release) on Linux. However, for those who want to play with the bleeding edge Qt for Symbian development, you might want to try out the latest 4.6 development code from Qt GIT. I put some instructions for compiling Qt for Symbian from GIT on Linux as well, but unfortunately it requires the RVCT compiler to build.

Fortunately, today espenr announced daily snapshots, that will allow those who don’t have access to RVCT to try out the latest 4.6 development as well :D. So how to get this thing running on Linux? The snapshots so far consist only of the Windows installer and a .zip containing the source code.

By “merging” information from my two previous posts, I will describe below how to install the Qt for Symbian daily snapshots on Linux. Even if you have a previous installation of the Symbian SDK, you will need to follow the full instructions again (sorry), as these instructions contain a bunch of bug fixes to the Symbian SDK. Hopefully this requirement will go away at some point, when all Symbian SDK portability issues are addressed.

These instructions also work for the just released 4.6.0 RC1.

These instructions were tested only in the following environment:

  • Host: x86 32-bits (running Ubuntu 8.10)
  • Device and SDK: S60 5.0 (N97 and 5800)

Preparation

Download all required files:

(many thanks to Francisco Keppler for hosting this last file on his web site!)

For building the native tools from gnupoc, you will need:

  • the GCC C/C++ compilers
  • development files for zlib
  • development files for openssl

On Ubuntu, you can install these using the following command:

sudo apt-get install build-essential zlib1g-dev libssl-dev

Installation

  1. First, set some environment variables to be used on the following steps (feel free to modify them to install the SDK on some other location). NOTE: these variables are not necessary after installation.
  2. # root directory where all SDK files will be installed
    GNUPOC_ROOT=$HOME/gnupoc
     
    # toolchain directory
    TOOLCHAIN_DIR=$GNUPOC_ROOT/csl_gcc
     
    # Symbian SDK directory
    S60_SDK_DIR=$GNUPOC_ROOT/symbian-sdks/5.0
     
    # Qt SDK directory
    QT_S60_DIR=$GNUPOC_ROOT/qt_s60
     
    # wrapper directory (used by gnupoc)
    WRAPPER_DIR=$GNUPOC_ROOT/bin
     
    # where all downloaded files are located
    SRC_DIR=$HOME/downloads

  3. Install ARM toolchain:
  4. mkdir -p $TOOLCHAIN_DIR
    tar -C $TOOLCHAIN_DIR -xvjf \
      $SRC_DIR/gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2

  5. Unpack gnupoc sources and apply the patch that adds Qt for Symbian support:
  6. tar -xvzf $SRC_DIR/gnupoc-package-1.13.tar.gz
    cd gnupoc-package-1.13
    patch -p1 -i $SRC_DIR/qt_s60_gnupoc_v10.patch

  7. Install Symbian SDK:
  8. cd sdks
    ./install_gnupoc_s60_50 \
      $SRC_DIR/S60_5th_Edition_SDK_v1_0_en.zip \
      $S60_SDK_DIR

  9. Install gnupoc wrappers and native tools:
  10. ./install_wrapper $WRAPPER_DIR
    cd ../tools
    ./install_eka2_tools $TOOLCHAIN_DIR
    # adjust EKA2TOOLS variable to point to correct location
    sed -i "s,EKA2TOOLS=.*,EKA2TOOLS=$TOOLCHAIN_DIR/bin," \
      $WRAPPER_DIR/gnupoc-common.sh

  11. Create a “gnupoc_env.sh” script to be used for gnupoc environment setup, by running this command:
  12. cat > $GNUPOC_ROOT/gnupoc_env.sh << EOF
    export PATH=$WRAPPER_DIR:\$PATH
    export EPOCROOT=$S60_SDK_DIR/ # trailing "/" is required!
    EOF

    (Note: the “cat << EOF … EOF” snippet above will generate a “gnupoc_env.sh” file in $GNUPOC_ROOT.)

  13. Initialize the Symbian SDK environment (you will need to do this every time you close the current shell session):
  14. . $GNUPOC_ROOT/gnupoc_env.sh

  15. Install OpenC:
  16. cd ../sdks
    chmod +x install_openc_16_s60
    ./install_openc_16_s60 \
      $SRC_DIR/s60_open_c_cpp_plug_in_v1_6_en.zip \
      $S60_SDK_DIR

  17. Install Qt for Symbian (it will take some time because some tools need to be compiled for Linux):
  18. chmod +x install_qt_s60
    ./install_qt_s60 \
      $SRC_DIR/qt-symbian-opensource-<version>.exe \
      $S60_SDK_DIR \
      $QT_S60_DIR

    If installation went well, you should see the following:
    ...
    Qt is now configured for building. To start the build run:make debug-winscw|debug-armv5|release-armv5.
    To reconfigure, run 'make confclean' and configure.

    Of course, you do not want to build Qt, so just ignore it and proceed with the next step.

  19. Create a “qt_s60_env.sh” script to be used to setup Qt for Symbian environment, by running this command:
  20. cat > $GNUPOC_ROOT/qt_s60_env.sh << EOF
    export PATH=$QT_S60_DIR/bin:\$PATH
    export QMAKESPEC=symbian-abld
    EOF

    (Note: the “cat << EOF … EOF” snippet above will generate a “qt_s60_env.sh” file in $GNUPOC_ROOT.)

  21. Initialize the Qt for Symbian environment (you will need to do this every time you close the current shell session):
  22. . $GNUPOC_ROOT/qt_s60_env.sh

  23. Install the following SIS files on your device:
    • $EPOCROOT/nokia_plugin/openc/s60opencsis/pips_s60_1_6_ss.sis
    • $EPOCROOT/nokia_plugin/openc/s60opencsis/openc_ssl_s60_1_6_ss.sis
    • $EPOCROOT/nokia_plugin/opencpp/s60opencppsis/stdcpp_s60_1_6_ss.sis
    • $QT_S60_DIR/qt_selfsigned.sis
  24. Unset all temporary variables we used earlier:
  25. unset GNUPOC_ROOT TOOLCHAIN_DIR S60_SDK_DIR \
      QT_S60_DIR WRAPPER_DIR SRC_DIR

Usage

You need to setup the environment, so tools like qmake, bldmake, abld, makesis etc. are found (not necessary if you just did the installation, unless you closed the shell session):

. /path/to/gnupoc_env.sh
. /path/to/qt_s60_env.sh

Note the “.” (dot) before the gnupoc_env.sh. It says that the contents of the gnupoc_env.sh file will be run in the current shell session, as if you typed them by hand.

To actually build some Qt code, use these commands:

cd path/to/source
qmake # assuming the code already has a .pro file
make debug-gcce # or make debug-armv5 (if using RVCT)
make sis # to generate .sis file

And to clean the source:

make distclean

Notes:

  • Be sure to use qmake from Qt for Symbian. Otherwise the generated Makefiles will be for your host system
  • The trailing slash on the EPOCROOT variable is important (this is assumed in many places on Symbian SDK scripts)

Known Issues

  • The snapshots contain only the the “debug” libraries. Therefore, only the debug targets will work, i.e. use only “make debug-gcce” (if using GCCE compiler) or “make debug-armv5” (if using RVCT)

See also the more general known issues related to Qt for Symbian.

Ideas for improvements and TODO items

  • Add Symbian support to Qt configure script, eliminating the need to compile configure.bin
  • Create a nice GUI installer for Linux
  • Allow to easily upgrade Qt for Symbian SDK installation, without requiring to reinstall the entire Symbian SDK
  • Itegration with Qt Creator, KDevelop or some other IDE

Feel free to contribute with your ideas or even better, help implementing them 😀

Posted in General | Tagged , , , | 9 Comments

Compiling Qt for S60 (from GIT) on Linux

Update (2009-09-06): Add instructions for generating the .sis file
Update (2009-09-16): Rebase GIT clone against 4.6 branch; update gnupoc patch (V3); add instructions for patch_capabilities.pl
Update (2009-09-17): A few textual fixes; fixes added to the GIT tree; new gnupoc patch (V4); added instructions for testing the built Qt
Update (2009-09-18): fix GIT instructions
Update (2009-09-21): Use RVCT 2.2 (build 686); small changes to the hello example

Currently it is only possible to build Qt for S60 on Windows and using the proprietary RVCT compiler from ARM.

Windows is needed because the Symbian support code contains calls to the Win32 API, Windows style paths (using backslashes), a few calls to .bat and .exe tools, and inconsistent case for path names (a real issue for Unix based systems).

RVCT is needed due to limitations in GCCE (the GCC Symbian port). From the Qt/S60 README:

The current version of GCCE cannot compile the Qt libraries themselves as it has issues with global static data in DLLs. […]. For more information on this issue see: http://www3.symbian.com/faq.nsf/0/B8542F039C193CCC802573DA0011DFA7

Thanks to the community effort around the gnupoc project (and further modifications made by Martin Storsjö for supporting the newer S60 SDK releases) we are able to build regular S60 applications on Linux. To allow also building Qt applications for S60, it was necessary to port the Symbian support from Qt sources to Linux, and a few more changes to the Symbian SDK scripts to improve Linux support.

You will find below instructions for building Qt for S60 on Linux, using sources from GIT, plus the Linux host support from my own clone.

The RVCT requirement is still necessary, but fortunately there is a Linux version of RVCT available on ARM site (it is paid, but there is a 30-day evaluation version).

Preparation

Although I had previously blogged about installing the S60 SDK on Linux together with the Qt 4.5.2 “tower” release, I will again describe the installation instructions here. Even if you have the S60 SDK already installed, you will need to install it again. This is necessary because gnupoc needs more fixes for building Qt.

That said, download the necessary files:

For building the native tools from gnupoc, you will need:

  • the GCC C/C++ compilers
  • development files for zlib
  • development files for openssl

On Ubuntu, you can install these using the following command:
sudo apt-get install build-essential zlib1g-dev libssl-dev

For building Qt itself, you will also need:

  • RVCT 2.2 (build 686) for Linux installed and accessible on PATH. Run armcc --vsn and you should see:
  • ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 686]

  • WINE. A few tools from S60 SDK (elftran, genstubs and getexports) are only available for Windows. Fortunately, recent versions of WINE are able to run these tools just fine.
  • A copy of Qt GIT tree containing support for Linux host from my tree clone. If you do not have Qt GIT tree downloaded, you get it by running:
  • git clone git://gitorious.org/qt/qt.git
    Next, add a remote for my clone and create a local “s60_linux” branch that will be used to track changes for Linux host support:
    git remote add -f -t s60_linux \
      qt_s60_linux git://gitorious.org/~lizardo/qt/lizardos-qts60.git
    git checkout -b s60_linux qt_s60_linux/s60_linux

    If at some point you need to update the tree (and don’t have any local changes), you can run:
    git checkout s60_linux
    git fetch qt_s60_linux
    git reset --hard qt_s60_linux/s60_linux

S60 SDK Installation (5.0 only)

  1. First, set some environment variables to be used on the following steps (feel free to modify them to install the SDK on some other location). NOTE: these variables are not necessary after installation.
  2. # root directory where all SDK files will be installed
    GNUPOC_ROOT=$HOME/gnupoc
     
    # toolchain directory
    TOOLCHAIN_DIR=$GNUPOC_ROOT/csl_gcc
     
    # S60 SDK directory
    S60_SDK_DIR=$GNUPOC_ROOT/symbian-sdks/5.0
     
    # wrapper directory (used by gnupoc)
    WRAPPER_DIR=$GNUPOC_ROOT/bin
     
    # where all downloaded files are located
    SRC_DIR=$HOME/downloads

  3. Install ARM toolchain:
  4. mkdir -p $TOOLCHAIN_DIR
    tar -C $TOOLCHAIN_DIR -xvjf \
      $SRC_DIR/gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2

  5. Unpack gnupoc sources and apply the patch that adds Qt for S60 support:
  6. tar -xvzf $SRC_DIR/gnupoc-package-1.13.tar.gz
    cd gnupoc-package-1.13
    patch -p1 -i $SRC_DIR/qt_s60_gnupoc_v4.patch

  7. Install gnupoc:
  8. cd sdks
    ./install_gnupoc_s60_50 \
      $SRC_DIR/S60_5th_Edition_SDK_v1_0_en.zip \
      $S60_SDK_DIR

  9. Install gnupoc wrappers and native tools:
  10. ./install_wrapper $WRAPPER_DIR
    cd ../tools
    ./install_eka2_tools $TOOLCHAIN_DIR
    sed -i "s,EKA2TOOLS=.*,EKA2TOOLS=$TOOLCHAIN_DIR/bin," \
      $WRAPPER_DIR/gnupoc-common.sh

  11. Install OpenC (now necessary even for 5.0 SDK):
  12. cd ../sdks
    chmod +x install_openc_16_s60
    ./install_openc_16_s60 \
      $SRC_DIR/s60_open_c_cpp_plug_in_v1_6_en.zip \
      $S60_SDK_DIR

  13. Add support for RVCT to the SDK:
  14. chmod +x install_rvct_support
    ./install_rvct_support $S60_SDK_DIR

  15. Create a “gnupoc_env.sh” script to be used for gnupoc environment setup, by running this command:
  16. cd $GNUPOC_ROOT
    cat > gnupoc_env.sh << EOF
    export PATH=$WRAPPER_DIR:\$PATH
    export EPOCROOT=$S60_SDK_DIR/ # trailing "/" is required!
    EOF

    (Note: the “cat << EOF … EOF” snippet above will generate a “gnupoc_env.sh” file in $GNUPOC_ROOT.)

  17. Unset all temporary variables we used earlier:
  18. unset TOOLCHAIN_DIR S60_SDK_DIR WRAPPER_DIR SRC_DIR
    (Note: GNUPOC_ROOT is not unset because it will be used later on when creating the environment script for Qt.)

  19. Finally, initialize environment by running:
  20. . gnupoc_env.sh
    (Note the “.” (dot) before gnupoc_env.sh. This command will run the commands listed in gnupoc_env.sh on the current shell session, as if you typed them by hand.)

Building Qt for S60

The current configure shell script used for Linux builds does not contain a full support for Symbian. Therefore the configure.exe source was ported to Linux. Here it is called “configure.bin”, and is generated by the autogen.sh script.

  1. Compile configure.bin:
  2. ./autogen.sh

  3. Configure Qt sources:
  4. ./configure.bin \
      -opensource \
      -confirm-license \
      -platform linux-g++ \
      -xplatform symbian-abld \
      -no-webkit \
      -no-phonon

  5. Compile Qt:
  6. make release-armv5

  7. Create a “qt_s60_env.sh” script to be used for Qt/S60 environment setup, by running this command:
  8. cat > $GNUPOC_ROOT/qt_s60_env.sh << EOF
    export PATH=$PWD/bin:\$PATH
    export QMAKESPEC=symbian-abld
    EOF

    (Note: the “cat << EOF … EOF” snippet above will generate a “qt_s60_env.sh” file in $GNUPOC_ROOT.)

  9. Finally, initialize environment by running:
  10. . $GNUPOC_ROOT/qt_s60_env.sh
    (Note the “.” (dot) before qt_s60_env.sh. This command will run the commands listed in qt_s60_env.sh on the current shell session, as if you typed them by hand.)

Reducing Symbian capabilities for Qt

By default, Qt for S60 requires high Symbian capabilities. It does not use all those capabilities itself, but this is done so that the generated SIS does not limit capabilities for Qt applications that need them. Unless you have access to certificates that can sign with high capabilities, you will need to “patch” the generated binaries so that it only requests the set of capabilities accessible through Open Signed Online or by using self-signed certificates.

Fortunately, there is a script under Qt sources called “patch_capabilities.pl” that does just that. I also modified it so that it “patches” the Secure ID and UID3 to match the range used for development purposes (see this page for more details about Symbian UIDs). To be able to self-sign the generated .sis for Qt, run this command:

perl ./bin/patch_capabilities.pl \
  src/s60installs/Qt_for_S60_template.pkg \
  release-armv5

Note this must be done AFTER building Qt, because it modifies some files generated by the build.

Creating the SIS file

To create the final .sis file for Qt, run this command:

make -C src/s60installs/ sis

You should see output similar to:

Processing qt_for_s60_release-armv5.pkg...
Created qt_for_s60_release-armv5_unsigned.sis
 
Successfully created qt_for_s60_release-armv5.sis using certificate Self Signed!

You will find the generated qt_for_s60_release-armv5.sis under “src/s60installs/”.

Testing the built Qt: hello world!

The Qt source has many examples and demos, but a simple “hello world” is very suitable for checking whether Qt was built correctly and if the environment is properly setup.

First, set the environment for gnupoc and Qt/S60, unless you already run these commands on the current terminal session:

. $GNUPOC_ROOT/gnupoc_env.sh
. $GNUPOC_ROOT/qt_s60_env.sh

Next, create a directory that will contain the hello project:

mkdir hello
cd hello

Now create a “main.cpp” file with the following code:

#include <QtGui>
 
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QPushButton hello("Hello, World!");
    QObject::connect(&hello, SIGNAL(clicked()),
        &app, SLOT(quit()));
    hello.show();
    return app.exec();
}

Create the .pro file by running:

qmake -project

Now create the Makefile (and a couple of S60 specific files):

qmake

Finally, build the project and generate a (self-signed) SIS file for it:

make release-gcce # or release-armv5, if using RVCT
make sis

The SIS file will be created on the current directory with the name “<project>_release-<platform>.sis”, where <project> is the project name and <platform> is the S60 platform (either gcce or armv5).

TODO

  • Test the compiled Qt on the device
Posted in General | Tagged , , , | 4 Comments

PySide released!

From the original announcement:

PySide is a project providing an LGPL’d set of Python bindings for the Qt framework.

PySide already provides a full set of Qt bindings as well as automated binding generation tools. Since the whole toolset has been made available, the team expects PySide to be valuable not only to Qt software developers, but to people willing to create Python bindings to any Qt-based library, or to any C++ library in general. Although based on a different technical approach, PySide will initially be API-compatible with existing Python bindings for Qt.

PySide is still a work in progress, and some work is still required to stabilize the codebase. This being said, the team believes it is already in a usable state, especially if an occasional rough edge and unpainted surface can be tolerated. Due to practical reasons, the initial development efforts have been focused on Linux, but the team hopes people to join in porting the code to other platforms and to further develop the bindings and tools.

So if you are interested in creating Python bindings for Qt based C++ code or (soon) other generic C++ code, feel free to try out PySide tools and contribute to its development :D.

Posted in General | Tagged , , | Leave a comment