[Update] Yesterday PR 1.3 was released including Qt 4.7. Also the Nokia Qt SDK was updated to include Qt 4.7, so you don’t need to install it manually anymore. Still I’m providing Qt Mobility 1.1 packages because only 1.0 is preinstalled with PR 1.3. Please note that my packages conflict with the already installed once, so you have to uninstall them first. Only do so if you know what you’re doing! Updates packages can be fount at the end of this post. [/Update]
[Update2] Fixed the links for PR 1.3. [/Update]
Qt Mobility 1.1 final is not out yet, but I needed to test my application against it, therefore I looked for an easy way to compile my application against the git version of Qt Mobility 1.1 and also I wanted to test it on my Nokia N900. Here are some steps that worked for me.
Getting Qt 4.7 for Maemo5 into the Nokia Qt SDK
First we need to get Qt 4.7 into the Nokia Qt SDK because it comes only with Qt 4.6.2 preinstalled. The SDK is using MADDE for cross compilation so we basically need to get Qt 4.7 into MADDE. Luckily someone else already wrote about that. The instructions can be found here. Make sure to set the MADDE_PATH in fetch-qt4.7.0-latest.sh to something like this:
MADDE_PATH=/home/myuser/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim
Now we have the Qt armel binaries needed to cross compile Qt 4.7 applications for Maemo5. You now can use Qt Creator together with the Maemo target to create Qt 4.7 applications.
Getting Qt Mobility 1.1 for Maemo5 into the Nokia Qt SDK
Next, we need the armel binaries of Qt Mobility. Unfortunately there are no official build available yet (or I can’t find them). Therefore I fired up my scratchbox and compiled them myself. No big surprises there. I’ll provide the packages at the end of this post. In case you want to do it yourself, the steps are roughly the following:
- From outside of scratchbox add in /scratchbox/etc/profile
- /opt/qt4-maemo5/bin to PATH
- /opt/qt4-maemo5/lib/pkgconfig to PKG_CONFIG_PATH
- Inside scratchbox add extras-devel to your repositories
- apt-get update
- apt-get install libqt4-experimental-dev libqt4-experimental-opengl-dev
- Build Qt Mobility
Now of course it would be nice to create a debian package to make deployment easier. Therefore I hacked up some quick&dirty debian directory based on a Debian and a Maemo package. The results are binary packages for x86 and armel
All left to do is to unpack the armel packages into the MADDE directory of you Nokia Qt SDK. By doing this:
cd /home/myuser/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim
dpkg -x [name of the first package].deb .
dpkg -x [name of the second package].deb .
Make sure you use the armel packages for that the fremantle-arm-sysroot-1030-slim directory should only contain arm binaries.
Compiling your app
Now open Qt Creator, select the Maemo target and compile. If everything worked fine, you should get a armel binary of your application.
Run it on the N900
Finally use ssh to copy over the -libs package and install it using “dpkg -i [package name]“. Also copy over the binary of your application and run it.
I hope I didn’t forget anything important. If you’re unsure and you still have some time, then simply wait a bit for the official packages – it can’t be that long anymore
Files for PR 1.2
The build does not contain the ‘messaging’ module. I had some problems compiling it and personally I don’t need it anyways. The rest of the modules is included
qtmobility-libs_1.1.0~20101024_armel.deb
qtmobility-dev_1.1.0~20101024_armel.deb
qtmobility-libs_1.1.0~20101024_i386.deb
qtmobility-dev_1.1.0~20101024_i386.deb
debian.tar.gz
Files for PR 1.3
These packages contain all Qt Mobility 1.1 modules. Including the ‘messaging’ module.
qtmobility-libs_1.1.0~20101025_armel.deb
qtmobility-dev_1.1.0~20101025_armel.deb
qtmobility-libs_1.1.0~20101025_i386.deb
qtmobility-dev_1.1.0~20101025_i386.deb
debian_pr13.tar.gz
P.S.
If someone knows how to make Qt Mobility 1.1 work with Qt Simulator, please let me know.