windows: Refer to the following documentationhttp://download.csdn.net/detail/trustguan/4943897
ex-continued
The following is the establishment of QT development platform, my platform is Ubuntu 12.04, the need for the QT version of two (started online, Tmake, but later from 3.0 Qt since bring the Make tool, there is no need to tmake):
Qt-x11-opensource-src-4.5.3.tar.gz
Qt-embedded-linux-opensource-src-4.5.3.tar.gz
1 What is qt/embedded
Qt/embedded is a full self-contained GUI and Linux based embedded platform development tool.
2 What is QT
QT is a complete framework for C + + application development. It contains a class library and tools for cross-platform development and internationalization. The QT API is the same on all supported platforms, and QT tools are used on these platforms in a consistent way, so the development and deployment of QT applications is not platform-independent.
Specific steps and instructions: 1 Download Source:
Download Address: http://download.qt-project.org/archive/qt/4.5/(choose the version you want to download, the latest edition 5.1)
2 Establishment of temporary directory
MKDIR/USR/QT (i login with root, if you can add sudo mkdir/usr/qt with normal users) |
3 Copy the downloaded file to the directory
4 extract two files
TAR–XZVF qt-x11-opensource-src-4.5.3.tar.gz TAR–XZVF qt-embedded-linux-opensource-src-4.5.3.tar.gz |
5 Installation qt-x11
#cd qt-x11-opensource-src-4.5.3 #./configure # make # make Install QT-X11 is installed in this directory/usr/local/trolltech/qt-4.5.3 |
6 Installation qt-embedded (X86 with PC development tools, ARM platform for developing embedded software)
#cp qt-embedded-linux-opensource-src-4.5.3 qt-embedded-linux-opensource-src-4.5.3-x86 # MV qt-embedded-linux-opensource-src-4.5.3 Qt-embedded-linux-opensource-src-4.5.3-arm X86 version # CD Qt-embedded-linux-opensource-src-4.5.3-x86 #./configure-prefix/usr/local/trolltech/qtembedded-4.5.3-x86-embedded X86-QVFB # make # make Install ARM version # CD Qt-embedded-linux-opensource-src-4.5.3-arm #./configure-prefix/usr/local/trolltech/qtembedded-4.5.0-arm-embedded Arm-lrt-little-endian # make # make Install |
Attention:
-prefix/usr/local/trolltech/qtembedded-4.5.0-arm//Specify Installation path
-embedded ARM//designated platform
-little-endian//designated as small-end storage
-LRT//No designation will be
I will specify these, OK, also need to have some problems, but through the network can find the appropriate answer.
7 Installing QVFB Tools
At the beginning I only download qvfb1.1.tar.gz to install, in fact, qt-x11-opensource-src-4.5.3 in the middle, the following on the selection of qt-x11-opensource-src-4.5.3, the tool, compiled to build the Qvfb tool.
Before you start:
1 copy deviceskin.h,deviceskin.cpp to QVFB file. #find/usr/qt/-name Deviceskin.h #cp. /.. /*/DEVICESKIN.H/USR/QT/QT-X11-OPENSOURCE-SRC-4.5.3/TOOLS/QVFB #find/usr/qt/-name Deviceskin.cpp #cp. /.. /*/DEVICESKIN.H/USR/QT/QT-X11-OPENSOURCE-SRC-4.5.3/TOOLS/QVFB |
7.1 Access to the QVFB source directory: # CD/USR/QT/QT-X11-OPENSOURCE-SRC-4.5.3/TOOLS/QVFB 7.2. Perform qmake Build Pro project: #/usr/qt/qt-x11-opensource-src-4.5.3/bin/qmake-project 7.3. Perform qmake generation makefile #/usr/qt/qt-x11-opensource-src-4.5.3/bin/qmake
Modify Makefile 1 Modify Makefile LIBS option: Add-lxtst option. |
7. 4. Compile Make # make 7.5 Generate QVFB tool next to current directory #cp./qvfb/usr/bin |
8 Setting environment variables
//8.1 QT X11 VI setenv.sh
Add the following:
Path=/usr/local/trolltech/qt-4.5.3/bin: $PATH
Ld_library_path=/usr/local/trolltech/qt-4.5.3/lib: $LD _library_path
Save exit. Move to/usr/local/trolltech/qt-4.5.3. //qt-embended-x86 #vi setenv.sh Add the following: Qtedir=/usr/local/trolltech/qtembedded-4.5.3-x86 Path=/usr/local/trolltech/qtembedded-4.5.3-x86/bin: $PATH Ld_library_path=/usr/local/trolltech/qtembedded-4.5.3-x86/lib: $LD _library_path
Save exit. Move to/usr/local/trolltech/qtembedded-4.5.3-x86. //qt-embended-arm VI setenv.sh Add the following: Qtedir=/usr/local/trolltech/qtembedded-4.5.3-arm Path=/usr/local/trolltech/qtembedded-4.5.3-arm/bin: $PATH Ld_library_path=/usr/local/trolltech/qtembedded-4.5.3-arm/lib: $LD _library_path Save exit. Move to/usr/local/trolltech/qtembedded-4.5.3-arm Attention: When you want to use the tool: source setenv.sh can #vi ~/.BASHRC Alias qx86= ' source/usr/local/trolltech/qtembedded-4.5.3-x86/setenv.sh ' Alias qarm= ' source/usr/local/trolltech/qtembedded-4.5.3-arm/setenv.sh ' Alias qx11= ' source/usr/local/trolltech/qt-4.5.3/setenv.sh ' Change environment variables after convenience For example: When you want to compile with x86, point directly to Qx86 #qx86 |
9 Test
X11 Test
#cd/usr/local/trolltech/qt-4.5.3/demos/books # qx11 Effect:
|
Qt-embended-x86 Test:
#qx86 #alias fb= ' qvfb-width 320-height 240-depth 32 ' #fb & root@icegoly:books#./books-qws Connected to the VFB server:0:113x85mm x (72X72DPI) |
10: Support in Chinese:
Font Download: http://ishare.iask.sina.com.cn/f/36170743.html
10.1 Setting Environment variables:
#vi/etc/profile Add the following content. Export Qt_qws_fontdir=/usr/local/trolltech/font |
10.2 Add the downloaded font to/usr/local/trolltech/font, the directory can be