Qt/Embedded

From ArmadeusWiki
Revision as of 21:52, 19 November 2006 by Carbure (Talk | contribs)

Jump to: navigation, search

Instructions to install and use QtEmbedded & Qt virtual frame buffer for Armadeus

Introduction

This page will summarize the process to build, install and use Qtopia.

You will also find instructions to setup a Host development environment for simulating applications before deploying them on the target(Qt virtual frame buffer). The builroot tree must be installed before the installation of Qt.

Getting the packages

You must get the packages qtopia-core-opensource-src-4.2.0.tar.gz & qt-x11-opensource-src-4.2.0.tar.gz from the ftp server of the trolltech company as anonymous user (no password)

# ftp ftp.trolltech.com
# Name (ftp.trolltech.com:user): anonymous
# cd /qt/source
# get qtopia-core-opensource-src-4.2.0.tar.gz
# get qt-x11-opensource-src-4.2.0.tar.gz
# quit

or use the wget command:

# wget --user=anonymous ftp.trolltech.com:/qt/source/qtopia-core-opensource-src-4.2.0.tar.gz
# wget --user=anonymous ftp.trolltech.com:/qt/source/qt-x11-opensource-src-4.2.0.tar.gz

Installation

From now, we consider the variable ARMADEUS_ROOT_DIR as the root directory of the Armadeus SVN snapshot on your computer.

Copy and untar the downloaded packages into an installation folder called qt_installs:

# cd $ARMADEUS_ROOT_DIR
# mkdir qt_installs
# mv $DOWNLOAD_FOLDER/qtopia-core-opensource-src-4.2.0.tar.gz   \ 
   $DOWNLOAD_FOLDER/qt-x11-opensource-src-4.2.0.tar.gz $ARMADEUS_ROOT_DIR/qt_installs
# tar fxz qtopia-core-opensource-src-4.2.0.tar.gz
# tar fxz qt-x11-opensource-src-4.2.0.tar.gz




Usage

by default Qt is installed in /usr/lib/ directory of your target rootfs before launching Qt on the target, you should set following env variables to the right value: QTDIR, LD_LIBRARY_PATH, etc... You can do it automatically by sourcing the /etc/set_qt_env.sh script if you have modified it during installation.

# . /etc/set_qt_env.sh

Test the beast: Compile hello example (!! tricky) and copy it to your rootfs Launch it:

# /usr/bin/hello -qws

Qvfb

Qvfb (Qt Virtual Framebuffer) is a framebuffer emulator for your host/devt system. With it you can simulate your target and run your Qt/E programs on your PC before deploying them to your Armadeus board. To use it: - copy software/buildroot/package/qte_gpl/set_qt_env.sh script to yur home directory and edit it to have the right QTDIR path (for example: software/buildroot/build_arm_nofpu/qt_gpl/qt-2.3.10-x86/ ) - source it:

# source /home/julien/set_qt_env.sh

- go in software/buildroot/build_arm_nofpu/qt_gpl/qt-2.3.10-x86/ and launch Qvfb:

# qvfb -width 240 -height 320 &

- then go in examples and launch the program you want to test

# cd examples/hello/
# make
# ./hello -qws

Working examples with current configuration (Opie) are: buttongroups, cursor, customlayout, drawlines, forever, layout, life, lineedits, listbox, listcombobox, menu, popup, rot13, tetris, tictac

Cool ! no ? ;-)

Qtopia

! Not tested/supported yet ! Go here: [[1]] and ask for a free licence

Work in progress / to do list

  • Customisation of src/tools/config-qpe.h to have a custom Qt/E library well designed for Armadeus usage (currently we are using Opie's config
  • Creating support for a new device for compilation customization, cf qt-2.3.10/doc/html/install-qws.html (currenlty arm examples are not compiling automatically)

Links