Meego Wiki
Views

SDK/Docs/1.1/Getting started with the MeeGo SDK for Linux

From MeeGo wiki
< SDK | Docs | 1.1
Revision as of 10:32, 10 December 2010 by Fabo (Talk | contribs)
Jump to: navigation, search

This page describes how to install and configure the MeeGo 1.1 SDK on your Linux development system.

Contents

Prerequisites

  • Hardware: Any reasonably modern hardware, such as 32-bit Intel Atom or Intel Core 2 CPU. To use QEMU to run MeeGo in a virtual machine your system must have support for Virtualization Technology (VT). See the Graphics Acceleration page for details.
  • Software: The MeeGo 1.1 SDK has been validated on 32-bit versions of Fedora 12, [Fedora 13, Ubuntu 9.10, and Ubuntu 10.04 LTS. For support status and issues using other host OS's see this page.
  • Root privileges: To install the SDK you will need to have root privileges. Commands that require root privileges are prefaced with "sudo". For convenience, you may wish to setup "sudo" capabilities to easily switch between root and normal user privileges (see sudoers manpage.)
  • Commands: Terminal commands are prefaced with "$". Do not enter $ when entering the commands in your terminal.

Configuring distributions package manager

On Ubuntu or Debian

  1. Add the following line to /etc/apt/sources.list.d/meego-sdk.list.
    Replace ${distribution}/${version} with one of the following: "debian/5.0", "ubuntu/09.10", "ubuntu/10.04" or "ubuntu/10.10".
    deb http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/ / 
  2. Add the repository public key:
    $ gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A
    $ gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -
  3. Update the packages database:
    $ sudo apt-get update
  4. To check that the MeeGo repository has been correctly added, run the following command. The details of the MADDE package should be printed.
    $ apt-cache policy madde

On Fedora

  1. Go to the yum repository directory:
    $ cd /etc/yum.repos.d/ 
  2. Add the MeeGo SDK yum repository.
    Replace ${distribution}/${version} with one of the following: "fedora/12" or "fedora/13".
    $ sudo wget http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo
  3. Install the signing key:
    $ sudo rpm --import http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/repodata/repomd.xml.key 
  4. Update the packages database:
    $ sudo yum update

On MeeGo

  • To add the MeeGo SDK repository on a system running MeeGo, run the following command.
    Replace ${distribution}/${version} with one of the following values: "meego/1.1" or "meego/trunk".
    $ sudo zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo

On openSUSE

  • To add the MeeGo repository, run the following command.
    Replace ${distribution}/${version} with one of the following values: "opensuse/11.2" or "opensuse/11.3".
    $ sudo zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo

Installing the MeeGo SDK

  • Debian / Ubuntu
    $ sudo apt-get install meego-sdk
  • Fedora
    $ sudo yum install meego-sdk
  • OpenSUSE / MeeGo
    $ sudo zypper install meego-sdk

For ARM only:

  • Debian / Ubuntu
    $ sudo apt-get install meego-sdk-armv7l
  • Fedora
    $ sudo yum install meego-sdk-armv7l
  • OpenSUSE / MeeGo
    $ sudo zypper install meego-sdk-armv7l

For IA32 only:http://wiki.meego.com/SDK/Docs/1.1/Configuring_QEMU_runtimes

  • Debian / Ubuntu
    $ sudo apt-get install meego-sdk-ia32
  • Fedora
    $ sudo yum install meego-sdk-ia32
  • OpenSUSE / MeeGo
    $ sudo zypper install meego-sdk-ia32

Install MeeGo Target

A Target is used to build programs using the MeeGo toolchain and libraries (sysroot). It is downloaded as a large (~250MB) .bz2 file using the commands below. MADDE (MeeGo Application Develop and Debug Environment (background)) is a tool that assists in the download and installation of the Target. "mad-admin" is the MADDE command-line tool. You can install multiple Targets and switch easily between them in Qt Creator (described later).

  1. Create a MeeGo target using MADDE
    Run the command below. Replace <target> with one of
    • meego-core-armv7l-1.1: Build applications for ARM handheld devices (such as N900)
    • meego-handset-ia32-1.1: Build applications for x86 handheld devices (such as Aava)
    • meego-netbook-ia32-1.1: Build applications for x86 netbooks.
    Note that the -f flag instructs MADDE to download the Target tarball (bz2) first.
    $ sudo mad-admin create -f <target> 

    If you encounter problems, check the Troubleshooting page

  2. To check that the target has been installed correctly, run the following.
    Replace <target> with one of the values described in the previous step
    $ mad -t <target> pscreate -t qt-simple qthello
    $ cd qthello
    $ mad -t <target> qmake
    $ mad -t <target> make
    
  3. To check that the qt-simple application is created for the correct target, run:
    $ file build/qthello

Install MeeGo Runtime

A Runtime is the MeeGo OS image that is run with QEMU when debugging applications on your host system. It is not required if you develop against real hardware running MeeGo. It is downloaded as a large (~650MB) .bz2 file using MADDE. The Runtime is not needed until you have finished configuring Qt Creator. However, as this step may take some time, it is recommended to start it now so that it can proceed in the background while you continue following the steps on this page.

See Downloading a Runtime and Using QEMU

Configuring Qt Creator to use the MeeGo toolchain(s)

Start Qt Creator by selecting Applications > Programming > Qt Creator.

Configure Qt Creator to use the MeeGo toolchain(s):

  1. Go to Tools > Options > Qt4 > Qt Versions.
  2. On the right side of the Qt Versions view, click on the plus sign button to add a new version.
    A blank, new version appears in the Qt Versions view.
  3. On the Version Name line, specify a name for the new version.
  4. On the qmake location line, specify a qmake location for the new version. The toolchain installs by default to usr/lib/madde/linux-i686/targets/<target>/bin/qmake.
  5. Click Rebuild, Apply and OK.
Adding the MeeGo toolchain(s) in Qt Creator

Using the MeeGo SDK Qt version

It is also possible to use Qt Creator without a MeeGo toolchain. This option can be useful if you don't need to cross-compile your software: for example, if you are doing QML development with no use of C++.

The steps are the same as above, but the qmake location is set to the qmake installed with the meego-sdk-qt libraries. The usual location for this on Linux is:

/opt/meego/meego-sdk-qt/bin/qmake

Developing with the SDK

To start developing with the MeeGo SDK, the hello world tutorial is a good starting point.

This tutorial covers how to start a project, package it, and deploy it to a device (either a real device, or a QEMU runtime set up through MADDE).

Removing components

On Ubuntu

To remove installed components, run:

$ sudo apt-get remove --purge meego-sdk-qtcreator madde qt-tools arm-2009q1 qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu meego-sdk-qt

To remove dependencies related to installed components, run:

$ sudo apt-get autoremove

To remove MADDE directory (it is not automatically removed when "madde" package is uninstalled):

$ sudo rm -rf /usr/lib/madde

To remove the packages from your local repository (/var/cache/apt/archives/), run:

$ sudo apt-get clean

On Fedora

To remove installed components, run:

$ sudo yum remove meego-sdk-qt-creator madde qt-tools arm-2009q1 qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu

To remove MADDE directory:

$ sudo rm -rf /usr/lib/madde


On openSUSE

To remove installed components, run:

$ sudo zypper remove -u meego-sdk-qt-creator madde qt-tools arm-2009q1 qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu

To remove MADDE directory:

$ sudo rm -rf /usr/lib/madde

Another language version of this page

Personal tools