lanxinyuchs 发表于 2013-1-17 02:51:40

移植综述

其官方文档可在QT的help中用“QT for”搜索得到,主要包括font,plugin,lib,environment varibles,具体步骤为
 


Step 1: Set the Cross-Compiler's Path
For example,  export PATH=path/to/cross/compiler:$PATH

 

<span class="Apple-style-span" style=""><span class="Apple-style-span" style="line-height: 15px; font-family: Verdana; font-size: 22px;">Step 2: Create a Target Specific qmake Specification

The qmake tool requires a platform and compiler specific qmake.conf file describing the various default values, to generate the appropriate Makefiles. The standard Qt for Embedded Linux distribution provides such files for several combinations of platforms and compilers. These files are located in the distribution's mkspecs/qws subdirectory.
Each platform has a default specification. Qt for Embedded Linux will use the default specification for the current platform unless told otherwise. To override this behavior, you can use the configure script's -platform option to change the specification for the host platform (where compilation will take place).
The configure script's -xplatform option is used to provide a specification for the target architecture (where the library will be deployed).
For example, to cross-compile an application to run on a device with an ARM architecture, using the GCC toolchain, run the configure script at the command line in the following way:
 ./configure -embedded arm -xplatform qws/linux-arm-g++ <other options>
 

<span class="Apple-style-span" style=""><span class="Apple-style-span" style="line-height: 15px; font-family: Verdana; font-size: 22px;">Step 3: Provide Architecture Specific Files

To support a new architecture, it is important to ensure that these platform-specific atomic operations are implemented in a corresponding header file (qatomic_ARCH.h), and that this file is located in Qt'ssrc/corelib/arch directory. For example, the Intel 80386 implementation is located in src/corelib/arch/qatomic_i386.h. 
Step 4: Provide Hardware Drivers

custom drivers can be added by deriving from theQWSMouseHandler, QWSKeyboardHandler and QScreen classes respectively, and by creating corresponding plugins to make use of Qt's plugin mechanism (dynamically loading the drivers into the server application at runtime). Note that the plugins must be located in a location where Qt will look for plugins, e.g.,
<span class="Apple-style-span" style=""><span class="Apple-style-span" style="line-height: 34px; font-family: Verdana; color: #363534; font-size: 22px;"><span class="Apple-style-span" style=""><span class="Apple-style-span" style="line-height: 34px; font-family: Verdana; color: #363534; font-size: 22px;"><span class="Apple-style-span" style=""><span class="Apple-style-span" style="line-height: 34px; font-family: Verdana; color: #363534; font-size: 22px;"><span class="Apple-style-span" style="">the standard plugin directory.<span class="Apple-style-span" style="">Step 5: Build the Target Specific Executable

<span class="Apple-style-span" style=""><span class="Apple-style-span" style="line-height: 34px; font-family: Verdana; color: #363534; font-size: 22px;"><span class="Apple-style-span" style=""><span class="Apple-style-span" style="line-height: 34px; font-family: Verdana; color: #363534; font-size: 22px;"><span class="Apple-style-span" style=""><span class="Apple-style-span" style="line-height: 34px; font-family: Verdana; color: #363534; font-size: 22px;"><span
页: [1]
查看完整版本: 移植综述