(→Set a default target (optional)) |
(→Install a MeeGo Runtime (optional)) |
||
| Line 137: | Line 137: | ||
== Install a MeeGo Runtime (optional) == | == 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 | + | 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 with 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. | 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. | ||
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
Contents |
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).
$. Do not enter $ when entering the commands in your terminal.
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 this link is not working yet???
Run the installer from a terminal:
# ???filename may change $ chmod +x meego-sdk-installer-online-20110429 $ ./meego-sdk-installer-online-20110429 --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:
Note that it may appear that nothing is happening for a long period of time. Be patient and it should eventually complete.
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 (MeeGo Application Development and Debugging Environment). mad-admin 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).
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.
Run the command below (some sample output is shown):
$ sudo mad-admin list Targets: 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-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 ...
The available targets will be listed under the Targets: heading.
A hint about the build environment is provided by the target prefix; for example:
Run the command below. Replace <target> with the target you determined in the previous step. 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.
To check that the target has been installed correctly, run the following. Replace <target> with the same value used in the previous step.
# 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
Note: Running qmake will print -unix is deprecated. This is not an error with the compilation and can safely be ignored.
Once you've installed a target, you can make mad use it as the default. This means you can omit the -t <target> from a command, if you want to use the default target.
Use the following command to set the default:
$ mad set <target>
To check that the qthello binary is created for the correct target, run the following command, and verify the output.
$ file build/qthello
For example, the output for an x86 binary (on Fedora 13) looks like this:
build/qthello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), \ dynamically linked (uses shared libs), for GNU/Linux 2.6.25, not stripped
And for an ARM binary (on Fedora 13), it looks like this:
build/qthello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), \ dynamically linked (uses shared libs), for GNU/Linux 2.6.25, not stripped
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 with 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 Downloading a Runtime and Using QEMU
Start Qt Creator by selecting Applications > Programming > Qt Creator.
Next, configure Qt Creator to use the MeeGo toolchain(s):
usr/lib/madde/linux-i686/targets/<target>/bin/qmake.
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++
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 set up through MADDE).