Meego Wiki
Views

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

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(Configuring Qt Creator to use the MeeGo toolchain(s))
m (Configuring Qt Creator to use the MeeGo target(s))
Line 164: Line 164:
<li>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.</li>
<li>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.</li>
<li>On the ''Version Name'' line, specify a name for the new version (e.g. '''MeeGo netbook''').</li>
<li>On the ''Version Name'' line, specify a name for the new version (e.g. '''MeeGo netbook''').</li>
-
<li>On the ''qmake location'' line, select a qmake location for the new versionby browsing to a <code>qmake</code> binaries for one of your installed targets. The full path will look something like:
+
<li>On the ''qmake location'' line, select a qmake location for the new version by browsing to a <code>qmake</code> binaries for one of your installed targets. The full path will look something like:
<pre>
<pre>
C:\&lt;MeeGo SDK install directory&gt;\MADDE\targets\&lt;target name&gt;\bin\qmake.exe
C:\&lt;MeeGo SDK install directory&gt;\MADDE\targets\&lt;target name&gt;\bin\qmake.exe

Revision as of 08:36, 16 December 2010


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

Contents

Prerequisites

  • Hardware: Any reasonably modern IA hardware, such as 32-bit Intel Atom or Intel Core 2 CPU.
    • The SDK version of QEMU relies on kqemu to provide CPU virtualization support, but on some machines with this support, images will still not run. This is believed to be related to certain types of CPU. Below are some details of tested hardware:
    • Known to work: Intel(R) Core(TM) 2 Quad CPU, Q8200; Intel(R) i5 and i7
    • Known not to work: Intel(R) Core(TM) 2 Duo P9400 in Thinkpad T400; Intel(R) Core(TM)2 Q9400 in HP7900 Ultra-slim
  • Software: Only Windows XP 32-bit and Windows 7 32-bit are officially supported.
    Currently the QEMU emulator only works for IA targets on 32-bit Windows. If you are using 64-bit Windows, QEMU is not available.
    For support status and issues using other host operating systems, see this page.
  • Filesystem: MeeGo SDK should be installed on a hardlink-capable filesystem such as NTFS. FAT* filesystems are not hardlink-capable and not supported.

Notes and caveats

  • QEMU runtimes and targets: The following pre-defined targets and runtimes are the only ones which have been verified on Windows:
    • Targets:
      • meego-handset-ia32-w32-1.1
      • meego-netbook-ia32-w32-1.1
      • meego-core-armv7l-1.1
    • Runtimes:
      • meego-handset-ia32-w32-qemu-1.1.20101031.2201-sda-runtime
      • meego-netbook-ia32-w32-qemu-1.1.20101031.2037-sda-runtime
    Others may be listed by MADDE, but are not guaranteed to work.
  • Uninstalling: Everything you've installed as part of the SDK, including MADDE targets and runtimes, will be removed if you run the MeeGo SDK uninstaller.
  • Commands: Terminal commands in the instructions below are prefaced with "$". Do not include $ when entering the commands in your terminal.

Install the MeeGo SDK

The SDK consists of a single downloadable file which you use to install Qt Creator and MADDE on your development machine. Toolchains and runtimes for MADDE (see later) are optional and installed using MADDE (via the command-line tool mad-admin).

  1. Download the MeeGo SDK installer. You can choose either offline or online installer:
    FileSize
    MeeGo SDK Windows online installer 13.8MB
    MeeGo SDK Windows offline installer 55.7MB
  2. Double-click on the downloaded .exe file and follow the prompts to install the SDK.
  3. If you are using Windows XP, please download a small file vcredist_x86.exe (Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)) from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2 and install it to your system. This is not needed for Windows 7.

Once you have these components installed, you need to optionally install MADDE runtimes and targets, as described in the following sections.

Install the QEMU Accelerator

"QEMU Accelerator (KQEMU) is a driver allowing the QEMU PC emulator to run much faster when emulating a PC on an x86 host" (from http://wiki.qemu.org/KQemu/Doc).

The QEMU Accelerator can only be used on 32-bit Windows; it does not work with 64-bit Windows. If you have 64-bit Windows, you need to use a real MeeGo device instead of an emulated one.

Install the QEMU Accelerator as follows:

  1. Download the source tarball from http://wiki.qemu.org/download/kqemu-1.4.0pre1.tar.gz
  2. Unpack the tarball, using a tool like WinZip or 7zip.
  3. If you are using a Windows 7 or Windows Vista system, edit the kqemu.inf file in the unpacked directory. Modify the lines as follows:
    [DefaultInstall.NT] should be changed to [DefaultInstall]
    [DefaultInstall.NT.Services] should be changed to [DefaultInstall.Services]
    [Uninstall.NT] should be changed to [Uninstall]
    [Uninstall.NT.Services] should be changed to [Uninstall.Services]
    
  4. Right click the kqemu.inf file and select Install.

You must start kqemu manually, and will need to do this each time you reboot:

  1. Select Start > All Programs > Accessories.
  2. If you have adminstrator privileges on the machine, select Command Prompt.
    If you don't have administrator privileges, you will need to run the command prompt as an administrator:
    1. Right click on Command Prompt and select Run as....
    2. Click on the radio button next to The following user and enter the credentials of an adminstrator.
  3. Once the command prompt is open, run the following command:
    net start kqemu
    

Install MeeGo target(s)

A target is used to build programs using a MeeGo toolchain and libraries (sysroot). They are downloaded as a large (~250MB) .bz2 file and a large (~50MB) .gz file using the commands below. MADDE (MeeGo Application Develop and Debug Environment (background)) is a tool that assists in the download and installation of targets. You can install multiple targets and switch easily between them in Qt Creator.

First start the MADDE Terminal from Start menu > All Programs > MeeGo SDK > MADDE Terminal.

If you are in an intranet which requires a proxy, you may need to run the following command in the MADDE Terminal before you can download any targets or runtimes:

$ export http_proxy=10.0.5.1

replacing 10.0.5.1 with the IP address or host name of your proxy.

Then follow these steps to create and test a MADDE target for MeeGo.

  1. Create the target by running 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-w32-1.1: Build applications for x86 handheld devices (such as Aava)
    • meego-netbook-ia32-w32-1.1: Build applications for x86 netbooks.

    Note that the -f flag instructs MADDE to download the toolchain tar ball (gz) and sysroot tar ball (bz2) first.

    $ mad-admin create -f <target> 

    If you encounter problems, check the SDK troubleshooting page

  2. To check that the target has been installed correctly, run the following, replacing <target> with one of the values described in the previous step:
    $ mad -t <target> pscreate -t qt-simple qttest
    $ cd qttest
    $ 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/qttest

    If you compiled with an IA32 toolchain, you should see something like this:

    build/qttest: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), for GNU/Linux 2.6.25, 
    dynamically linked (uses shared libs), for GNU/Linux 2.6.25, not stripped
    

    While compiling with an ARM toolchain should yield something like:

    build/qttest: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.25,
    dynamically linked (uses shared libs), for GNU/Linux 2.6.25, not stripped
    

Install MeeGo runtime(s)

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

The verified MADDE targets available on Windows are:

  • meego-handset-ia32-w32-qemu-1.1.20101031.2201-sda-runtime (corresponding to the meego-handset-ia32-w32-1.1 target)
  • meego-netbook-ia32-w32-qemu-1.1.20101031.2037-sda-runtime (corresponding to the meego-netbook-ia32-w32-1.1 target)

MADDE may list other targets, but they are not guaranteed to work.

See Configuring QEMU runtimes for further instructions.

Configuring Qt Creator to use the MeeGo target(s)

Launch Qt Creator with Start > All Programs > MeeGo SDK > QtCreator.

Configure Qt Creator to use the MeeGo target(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 (e.g. MeeGo netbook).
  4. On the qmake location line, select a qmake location for the new version by browsing to a qmake binaries for one of your installed targets. The full path will look something like:
    C:\<MeeGo SDK install directory>\MADDE\targets\<target name>\bin\qmake.exe
    
    where <MeeGo SDK install directory> is the path to the MeeGo SDK directory (default is C:\MeeGoSDK_1.1), and <target> is the name of one of the installed targets (for example, meego-netbook-ia32-w32-1.1).
  5. Once added, select the new entry and click on the Rebuild button (bottom right) to build the debugging helper for this Qt version. This enables you to use debugging from Qt Creator.
  6. Click OK.

The resulting configuration should look something like this:

Meego-sdk-qt-creator-configuring-toolchain.PNG

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

This will remove all SDK components, including any MADDE runtimes and targets you may have installed.

To uninstall the SDK:

  • Browse to the MeeGo SDK installation folder (default is C:\MeeGoSDK_1.1).
  • Double-click on the uninstall.exe file.
  • In the dialog box, select Remove all components and click Next.
  • Click Uninstall to remove the SDK.
Personal tools