MADDE + Qt 4.7

Maemo 5 PR 1.2 is out with Qt 4.6.2  installed, so developers now can create applications with Qt 4.6 using either the official scratchbox based SDK or MADDE (remember, “MADDE is currently a technology preview.”)

BUT… there are people who prefer “Livin’ on the Edge“. If you are one of those and already want/need to develop with Qt 4.7 (not released yet!) for Maemo 5, using MADDE to build your applications / packages, here is an update to the procedure first published by the troll Harald Fernengel (AKA harryF). Although the title says “on MacOS X”, the steps also work on Linux.

Step-by-step:

  • Install MADDE. Download it here.
  • If you are not using a Debian based distro, you need to install the “Tools for Debian Packages” package of your distribution (e.g. “deb” on openSUSE, sys-apps/debianutils on Gentoo).
  • Download the script fetch-qt4.7.0-latest.sh. This script downloads the libqt4-experimental packages from repository.maemo.org and installs then in your MADDE – Before you run the script, remember to adjust the MADDE_PATH variable according to the path you installed MADDE.
  • Download qt4-tools-latest.tar.gz. It contains the Qt tools compiled for the correspondent version, configured for cross compiling. Extract to /opt/qt4-maemo5.
  • Check if mad is in your PATH.

To build an application using your fresh environment, run /opt/qt4-maemo5/bin/qmake && make .

If you succeeded in the setup process, this should result in a armel binary ready to run on N900. To generate a deb package, you can use the tools offered by MADDE to build a skeleton of debian package and so on.

To run your application on N900, install libqt4-experimental-* packages. If QtQuick (QML) is part of your plans, qmlviewer  is in the package qt4-experimental-declarative-qmlviewer .

UPDATE (2010-06-15): For newer (or older) versions, check http://anselmolsm.org/public/qt/madde-qt47/

UPDATE (2010-09-09): Links updated to download the latest version.

Tagged , , , , , . Bookmark the permalink.

11 Responses to MADDE + Qt 4.7

  1. maninalift says:

    I’m a bit confused, how is there a preview technology “Maemo Application Development and Debugging Environment” when Maemo is retiring. Will it become Meego Application Development and Debugging Environment? Or is Maemo continuing? Or???

  2. anselmolsm says:

    Quim Gil on MeeGo-dev mailing list:

    “http://wiki.maemo.org/MADDE

    Coming soon to MeeGo and its developer documentation. Good that MeeGo
    also starts with M so we don’t need to rename anything. ;)”

    http://lists.meego.com/pipermail/meego-dev/2010-May/002062.html

  3. maninalift says:

    @anselmolsm, thanks. AKA RTFWiki :-)

  4. maninalift says:

    I mean RTFML

  5. anselmolsm says:

    There is an update for libqt4-experimental packages. I’ll update the script ASAP (and try to make it smarter too)

  6. Anselmo!
    Aqui é Samara do Betim Open Source, da organização do FSLBH/Betim.
    Você esteve no FSLBH em Betim, mas acredito que nem pudemos nos conhecer. Preciso que entre em contato comigo, por gentileza. Agradeço!

  7. oceanchild says:

    I updated MADDE with Qt 4.7 but when I include this qmake path (/opt/qt4-maemo5/bin/qmake) in Qt Creator it gives the following error:

    “Qt version is not properly installed, please run make install.”

    I also noticed that in MADDE there are two places where different versions of qmake are located (after updating MADDE with Qt 4.7):

    one is “$HOME/.madde/0.6.72/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/opt/qt4-maemo5/bin” where qt version is 4.7

    another one is “$HOME/.madde/0.6.72/targets/fremantle-pr12/bin” where qt version is 4.6.2

    I tried to add the first path (with Qt 4.7) in Qt creator but it didn’t recognize that. I’m newbie in Maemo field, so definitely I’m missing something here. Could anyone please suggest something in this regard?

    • anselmolsm says:

      @oceanchild I didn’t test this setup with Qt Creator, just from the command line. I’ll try it later and check if there is something missing in order to make it work fine with Qt Creator.
      In parallel, if you have any updates on it, let us know =)

  8. anselmolsm says:

    @oceanchild, ok, I found why Qt Creator complains about Qt not properly installed. It uses the output of ‘qmake -query’ to check the paths to Qt binaries, libs, headers and other stuff.

    With the steps used to generate this MADDE with Qt 4.7, we build the Qt tools (e.g. qmake) with prefix =/opt/qt4-maemo5 . However, we uncompress the deb files with libs and headers to the sysroot inside MADDE dir. For the MADDE point of view, it is ok, but Qt Creator does not understand that.

    So, as a workaround, I created these 2 links:

    ln -s PATH_TO_MADDE/0.6.72/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/opt/qt4-maemo5/ /opt/qt4-maemo5/lib

    ln -s PATH_TO_MADDE/0.6.72/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/opt/qt4-maemo5/include/ /opt/qt4-maemo5/

    With those links, the verification made by Qt Creator works, then the Frankenstein Qt we created is recognized as a valid and can be used to build projects inside Creator =)

  9. oceanchild says:

    @anselmolsm, thanks a lot.

  10. Pingback: Zwong » Blog Archive » Qt Mobility 1.1 + Maemo5 + Nokia Qt SDK