So, if you're an application developer interested in writing for MeeGo IVI today, how to you get started? Although the MeeGo doesn't yet have an IVI-specific SDK, you can use the existing MeeGo SDK and build system to roll out your first IVI project.
The current release of the MeeGo SDK is version 1.1 . The MeeGo project publishes the SDK through Apt and Yum repositories, and it has officially validated MeeGo on the latest 32-bit versions of Fedora and Ubuntu. Other distributions might run it just fine; the wiki maintains a compatibility list . To install the SDK, you can simply add the MeeGo repository to your package and management system, import the repository's GPG key, and select the meego-sdk package. meego-sdk is a meta-package that includes the QtCreator IDE, ARM and x86 toolchains, the MADDE (Maemo Application Development and Debugging Environment) cross-compiler, the QEMU emulator, and a set of QEMU images for the various MeeGo UXs.
Next, you can install a build target. Currently, the best option is to use the handset UX target, because it bears the most similarity to IVI – namely the reliance on touch-screen as opposed to hardware keyboard input. You make the target using MADDE. Run sudo mad-admin create -f meego-handset-ia32-1.1 to fetch the Handset-specific sysroot and create the target. You can check that the target installation was successful by building the QTHello demo program:
mad -t meego-handset-ia32-1.1 pscreate -t qt-simple qthello cd qthello mad -t meego-handset-ia32-1.1 qmake mad -t meego-handset-ia32-1.1 make
The next step is to install a MeeGo run time for QEMU if you intend to test on your development system. (If you intend to test on actual hardware, this step isn't necessary, of course.) Here again, MADDE simplifies the process. Run mad-admin list runtimes to get a list of the available run times. The command sudo mad-admin create -f -e meego-handset-ia32-qemu-1.120101031.2201-sda-runtime (substituting the most recent version of the run time) fetches and installs it. Then, you can launch it in QEMU with sudo mad remote -r meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime poweron.
Finally, you need to configure QtCreator to use the MeeGo toolchain. Open Tools|Options|Qt4|Qt Versions and click on the Plus button to add a new Qt version. You will need to specify the full path to MADDE's version of qmake; in this example, the path is /usr/lib/madde/linux-i686/targets/meego-handset-ia32-1.1/bin/qmake.
Creating a New Project
You can start a new MeeGo app project in QtCreator with the project wizard (Figure 4). From the File menu, select New File or Project, and QtCreator presents you with a series of templates from which to choose. Most mobile apps fall under the Mobile Qt Application and MeeGo Touch Framework Application templates. If you are unsure, choose Mobile Qt Application; the Touch framework is primarily for cutting-edge development on touch interfaces that have not yet made it into the official MeeGo APIs. You can then select one or more build targets for your application – the list inside Qt Creator is pre-populated with the MADDE targets you installed earlier. Last but not least, you can customize the skeleton files generated for your new project and add them to a version control system before you begin.
The MeeGo 1.1 API  is based on Qt and Qt Mobility, plus OpenGL ES versions 1.1 and 2.0. Additionally, the MeeGo Platform API is available but not recommended for general development; it consists of the in-progress Touch Framework and lower-level libraries like Gstreamer, PulseAudio, and Qt Web run time. If you are comfortable with these warnings, the developer documentation is available on the MeeGo wiki .
Qt also provides the D-Bus and network communications interfaces, WebKit browser engine, SQL database support, and high-level OpenGL and SVG support. MeeGo's API lacks support for the full QT 4.7 standard, particularly when it comes to the Phonon library, QtOpenVG, QtDesigner, Qt3Support, and several of the testing tools.
MeeGo 1.1 does support the full Qt Mobility API, however, including PIM support, Messaging, Multimedia, the hardware Sensors API for detecting screen orientation, the Location API for GPS and other positioning information, and the Publish-and-Subscribe framework for notifications.
To familiarize yourself with the cross-compilation toolchain, you can build a simple “hello world” app using Qt Mobility to grab some system information. Place the code in Listing 1 in your new project's main.cpp.file.
This code grabs the current language setting from QsystemInfo and displays it on screen. To build it as an application, you must also add (not overwrite...) two lines to the .pro project file:
CONFIG +- mobility MOBILITY +- systeminfo
The first line tells qmake to process the Qt Mobility config script; the second tells the build script to link to the SystemInfo library. To compile the app into an RPM package, select Build Project from the Build menu.
If you are testing in QEMU, however, you need to configure access to the QEMU virtual device before you can run the app in the emulator. Go to Tools|Options|Projects|MeeGo Device Configurations in QtCreator. Click Add to create a new device. Choose the Meego emulator device type, select password authentication, and use root and meego as the username/password combination (Figure 5). Also make sure that the emulated device uses 127.0.0.1 as its hostname, and TCP port 6666 for SSH. The emulator redirects this connection to port 22 on the emulated device, so you can ssh into the device with ssh email@example.com -p 6666. Click Apply to save your settings.
You can now run the app by switching to QtCreator's Projects tab and selecting the MeeGo target. Under Run, you can choose the QEMU virtual device you just set up, then click on the Run toolbar button to run your app in the emulator.
For now, you will have to make do with the MeeGo Handset UX target, which is less than ideal for IVI, but it is a start. The MeeGo developer documentation is thorough particularly when you can supplement it with Qt and Qt Mobility docs from Nokia. Fortunately, MeeGo mandates that all UXs branded with a particular version number are API and ABI compatible, so the 1.1 SDK will at least build supported apps when you use the Handset target. You just don't get the IVI home screen and taskbar in the emulator. Thanks to the compliance guarantee, though, you can package your app in QtCreator and install it manually on an Atom-based netbook running the MeeGo IVI 1.1 release – that give you as close to a real-world in-vehicle test platform as you can currently get.