Qt47移植.docx

上传人:b****7 文档编号:10704300 上传时间:2023-02-22 格式:DOCX 页数:29 大小:679KB
下载 相关 举报
Qt47移植.docx_第1页
第1页 / 共29页
Qt47移植.docx_第2页
第2页 / 共29页
Qt47移植.docx_第3页
第3页 / 共29页
Qt47移植.docx_第4页
第4页 / 共29页
Qt47移植.docx_第5页
第5页 / 共29页
点击查看更多>>
下载资源
资源描述

Qt47移植.docx

《Qt47移植.docx》由会员分享,可在线阅读,更多相关《Qt47移植.docx(29页珍藏版)》请在冰豆网上搜索。

Qt47移植.docx

Qt47移植

1.移植tslib1.4.1

1.编译安装

./autogen.sh

./configure--host=arm-linux-disable-hp3600--disable-arctic2--disable-mk712--disable-collie--disable-corgi--disable-ucb1x00--disable-linear-h2200--with-gnu-ld--prefix=/home/lengyuegg/tool/tslibac_cv_func_malloc_0_nonnull=yes

make

makeinstall

2.修改tslib文件

/home/lengyuegg/tool/tslib/etc/ts.conf

去掉下面一行前的注释

module_rawinput

3.下载到开发板

把第一步生成的tslib整个文件下载到开发板

随便放到开发板的某个目录下

比如放到/home/lengyuegg/tslib

4.验证

cd/home/lengyuegg/tslib/bin

./ts_calibrate

2.移植Qt4.7.3

1.安装arm-linux-gcc

tarzxvfarm-linux-gcc-4.3.2.tgz

把目录下的bin所在的路径加到环境变量里

2.编译安装Qt

./configure-embeddedarm-release-opensource-silent-qt-libpng-qt-libjpeg-qt-libmng-qt-libtiff-no-multimedia-makelibs-nomaketools-nomakeexamples-nomakedocs-makedemos-qt-kbd-linuxinput-xplatformqws/linux-arm-g++-little-endian-qt-freetype-depths16,18-qt-gfx-linuxfb-no-qt3support-no-nis-no-cups-no-iconv-no-dbus-no-openssl-fast-no-accessibility-no-scripttools-no-mmx-no-multimedia-svg-no-webkit-no-3dnow-no-sse-no-sse2-no-gfx-transformed-no-gfx-multiscreen-no-gfx-vnc-no-gfx-qvfb-no-glib-prefix/home/lengyuegg/Qt/Qt4.7.3-qt-mouse-tslib-I/home/lengyuegg/tool/tslib/include-L/home/lengyuegg/tool/tslib/lib

Type'3'toviewtheGNUGeneralPublicLicenseversion3.

Type'L'toviewtheLesserGNUGeneralPublicLicenseversion2.1.

Type'yes'toacceptthislicenseoffer.

Type'no'todeclinethislicenseoffer.

yes

生成Makefile

make(2个小时)

makeinstall

3.字体设置

复制wqy-zenhei.ttc到/home/lengyuegg/Qt/Qt4.7.3/lib/fonts目录下,这样中文就可显示正常了。

4.下载到开发板

把第一步生成的Qt4.7.3整个文件下载到开发板

路径应与第二布设置的路径(-prefix/home/lengyuegg/Qt/Qt4.7.3)一致

5.设置环境变量

/etc/profile

exportTSLIB_ROOT=/home/lengyuegg/tslib

exportTSLIB_TSDEVICE=/dev/input/event0#触摸屏设备节点

exportTSLIB_CALIBFILE=/etc/pointercal#生成的校验文件存放目录

exportTSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf#触摸屏配置文件

exportTSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts#触摸屏在进行AD转换时用到的插件

#exportTSLIB_CONSOLEDEVICE=none

#exportTSLIB_FBDEVICE=/dev/fb0#触摸屏framebuff设备节点

exportQTDIR=/home/lengyuegg/Qt/Qt4.7.3

exportLD_LIBRARY_PATH=$QTDIR/lib:

/usr/local/lib:

$LD_LIBRARY_PATH

exportPATH=$QTDIR/bin:

/bin:

/sbin:

/usr/bin/:

/usr/sbin:

/usr/local/bin:

$PATH

#exportQWS_DISPLAY=:

1

exportQWS_DISPLAY="LinuxFb:

mmWidth100:

mmHeight130:

0"

TS_INFO_FILE=/sys/devices/virtual/input/input0/uevent

if[-e$TS_INFO_FILE-a"/bin/grep-qTouchScreen<$TS_INFO_FILE"];then

exportQWS_MOUSE_PROTO="Tslib:

/dev/input/event0MouseMan:

/dev/input/mice"

if[!

-s/etc/pointercal];then

rm/etc/pointercal

/usr/local/bin/ts_calibrate

fi

else

exportQWS_MOUSE_PROTO="MouseMan:

/dev/input/mice"

fi

unsetTS_INFO_FILE

exportQWS_KEYBOARD=TTY:

/dev/tty1

3.用QtCreator编写程序下载到开发板运行

 

运行

PC机

生成开发板运行程序

/home/lengyuegg/Qt/Qt4.7.3/bin/qmake

就是前面Qt编译安装的路径

下载程序到开发板运行

cd/home/lengyuegg/Qt/mypro/helloworld-cqy-build-desktop

IP:

192.168.1.230

用户名:

plg

密码:

plg

在开发板的/home/plg目录下

Chmod+xhelloworld-cqy

./helloworld-cqy–qws

4.Qt配置参数

./configure–help

有的参数前面有*号,这就意味这如果我们什么也不做,直接配置编译的话,就会把这些参数默认进去

如果是-no-XX-,就说明编译时不选择这个参数,如过是-qt-XX-,说明我们可以编译直接选用qt自带的驱动,如果是-plugin-XX-,就是将驱动以插件形式编译,而-system-XXX,当然是使用操作系统提供的驱动,不过那就需要您自己移植了,而且有时还要用第三方的API

./configure--help

Usage:

configure[-h][-prefix

][-prefix-install][-bindir][-libdir]

[-docdir

][-headerdir][-plugindir][-importdir][-datadir]

[-translationdir

][-sysconfdir][-examplesdir]

[-demosdir

][-buildkey][-release][-debug]

[-debug-and-release][-developer-build][-shared][-static][-no-fast][-fast][-no-largefile]

[-largefile][-no-exceptions][-exceptions][-no-accessibility]

[-accessibility][-no-stl][-stl][-no-sql-][-sql-]

[-plugin-sql-][-system-sqlite][-no-qt3support][-qt3support]

[-platform][-D][-I][-L][-help]

[-qt-zlib][-system-zlib][-no-gif][-qt-gif][-no-libtiff][-qt-libtiff][-system-libtiff]

[-no-libpng][-qt-libpng][-system-libpng][-no-libmng][-qt-libmng]

[-system-libmng][-no-libjpeg][-qt-libjpeg][-system-libjpeg][-make]

[-nomake][-R][-l][-no-rpath][-rpath][-continue]

[-verbose][-v][-silent][-no-nis][-nis][-no-cups][-cups][-no-iconv]

[-iconv][-no-pch][-pch][-no-dbus][-dbus][-dbus-linked][-no-gui]

[-no-separate-debug-info][-no-mmx][-no-3dnow][-no-sse][-no-sse2]

[-no-sse3][-no-ssse3][-no-sse4.1][-no-sse4.2][-no-avx][-no-neon]

[-qtnamespace][-qtlibinfix][-separate-debug-info][-armfpa]

[-no-optimized-qmake][-optimized-qmake][-no-xmlpatterns][-xmlpatterns]

[-no-multimedia][-multimedia][-no-phonon][-phonon][-no-phonon-backend][-phonon-backend]

[-no-media-backend][-media-backend][-no-audio-backend][-audio-backend]

[-no-openssl][-openssl][-openssl-linked]

[-no-gtkstyle][-gtkstyle][-no-svg][-svg][-no-webkit][-webkit][-webkit-debug]

[-no-javascript-jit][-javascript-jit]

[-no-script][-script][-no-scripttools][-scripttools]

[-no-declarative][-declarative][-no-declarative-debug][-declarative-debug]

[additionalplatformspecificoptions(seebelow)]

 

Installationoptions:

Theseareoptional,butyoumayspecifyinstalldirectories.

-prefix

......Thiswillinstalleverythingrelativeto

(default/usr/local/Trolltech/Qt-4.7.3)

*-prefix-install....Forceasandboxed"local"installationof

Qt.Thiswillinstallinto

/usr/local/Trolltech/Qt-4.7.3,ifthisoptionis

disabledthensomeplatformswillattempta

"system"installbyplacingdefaultvaluesto

beplacedinasystemlocationotherthan

PREFIX.

Youmayusethesetoseparatedifferentpartsoftheinstall:

-bindir

.........Executableswillbeinstalledto

(defaultPREFIX/bin)

-libdir

.........Librarieswillbeinstalledto

(defaultPREFIX/lib)

-docdir

.........Documentationwillbeinstalledto

(defaultPREFIX/doc)

-headerdir

......Headerswillbeinstalledto

(defaultPREFIX/include)

-plugindir

......Pluginswillbeinstalledto

(defaultPREFIX/plugins)

-importdir

......ImportsforQMLwillbeinstalledto

(defaultPREFIX/imports)

-datadir

........DatausedbyQtprogramswillbeinstalledto

(defaultPREFIX)

-translationdir

.TranslationsofQtprogramswillbeinstalledto

(defaultPREFIX/translations)

-sysconfdir

.....SettingsusedbyQtprogramswillbelookedforin

(defaultPREFIX/etc/settings)

-examplesdir

....Exampleswillbeinstalledto

(defaultPREFIX/examples)

-demosdir

.......Demoswillbeinstalledto

(defaultPREFIX/demos)

Youmayusetheseoptionstoturnonstrictpluginloading.

-buildkey....BuildtheQtlibraryandpluginsusingthespecified

.Whenthelibraryloadsplugins,itwillonly

loadthosethathaveamatchingkey.

Configureoptions:

Thedefaults(*)areusuallyacceptable.Aplus(+)denotesadefaultvalue

thatneedstobeevaluated.Iftheevaluationsucceeds,thefeatureis

included.Hereisashortexplanationofeachoption:

*-release...........CompileandlinkQtwithdebuggingturnedoff.

-debug.............CompileandlinkQtwithdebuggingturnedon.

-debug-and-release.CompileandlinktwoversionsofQt,withandwithout

debuggingturnedon(Maconly).

-developer-build...CompileandlinkQtwithQtdeveloperoptions(includingauto-testsexporting)

-opensource........CompileandlinktheOpen-SourceEditionofQt.

-commercial........CompileandlinktheCommercialEditionofQt.

 

*-shared............CreateandusesharedQtlibraries.

-static............CreateandusestaticQtlibraries.

*-no-fast...........ConfigureQtnormallybygeneratingMakefilesforall

projectfiles.

-fast..............ConfigureQtquicklybygeneratingMakefilesonlyfor

libraryandsubdirectorytargets.AllotherMakefiles

arecreatedaswrappers,whichwillinturnrunqmake.

-no-largefile......Disableslargefilesupport.

+-largefile.........EnablesQttoaccessfileslargerthan4GB.

-no-exceptions.....Disableexceptionsoncompilersthatsupportit.

*-exceptions........Enableexceptionsoncompilersthatsupportit.

-no-accessibility..DonotcompileAccessibilitysupport.

*-accessibility.....CompileAccessibilitysupport.

-no-stl............DonotcompileSTLsupport.

*-stl...............CompileSTLsupport.

-no-sql-...DisableSQLentirely.

-qt-sql-...EnableaSQLintheQtSqllibrary,bydefault

noneareturnedon.

-plugin-sql-EnableSQLasaplugintobelinkedto

atruntime.

Possiblevaluesfor:

[db2ibasemysqlociodbcpsqlsqlitesqlite2sqlite_symbiantds]

-system-sqlite.....Usesqlitefromtheoperatingsystem.

-no-qt3support.....DisablestheQt3supportfunctionality.

*-qt3support........EnablestheQt3supportfunctionality.

-no-xmlpatterns....DonotbuildtheQtXmlPatternsmodule.

+-xmlpatterns.......BuildtheQtXmlPatternsmodule.

QtXmlPatternsisbuiltifadecentC++compiler

isusedandexceptionsareenabled.

-no-multimedia.....DonotbuildtheQtMultimediamodule.

+-multimedia........BuildtheQtMultimediamodule.

-no-audio-backend..DonotbuildtheplatformaudiobackendintoQtMultimedia.

+-audio-backend.....BuildtheplatformaudiobackendintoQtMultimediaifavailable.

-no-phonon.........DonotbuildthePhononmodule.

+-phonon............BuildthePhononmodule.

PhononisbuiltifadecentC++compilerisused.

-no-phonon-backend..Donotbuildtheplatformphononplugin.

+-phonon-backend.....Build

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 法律文书 > 调解书

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1