This tutorial introduce how to use the 3rd party libraries in MeeGo SDK.
The contents in this page is still under development. Some features are in development and some bugs are in fixing. Please just take it as a reference instead of a formal released document.
When you use the 3rd party library in MeeGo, first you need to make sure the 3rd party library is built for MeeGo and has been packaged in rpm so it can be installed on MeeGo devices.
This tutorial creates a library called gameengine, which is a simple summator for only 2 operands. We will create an application called game-no-1 to use that library. It's simple story for developer to develop and use libraries which is not in default MeeGo distribution.
Create rpm package of the 3rd party library
tar zxvf 3rdparty_GameEngine.tgz
- Open the ~/GameEngine/GameEngine.pro with Qt Creator installed by MeeGo SDK.
- Select the correct target you want to deploy the library
- Build the library
- Deploy the library by select "Deploy Project "GameEngine" from Build menu.
- Workaround for rpm package creation. Edit the ~/GameEngine/gameengine.spec and change the last line from:
- Again deploy the library by select "Deploy Project "GameEngine" from Build menu.
- You will get the correct rpm package at ~/GameEngine-build-meego/rrpmbuild/gameengine-0.0.1-1.i586.rpm. Since the current Qt Creator has not been able to deploy the package into sysroot automatically, the above steps just generate the rpm package. It will be fixed.
Deploy the 3rd party library to sysroot
sudo mad-admin -t <target> xrpm -i ~/GameEngine-build-meego/rrpmbuild/gameengine-0.0.1-1.i586.rpm
Build the application
tar zxvf 3rdparty_game-no-1.tgz
- Open the ~/game-no-1/game-no-1.pro from Qt Creator
- Select the same target as the GameEngine project
- Build the application.
Test the application
- Start the MeeGo Emulator from Qt Creator
- Deploy the library to runtime. Right click GameEngine project to popup the context menu and select "Deploy Project "GameEngine".
- Deploy the application to runtime. Right click game-no-1 project to popup the context menu and select "Deploy Project "game-no-1".
- Launch the game-no-1 from Qt Creator. The application will show up in MeeGo Emulator and show the result calculated from the gameengine.