Qt:Документация 4.3.2/qtopiacore-install

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] Установка Qtopia Core

This document describes how to install Qtopia Core in your development environment:

Please see the cross compiling and deployment documentation for details on how to install Qtopia Core on your target device.

Note also that this installation procedure is written for Linux, and that it may need to be modified for other platforms.

[править] Step 1: Installing the License File (commercial editions only)

If you have the commercial edition of Qtopia Core, the first step is to install your license file as $HOME/.qt-license.

Для open source версии вы не нуждаетесь в файле лицензии.

[править] Step 2: Unpacking the Archive

First uncompress the archive in the preferred location, then unpack it:

 cd <anywhere>
 gunzip qtopia-core-commercial-src-4.3.2.tar.gz
 tar xf qtopia-core-commercial-src-4.3.2.tar

This document assumes that the archive is unpacked in the following directory:

 ~/qtopia-core-commercial-src-4.3.2

[править] Step 3: Building the Library

Before building the Qtopia Core library, run the ./configure script to configure the library for your development architecture. You can list all of the configuration system's options by typing ./configure -help.

Note that by default, Qtopia Core is configured for installation in the /usr/local/Trolltech/QtopiaCore-4.3.2 directory, but this can be changed by using the -prefix option. Alternatively, the -prefix-install option can be used to specify a "local" installation within the source directory.

The configuration system is also designed to allow you to specify your platform architecture:

 cd  ~/qtopia-core-commercial-src-4.3.2
 ./configure -embedded [architecture]

In general, all Linux systems which have framebuffer support can use the generic architecture. Other typical architectures are x86, arm and mips.

Чтобы создать библиотеку и скомпилировать все демонстрации, примеры, инструменты и учебные пособия, напишите:

 make

On some systems the make utility is named differently, e.g. gmake. The configure script tells you which make utility to use.

If you did not configure Qtopia Core using the -prefix-install option, you need to install the library, demos, examples, tools, and tutorials in the appropriate place. Чтобы сделать это, напишите:

 su -c "make install"

и введите пароль root'а.

Note: You can use the INSTALL_ROOT environment variable to specify the location of the installed files when invoking make install.

[править] Step 4: Adjusting the Environment Variables

In order to use Qtopia Core, the PATH variable must be extended to locate qmake, moc and other Qtopia Core tools, and the LD_LIBRARY_PATH must be extended for compilers that do not support rpath.

To set the PATH variable, add the following lines to your .profile file if your shell is bash, ksh, zsh or sh:

  PATH=/usr/local/Trolltech/QtopiaCore-4.3.2/bin:$PATH
  export PATH

In case your shell is csh or tcsh, add the following line to the .login file instead:

  setenv PATH /usr/local/Trolltech/QtopiaCore-4.3.2/bin:$PATH

Если вы используете другой командный интерпретатор, измените ваши переменные окружения соответственно.

For compilers that do not support rpath you must also extend the LD_LIBRARY_PATH environment variable to include /usr/local/Trolltech/QtopiaCore-4.3.2/lib. Note that on Linux with GCC, this step is not needed.

[править] Step 5: Enabling Framebuffer Support

For development and debugging, Qtopia Core provides a virtual framebuffer as well as the option of running Qtopia Core as a VNC server. For a description of how to install the virtual framebuffer and how to use the VNC protocol, please consult the documentation at:

Note that the virtual framebuffer requires a Qt/X11 installation. See Installing Qt/X11 for details.

The Linux framebuffer, on the other hand, is enabled by default on all modern Linux distributions. For information on older versions, see http://en.tldp.org/HOWTO/Framebuffer-HOWTO.html. To test that the Linux framebuffer is set up correctly, use the program provided by the Testing the Linux Framebuffer document.

Вот и всё. Qtopia Core is now installed.


Customizing the Qtopia Core Library

When building embedded applications on low-powered devices, reducing the memory and CPU requirements is important.

A number of options tuning the library's performance are available. But the most direct way of saving resources is to fine-tune the set of Qt features that is compiled. It is also possible to make use of accelerated graphics hardware.



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2