Meego Wiki
Views

SDK/Docs/1.2/Installing and configuring MeeGo SDK for Linux

From MeeGo wiki
< SDK | Docs | 1.2(Difference between revisions)
Jump to: navigation, search
(Verify the target is installed correctly)
(MeeGo Runtimes)
 
(47 intermediate revisions not shown)
Line 7: Line 7:
This page describes how to install and configure the MeeGo 1.2 SDK on your Linux development system.
This page describes how to install and configure the MeeGo 1.2 SDK on your Linux development system.
-
 
-
'''This page is in progress and is likely to contain incorrect instructions at present'''
 
== Prerequisites ==
== 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 should have support for ''Virtualization Technology'' (VT). Without this, performance is likely to be very poor. See the [[SDK/Docs/1.2/MeeGo_SDK_Graphics_Acceleration|Graphics Acceleration]] page for details. ???
+
* '''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 should have support for ''Virtualization Technology'' (VT). Without this, performance is likely to be very poor. See the [[SDK/Docs/1.2/MeeGo_SDK_Graphics_Acceleration|Graphics Acceleration]] page for details.
-
* '''Software:''' The MeeGo 1.2 SDK has been validated on 32-bit versions of [https://fedoraproject.org/en/index Fedora 12], [https://fedoraproject.org/en/index Fedora 13], [https://fedoraproject.org/en/index Fedora 14], [http://www.ubuntu.com/ Ubuntu 9.10], and [http://www.ubuntu.com/ Ubuntu 10.04 LTS]. ???see http://qa-reports.meego.com/1.2 for tested distros
+
* '''Software:''' The MeeGo 1.2 SDK has been validated on 32-bit versions of [https://fedoraproject.org/en/index Fedora 13], [https://fedoraproject.org/en/index Fedora 14], [http://www.ubuntu.com/ Ubuntu 10.04 LTS], and [http://www.ubuntu.com/ Ubuntu 10.10]. Note that support for Fedora 12 and Ubuntu 9.10 has been deprecated in MeeGo 1.2 SDK. http://qa-reports.meego.com/1.2 shows tested distros (see the SDK column).
* '''Root privileges:''' To install the SDK you will need root privileges.  Commands that require root privileges are prefaced with <code>sudo</code>. For convenience, you may wish to setup <code>sudo</code> capabilities to easily switch between root and normal user privileges (use <code>man sudo</code> in a terminal for more details).
* '''Root privileges:''' To install the SDK you will need root privileges.  Commands that require root privileges are prefaced with <code>sudo</code>. For convenience, you may wish to setup <code>sudo</code> capabilities to easily switch between root and normal user privileges (use <code>man sudo</code> in a terminal for more details).
* '''Commands:''' Terminal commands are prefaced with <code>$</code>. Do not enter $ when entering the commands in your terminal.
* '''Commands:''' Terminal commands are prefaced with <code>$</code>. Do not enter $ when entering the commands in your terminal.
Line 21: Line 19:
The MeeGo SDK installer configures a package repository for your specific Linux distribution and installs SDK packages from it. The main packages installed are Qt Creator (IDE), QEMU (emulator) and MADDE (compilation and runtime environment). For convenience, the package installation process is wrapped inside a graphical installer which will run on any of the supported Linux distributions.
The MeeGo SDK installer configures a package repository for your specific Linux distribution and installs SDK packages from it. The main packages installed are Qt Creator (IDE), QEMU (emulator) and MADDE (compilation and runtime environment). For convenience, the package installation process is wrapped inside a graphical installer which will run on any of the supported Linux distributions.
-
Download the graphical installer from: http://download3.meego.com/MeeGoSDK/Linux/installer/meego-sdk-installer-online-20110429
+
Download the graphical installer from: http://sdk.meego.com/installer/Linux/meego-sdk-installer-online-20110519
-
'''this link is not working yet???'''
+
Run the installer from a terminal:
Run the installer from a terminal:
-
  # ???filename may change
+
   $ chmod +x meego-sdk-installer-online-20110519
-
   $ chmod +x meego-sdk-installer-online-20110429
+
   $ ./meego-sdk-installer-online-201100519 --verbose
-
   $ ./meego-sdk-installer-online-20110429 --verbose
+
(<code>--verbose</code> is optional but can be reassuring and helpful if things seem to have gone wrong or failed)
(<code>--verbose</code> is optional but can be reassuring and helpful if things seem to have gone wrong or failed)
Line 35: Line 31:
# Wait for the installer to retrieve remote data. Then click on ''Next''.
# Wait for the installer to retrieve remote data. Then click on ''Next''.
-
# Browse to the directory where you want to install the SDK. You can type a new directory name in the box and the installer will create it for you. Click ''Next'' again.
+
# Select the components you want to install. Qt Creator is the IDE for MeeGo development; MADDE is a tool for developing against different MeeGo targets, allowing you to cross-compile and run your applications in different environments; Qt Simulator enables you to run applications on simulated devices (handset etc.).
-
# Select the components you want to install. Qt Creator is the IDE for MeeGo development; MADDE is a tool for developing against different MeeGo targets, allowing you to cross-compile and run your applications in different environments.
+
#: The ''SDK targets'' tree enables you to select different SDK targets to download immediately. Be warned that these are large files, so selecting more than one will leave you waiting a long time for the installer to finish. Note that you can add new targets later, so you don't have to select any now.
#: The ''SDK targets'' tree enables you to select different SDK targets to download immediately. Be warned that these are large files, so selecting more than one will leave you waiting a long time for the installer to finish. Note that you can add new targets later, so you don't have to select any now.
#: Once you've selected components to install, click on ''Next''.
#: Once you've selected components to install, click on ''Next''.
# Accept the licence and click ''Next'' again; then click on ''Install'' to start the installer downloading the required components.
# Accept the licence and click ''Next'' again; then click on ''Install'' to start the installer downloading the required components.
-
#: During this process, you will be prompted for a sudo password: enter it and press return.
+
#: During this process, you will be prompted for a sudo password (for system-wide installation of the SDK packages): enter it and press return.
Note that it may appear that nothing is happening for a long period of time. Be patient and it should eventually complete.
Note that it may appear that nothing is happening for a long period of time. Be patient and it should eventually complete.
-
== Install a MeeGo Target ==
+
== MeeGo Targets ==
-
A ''Target'' is used to build programs using the MeeGo toolchain and libraries (sysroot).  It is downloaded as a large (~250MB) .bz2 file using MADDE ([http://wiki.maemo.org/MADDE MeeGo Application Development and Debugging Environment]). <code>mad-admin</code> is the MADDE command-line tool. You can use it to install one or more Targets; once installed, you can switch between them in Qt Creator to compile your application for different environments (described later???link).
+
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 MeeGo SDK maintenance tool. You can use it to install one or more Targets; once installed, you can switch between them in Qt Creator to compile your application for different environments (described [[#Configure Qt Creator to use the MeeGo toolchain(s)|later]]).
-
'''Note that if you selected a target as part of SDK installation, you may not need to do this step. However, if at a later date you want to add, remove or otherwise manage MADDE targets for the SDK, follow the instructions below.'''
+
'''Note that if you selected a target as part of SDK installation, you may not need to do this step. However, if at a later date you want to add, remove or otherwise manage targets for the SDK, follow the instructions below.'''
-
=== Determine the target you want to use ===
+
=== Finding and installing targets ===
-
Run the command below (some sample output is shown):
+
Use the MeeGo SDK Maintenance GUI to find and install targets.
-
<pre>
+
If you're using a graphical desktop, you can locate this in the menu under ''MeeGo SDK 1.2'' > ''Maintain MeeGo SDK''. (The script to run the GUI is located in <code>$HOME/.config/meego.com/sdk/metadata/MeeGoSDKMaintenanceTool.sh</code> if you don't have a menu system.)
-
$ sudo mad-admin list
+
-
Targets:
+
The available targets will be listed in the ''Select Components'' window, under ''SDK Targets''. Expand the tree and select the targets you want to install.
-
meego-core-ia32-1.1                    (installable)
+
-
meego-core-ia32-1.1.2                  (installable)
+
-
meego-core-ia32-trunk                  (installable)
+
-
meego-handset-ia32-1.1.2              (installable)
+
-
meego-handset-ia32-1.1.2-4.7.1        (installable)
+
-
meego-handset-ia32-1.1                (installable)
+
-
# ... more targets not shown here ...
+
-
Runtimes:
+
== MeeGo Runtimes ==
-
meego-handset-ia32-qemu-1.1.20110110.1026-runtime          (installable)
+
-
meego-handset-ia32-qemu-1.1.20110118.1010-runtime          (installable)
+
-
meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime      (installed)
+
-
# ... more runtimes not shown here ...
+
-
</pre>
+
-
The available targets will be listed under the <code>Targets:</code> heading.
+
A ''Runtime'' is a MeeGo OS image which runs under QEMU, for debugging applications on your host system. A runtime is a large (~650MB) .bz2 file which is installed with all targets except '''Minimal''' (this just includes a sysroot and toolchain) and '''Desktop Qt''' (just a toolchain for the host OS).  
-
A hint about the build environment is provided by the target prefix; for example:
+
If you develop against real ia32 hardware running MeeGo, you may only need a Minimal ia32 core target to compile your software for the MeeGo target.
-
* ''meego-core-armv7l'': For ARM handheld devices (such as N900)
+
To install a runtime, you should install its associated target using the MeeGo SDK Maintenance tool: see [[#Finding and installing targets|this section]] for instructions.
-
* ''meego-handset-ia32'':  For x86 handheld devices (such as Aava)
+
-
* ''meego-netbook-ia32'': For x86 netbooks (such as EeePC)
+
-
* ''meego-tablet-ia32'': For x86 tablet devices (such as WeTab)
+
-
=== Create the target ===
+
See [[SDK/Docs/1.2/Using_a_MeeGo_runtime_with_QEMU|this page]] for more information about using a runtime.
-
Run the command below.  Replace <target> with the target you determined in the previous step.  Note that the <code>-f</code> flag instructs MADDE to download the Target tarball (bz2) first.
+
== Configure Qt Creator to use the MeeGo toolchain(s) ==
-
$ sudo mad-admin create -f <target>
+
By default, Qt Creator should be configured to use all the toolchains for the targets you installed. However, if you need to manually add configuration for a new target, follow these steps.
-
If you encounter problems, check the [[MeeGo_SDK_Troubleshooting#General_SDK_Errors|troubleshooting page]].
+
# Start Qt Creator by selecting ''main menu'' > ''MeeGo SDK 1.2'' > ''MeeGo SDK Qt Creator''.
 +
# Go to ''Tools'' > ''Options'' > ''Qt4'' > ''Qt Versions''.
 +
# 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.
 +
# On the ''Version Name'' line, specify a name for the new version.
 +
# On the ''qmake location'' line, specify a qmake location for the new version. The toolchain installs by default to <code>usr/lib/madde/linux-i686/targets/<target>/bin/qmake</code>.
-
=== Verify the target is installed correctly ===
+
The debugging helpers are not built by default, so you may need to build these for any SDK toolchains you install:
-
 
+
-
To check that the target has been installed correctly, run the following.  Replace <target> with the same value used in the previous step.
+
-
 
+
-
<pre>
+
-
# create a skeleton project called qthello, based on the qt-simple template
+
-
$ mad -t <target> pscreate -t qt-simple qthello
+
-
 
+
-
$ cd qthello
+
-
 
+
-
# compile the project
+
-
$ mad -t <target> qmake
+
-
$ mad -t <target> make
+
-
</pre>
+
-
 
+
-
Note: Running qmake will print <code>-unix is deprecated</code>. This is not an error with the compilation and can safely be ignored.
+
-
 
+
-
=== Set a default target (optional) ===
+
-
 
+
-
Once you've installed a target, you can make <code>mad</code> use it as the default (to save you typing <code>-t &lt;target&gt;</code> for every command). Use the following command to set the default:
+
-
 
+
-
$ mad set <target>
+
-
 
+
-
=== Verify the target can build software correctly ===
+
-
 
+
-
To check that the qt-simple application is created for the correct target, run the following command, and verify the output.
+
-
 
+
-
$ file build/qthello
+
-
 
+
-
???how to verify
+
-
 
+
-
== Install a MeeGo Runtime (optional) ==
+
-
 
+
-
A ''Runtime'' is the MeeGo OS image which runs under QEMU, for debugging applications on your host system. A runtime is a large (~650MB) .bz2 file which you download by using MADDE.
+
-
 
+
-
A Runtime is not required if you develop against real hardware running MeeGo. Even if you do require a Runtime, you won't need it until you have finished configuring Qt Creator. However, as this step may take some time, it is recommended that you start it now so it can run in the background while you finish installing the SDK.
+
-
 
+
-
See [[SDK/Docs/1.2/Configuring_QEMU_runtimes|Downloading a Runtime and Using QEMU]]
+
-
 
+
-
== Configure Qt Creator to use the MeeGo toolchain(s) ==
+
-
Start Qt Creator by selecting '''Applications''' > '''Programming''' > '''Qt Creator'''.
+
# Select the Qt Version from the list.
 +
# Click ''Rebuild'', ''Apply'' and ''OK''.
-
Next, configure Qt Creator to use the MeeGo toolchain(s):
+
If this was successful, you should see a green tick next to ''Debugging helpers'', as in the screenshot below:
-
# Go to '''Tools''' > '''Options''' > '''Qt4''' > '''Qt Versions'''.
+
[[File:sdk-1.2-qt-creator-adding-meego-toolchains.png|frame|none|Adding MeeGo toolchain(s) in Qt Creator]]
-
# 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.
+
-
# On the '''Version Name''' line, specify a name for the new version.
+
-
# On the '''qmake location''' line, specify a qmake location for the new version. The toolchain installs by default to <code>usr/lib/madde/linux-i686/targets/<target>/bin/qmake</code>.
+
-
# Click '''Rebuild''', '''Apply''' and '''OK'''.
+
-
[[File:Qt Creator adding MeeGo toolchains.png|frame|none|Adding the MeeGo toolchain(s) in Qt Creator]]
+
Note: If you have a version of Qt on your system already, you may get a ''Qt in Path'' entry in the list of Qt versions. You can use this to compile software for your desktop machine, but you shouldn't use it to compile software for MeeGo.
=== Using the MeeGo SDK Qt version ===
=== Using the MeeGo SDK Qt version ===
Line 158: Line 99:
== Developing with the SDK ==
== Developing with the SDK ==
-
To start developing with the MeeGo SDK, the [[SDK/Docs/1.2/Creating_Hello_World|hello world tutorial]] is a good first step. 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).
+
To start developing with the MeeGo SDK, the [[SDK/Docs/1.2/Creating_Hello_World|hello world tutorial]] is a good first step. This tutorial covers how to start a project, package it, and deploy it to a device (either a real device, or a QEMU runtime).

Latest revision as of 13:40, 24 May 2011


This page describes how to install and configure the MeeGo 1.2 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 should have support for Virtualization Technology (VT). Without this, performance is likely to be very poor. See the Graphics Acceleration page for details.
  • Software: The MeeGo 1.2 SDK has been validated on 32-bit versions of Fedora 13, Fedora 14, Ubuntu 10.04 LTS, and Ubuntu 10.10. Note that support for Fedora 12 and Ubuntu 9.10 has been deprecated in MeeGo 1.2 SDK. http://qa-reports.meego.com/1.2 shows tested distros (see the SDK column).
  • Root privileges: To install the SDK you will need 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 (use man sudo in a terminal for more details).
  • Commands: Terminal commands are prefaced with $. Do not enter $ when entering the commands in your terminal.

Install the MeeGo SDK

The MeeGo SDK installer configures a package repository for your specific Linux distribution and installs SDK packages from it. The main packages installed are Qt Creator (IDE), QEMU (emulator) and MADDE (compilation and runtime environment). For convenience, the package installation process is wrapped inside a graphical installer which will run on any of the supported Linux distributions.

Download the graphical installer from: http://sdk.meego.com/installer/Linux/meego-sdk-installer-online-20110519

Run the installer from a terminal:

 $ chmod +x meego-sdk-installer-online-20110519
 $ ./meego-sdk-installer-online-201100519 --verbose

(--verbose is optional but can be reassuring and helpful if things seem to have gone wrong or failed)

Follow the graphical installer prompts to install the SDK:

  1. Wait for the installer to retrieve remote data. Then click on Next.
  2. Select the components you want to install. Qt Creator is the IDE for MeeGo development; MADDE is a tool for developing against different MeeGo targets, allowing you to cross-compile and run your applications in different environments; Qt Simulator enables you to run applications on simulated devices (handset etc.).
    The SDK targets tree enables you to select different SDK targets to download immediately. Be warned that these are large files, so selecting more than one will leave you waiting a long time for the installer to finish. Note that you can add new targets later, so you don't have to select any now.
    Once you've selected components to install, click on Next.
  3. Accept the licence and click Next again; then click on Install to start the installer downloading the required components.
    During this process, you will be prompted for a sudo password (for system-wide installation of the SDK packages): enter it and press return.

Note that it may appear that nothing is happening for a long period of time. Be patient and it should eventually complete.

MeeGo Targets

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 MeeGo SDK maintenance tool. You can use it to install one or more Targets; once installed, you can switch between them in Qt Creator to compile your application for different environments (described later).

Note that if you selected a target as part of SDK installation, you may not need to do this step. However, if at a later date you want to add, remove or otherwise manage targets for the SDK, follow the instructions below.

Finding and installing targets

Use the MeeGo SDK Maintenance GUI to find and install targets.

If you're using a graphical desktop, you can locate this in the menu under MeeGo SDK 1.2 > Maintain MeeGo SDK. (The script to run the GUI is located in $HOME/.config/meego.com/sdk/metadata/MeeGoSDKMaintenanceTool.sh if you don't have a menu system.)

The available targets will be listed in the Select Components window, under SDK Targets. Expand the tree and select the targets you want to install.

MeeGo Runtimes

A Runtime is a MeeGo OS image which runs under QEMU, for debugging applications on your host system. A runtime is a large (~650MB) .bz2 file which is installed with all targets except Minimal (this just includes a sysroot and toolchain) and Desktop Qt (just a toolchain for the host OS).

If you develop against real ia32 hardware running MeeGo, you may only need a Minimal ia32 core target to compile your software for the MeeGo target.

To install a runtime, you should install its associated target using the MeeGo SDK Maintenance tool: see this section for instructions.

See this page for more information about using a runtime.

Configure Qt Creator to use the MeeGo toolchain(s)

By default, Qt Creator should be configured to use all the toolchains for the targets you installed. However, if you need to manually add configuration for a new target, follow these steps.

  1. Start Qt Creator by selecting main menu > MeeGo SDK 1.2 > MeeGo SDK Qt Creator.
  2. Go to Tools > Options > Qt4 > Qt Versions.
  3. 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.
  4. On the Version Name line, specify a name for the new version.
  5. 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.

The debugging helpers are not built by default, so you may need to build these for any SDK toolchains you install:

  1. Select the Qt Version from the list.
  2. Click Rebuild, Apply and OK.

If this was successful, you should see a green tick next to Debugging helpers, as in the screenshot below:

Adding MeeGo toolchain(s) in Qt Creator

Note: If you have a version of Qt on your system already, you may get a Qt in Path entry in the list of Qt versions. You can use this to compile software for your desktop machine, but you shouldn't use it to compile software for MeeGo.

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

Note: On Ubuntu 10.10, you may need to install g++ in order for this step to work. If necessary, do this:

$ sudo apt-get install g++

Developing with the SDK

To start developing with the MeeGo SDK, the hello world tutorial is a good first step. This tutorial covers how to start a project, package it, and deploy it to a device (either a real device, or a QEMU runtime).

Personal tools