Meego Wiki
Views

SDK/Docs/1.2/MeeGo SDK 1.2 Preview

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
Line 5: Line 5:
This tutorial describes how to use the MeeGo SDK 1.2 Preview.  It contains support for the recently released tablet images.
This tutorial describes how to use the MeeGo SDK 1.2 Preview.  It contains support for the recently released tablet images.
-
== Overview ==
+
=== Overview ===
The MeeGo SDK 1.2 is scheduled for release near the end of May.  This release if provided as an early preview of the upcoming features, with more in development.  The following updates have been since the MeeGo 1.1 SDK release:
The MeeGo SDK 1.2 is scheduled for release near the end of May.  This release if provided as an early preview of the upcoming features, with more in development.  The following updates have been since the MeeGo 1.1 SDK release:
Line 17: Line 17:
* UI Guidelines for tablet released
* UI Guidelines for tablet released
 +
The following related SDK documentation is useful for getting familiar with the application development lifecycle:
 +
* [http://meego.com/developers/meego-application-development-cycle MeeGo Developer Story]
 +
* [http://apidocs.meego.com/1.1/core/html/index.html MeeGo API], [http://apidocs.meego.com/1.1/platform/html/index.html Platform API]
 +
* [http://wiki.meego.com/SDK/Docs/1.1/Creating_Hello_World Qt Development: Creating Hello World]
 +
Additional applicable, up-to-date, generic MeeGo development information can be found at:
 +
* http://meego.com/developers
 +
* http://wiki.meego.com/SDK/Docs/1.1
-
== Prerequisites ==
+
=== Prerequisites ===
* '''Hardware:''' Any reasonably modern IA hardware, such as 32-bit Intel Core CPU.
* '''Hardware:''' Any reasonably modern IA hardware, such as 32-bit Intel Core CPU.

Revision as of 04:08, 30 March 2011

This page under construction at this moment. Contact Bob if you have questions. ETA: 9pm PDT

Contents

MeeGo SDK 1.2 Preview (with Tablet)

This tutorial describes how to use the MeeGo SDK 1.2 Preview. It contains support for the recently released tablet images.

Overview

The MeeGo SDK 1.2 is scheduled for release near the end of May. This release if provided as an early preview of the upcoming features, with more in development. The following updates have been since the MeeGo 1.1 SDK release:

  • Qt version 4.7.2
  • Qt Creator 2.1.0
  • Support for tablet images, toolchain and QEMU image.
  • Additional Tablet APIs and supporting libraries
  • Graphical installer for Linux
  • MeeGo UX Components (documentation TBD)
  • UI Guidelines for tablet released

The following related SDK documentation is useful for getting familiar with the application development lifecycle:

Additional applicable, up-to-date, generic MeeGo development information can be found at:

Prerequisites

  • Hardware: Any reasonably modern IA hardware, such as 32-bit Intel Core CPU.
    • The SDK version of QEMU relies on kqemu to provide CPU virtualization support, but on some machines do not run well. This is believed to be related to certain types of CPU. Below are some details of tested hardware. For those in "known not to work", one trick could be tried (in item 10 of troubleshooting) which could solve quite some such issues.
    • Known to work: Intel Core 2 Quad CPU, Q8200; Intel i5 and i7 (nehalem) ...
    • Known not to work: Intel Core 2 Duo P9400 in Thinkpad T400; Intel Core 2 Q9400 in HP7900 Ultra-slim; Intel i5 (sandibridge) ...
  • Software: Only Windows XP 32-bit and Windows 7 32-bit are officially supported.
    Currently the QEMU emulator is preferred to run on 32-bit Windows and the QEMU graphic acceleration was only tested with nvidia graphical card. If you are using 64-bit Windows, kqemu is not available and performance will be very poor.
  • 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-tablet-ux-ia32-1.1.90.2.20110209.4
    • Runtimes:
      • meego-tablet-ia32-sdk-1.1.90.2.20110209.4-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.

Download and setup the MeeGo SDK

  1. Download the MeeGo SDK installer:
  2. FileDescriptionSize
    http://apollo.jf.intel.com/tablet/sdk/installer/meego-sdk-1.2-preview-installer-full-tablet.exe MeeGo SDK Windows installer 1.5G
  3. Double-click on the downloaded .exe file and follow the prompts to install the SDK.
  4. 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.
  5. Launch Qt Creator with Start > All Programs > MeeGo SDK > QtCreator.
  6. Develop MeeGo Applications

    1. Create a MeeGo touch project (for handset) or Qt Gui project (for netbook)
    2. Go to the menu: File -> New File or Project -> Qt Application Project -> Meego Touch Framework Application.
      Windows sdk 2.png

      In "Project setup" dialog, choose "meego-tablet".

      Project setup.PNG

    3. Disable shadow build
    4. "Shadow build” should be disabled before build an app. To do that, select “Projects” button in the left side of Qt Creator, and uncheck “Shadow build” in “Build Settings”.

    Run an app within the QEMU Emulator

    1. Set up emulator: Install kqemu accelerator for QEMU on 32-bit Windows system
    2. Notice: The kqemu could only be used on 32-bit Windows. 64-bit Windows could not work with kqemu. You can not use emulator on 64-bit Windows. Use real device instead.

      Download package from http://wiki.qemu.org/download/kqemu-1.4.0pre1.tar.gz

      Get the kqemu.inf and kqemu.sys files from above package

      For Windows XP system, right click the kqemu.inf file and select "install".

      For Windows 7 or Windows Vista system, edit the kqemu.inf file to do below changes, and then right click the kqemu.inf, select "install".

        [DefaultInstall.NT] --> [DefaultInstall]
        [DefaultInstall.NT.Services] --> [DefaultInstall.Services]
        [Uninstall.NT] --> [Uninstall]
        [Uninstall.NT.Services] --> [Uninstall.Services]
      

      Start the kqemu manually. Select Start > All Programs > Accessories, click right mouse button over Command Prompt, and select "Run as administrator". In Command Prompt, run the following command:

      net start kqemu
      

      You need to start kqemu again after you reboot the system.


    3. Configuration for a MeeGo Emulator device

    4. Get to the menu: Tools > Options > Projects > MeeGo Device Configurations. Click "Add" button to add a runtime for emulator. Set "Device type" to "MeeGo emulator"; set "Authentication type" to "Password"; set "Username" to "root"; set "Password" to "meego".
      Meego-sdk-emulator.png

    5. Set Run Configuration
    6. Click "Projects" again on the left side. Select "Run" in the MeeGo Build/Run box at the top. Make sure that the "Device configuration" is set to "MeeGo Emulator". This will ensure that QEMU is started when you run your application. You can now launch the QEMU MeeGo emulator. Click the "Start Meego emulator" icon near the bottom left corner of Qt Creator (circled in red in the screenshot below).
      Meego-sdk-run-settings.png

      Note: You can also start the Qemu from MADDE terminal. For that you need to go to Start > Programs > MeeGoSDK > MADDE Terminal. In the terminal type:

      mad list
      

      to see the runtime and target names, and then type:

      mad remote -r <runtime> poweron
      
    7. Build, run and deploy the application
    8. After QEMU starts, click the "Run" icon to run your application. Qt Creator will package and deploy your application to QEMU and start it on the target. You can see the window of your application in QEMU.
      Qemu-handset.png


    9. Debug the application
    10. You can also debug the application by clicking the "Debug" icon. Setting breakpoints and stepping are the same as local applications.
      Qtcreator-qemu.PNG

    More about QEMU Emulator


    How to SSH into QEMU Image

    Anytime MeeGo is running in QEMU, you can use SSH to connect to the image from another terminal on the host system.

    1. Launch QEMU with MeeGo image
    2. From a terminal on the host, connect to the running image
    3. $ ssh meego@127.0.0.1 -p 6666
      

    Two user accounts are available in the MeeGo images:
    User: meego     Password: meego
    User: root         Password: meego

    If user failed to connect to MeeGo image through ssh, please refer to item 9 of trouble shooting to check the sshd daemon in client.


    The performance of QEMU emulator

    Two factors impacts the emulator's performance most:

    1. CPU virtualization. kvm is utilized on Linux whereas kqemu is utilized on Windows
    2. Graphic acceleration.

    The kqemu module requires the host windows system to be 32-bit; the graphic acceleration requires the host to have powerful hardware graphic acceleration. The best performance could be achieved if both factors run well. If neither of above is available, the emulator will be extremely slow.
    Suppose that the graphic card on host is not tha powerful, one way to improve UI performance is to alter the UI program not to use opengl. Below are the steps:

    $ ssh meego@127.0.0.1 -p 6666
    $ su
    $ vi /etc/xdg/autostart/meego-ux-daemon.desktop #remove the "--opengl" option
    $ exit
    

    Run an app within a real device

    1. Go to Tools > Options > Projects > MeeGo Device Configurations and click "Add" button. Select "Remote Device" for "Device type", input other information and give a name for this configuration
    2. Real-device.png

    3. Open your project and in the "Projects" mode, click "Run" in the little MeeGo target window, and select the configuration you just created in "Device Configuration"
    4. Meego-sdk-run-settings-real-device.png

    5. Launch terminal inside the device, and run command "xhost +" in it.
    6. Click "Run" or "Debug" on the lower left corner of Qt Creator to run or debug your application on the configured Device.
    • Note: If the image of an earlier version prior to 1.2 is used, the mad-developer should be installed on device manually before the application is deployed. The following two approaches are alternatives.

    Build an app for Qt Simulator, and run it with Qt Simulator

    Untitled2.png

    Add Qt Simulator target

    • Launch Qt Creator
    • Go to Tools > Options > Qt4 > Qt Versions
    • Click the "+" to add a new "Qt Version"
    • In "Version name", provide a name.
    • In "qmake locations:", browse and select qmake location: <MEEGO_SDK>\Simulator\Qt\bin\qmake.exe. Replace <MEEGO_SDK> with the directory where you installed MeeGo SDK; the default is C:\MeeGoSDK_1.2.
    • In "Toolchain:", browse and select "Microsoft Visual C++ Compilers 9.0 (x86)" if you installed "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1", or select "Microsoft Visual C++ Compilers 8.0 (x86)" if you installed "Microsoft Visio C++ 2008 Express Edition".
    • Build
    • To use the simulator, please refer to http://doc.qt.nokia.com/qtsimulator-1.1/simulator-starting.html for more information. If the simulator cannot be load automatically from Qt Creator, you can launch it once manually by double clicking the icon of "<MEEGO_SDK>\Simulator\Application\simulator.exe" in Explorer.

    Install Debugging Tools for Windows

    You need to install Debugging Tools for Windows for debugging apps with simulator.

    • Launch Qt Creator
    • Select Tools > Option > Debugger > Cdb, check 'CDB'
    • Click the hyperlink of "Debugging Tools for Windows"

    Qt-creator-option-debugger-cdb.png

    Web-page-download-debugging-tools.png

    • If the CDB path had not been configured preperly, click 'Auto Detect' button to set it manually.

    Known issues and workarounds

    Please refer to SDK/Docs/1.1/Troubleshooting.
Personal tools