qt creator 文件移植到开发板上运行 的全过程
来源:互联网 发布:模拟经营单机 知乎 编辑:程序博客网 时间:2024/04/30 10:17
因为板子已经有qt库文件了 我们不进行移植qt库,
1 安装arm-linux-gcc交叉编译器
2 编译 qt4.7.1 源码(源码有点错自己google修改)
3 安装qtcreator
4 配置qt create的 debug 加入编译好的qt4.7.1 qmake 文件 rebuild
5 在qtcreator创建一个新工程,利用qt4.7.1编译 生成arm运行文件(qtcreator会显示permission denied )
6 利用 各种方式把这个生成的文件拷贝到你的开发板子上(ssh nfs 串口rz命令 sd卡)
7 创建一个qt运行程序脚本 hello.sh
#!/bin/sh
base1=qpe
pid=`/bin/pidof $base1`
if [ -n "$pid" ]; then
killall $base1
fi
base2=qss
pid=`/bin/pidof $base2`
if [ -n "$pid" ]; then
killall $base2
fi
base3=quicklauncher
pid=`/bin/pidof $base3`
if [ -n "$pid" ]; then
killall $base3
fi
base4=fluidlauncher
pid=`/bin/pidof $base4`
if [ -n "$pid" ]; then
killall $base4
fi
export TSLIB_ROOT=/usr/local/tslib
export TSLIB_TSDEVICE=/dev/input/event2
export TSLIB_TSEVENTTYPE=H3600
export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export QTDIR=/opt/qt-4.7.1/
export LD_LIBRARY_PATH=$QTDIR/plugins/qtopialmigrate/:$QTDIR/qt_plugins/imageformats/:$QTDIR/lib:/root/tslib/build/lib:$LD_LIBRARY_PATH
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/root/tslib/build/bin
if [ -c /dev/input/event2 ]; then
export QWS_MOUSE_PROTO="Tslib:${TSLIB_TSDEVICE}"
if [ -e /etc/pointercal -a ! -s /etc/pointercal ] ; then
rm /etc/pointercal
/root/tslib/build/bin/ts_calibrate
fi
else
export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice"
>/etc/pointercal
fi
export QWS_KEYBOARD=TTY:/dev/tty1
FB_SIZE=$(cat /sys/class/graphics/fb0/virtual_size)
#export QWS_DISPLAY="LinuxFb:mmWidth76:mmHeight44:1"
case "$FB_SIZE" in
800,480)
export QWS_DISPLAY="LinuxFb:mmWidth91:mmHeight53:1"
;;
480,272)
export QWS_DISPLAY="LinuxFb:mmWidth76:mmHeight44:1"
;;
*)
export QWS_DISPLAY="LinuxFb:mmWidth91:mmHeight53:1"
;;
esac
#export QWS_DISPLAY=:1
export HOME=/root/QtE4Home
./filename -qws
复制上面代码,后面红色的filename 就填生成qt程序的名称
8 杀掉所有qt进程 利用ps命令查看 kill命令杀
9 运行这个脚本
1 安装arm-linux-gcc交叉编译器
2 编译 qt4.7.1 源码(源码有点错自己google修改)
3 安装qtcreator
4 配置qt create的 debug 加入编译好的qt4.7.1 qmake 文件 rebuild
5 在qtcreator创建一个新工程,利用qt4.7.1编译 生成arm运行文件(qtcreator会显示permission denied )
6 利用 各种方式把这个生成的文件拷贝到你的开发板子上(ssh nfs 串口rz命令 sd卡)
7 创建一个qt运行程序脚本 hello.sh
#!/bin/sh
base1=qpe
pid=`/bin/pidof $base1`
if [ -n "$pid" ]; then
killall $base1
fi
base2=qss
pid=`/bin/pidof $base2`
if [ -n "$pid" ]; then
killall $base2
fi
base3=quicklauncher
pid=`/bin/pidof $base3`
if [ -n "$pid" ]; then
killall $base3
fi
base4=fluidlauncher
pid=`/bin/pidof $base4`
if [ -n "$pid" ]; then
killall $base4
fi
export TSLIB_ROOT=/usr/local/tslib
export TSLIB_TSDEVICE=/dev/input/event2
export TSLIB_TSEVENTTYPE=H3600
export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export QTDIR=/opt/qt-4.7.1/
export LD_LIBRARY_PATH=$QTDIR/plugins/qtopialmigrate/:$QTDIR/qt_plugins/imageformats/:$QTDIR/lib:/root/tslib/build/lib:$LD_LIBRARY_PATH
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/root/tslib/build/bin
if [ -c /dev/input/event2 ]; then
export QWS_MOUSE_PROTO="Tslib:${TSLIB_TSDEVICE}"
if [ -e /etc/pointercal -a ! -s /etc/pointercal ] ; then
rm /etc/pointercal
/root/tslib/build/bin/ts_calibrate
fi
else
export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice"
>/etc/pointercal
fi
export QWS_KEYBOARD=TTY:/dev/tty1
FB_SIZE=$(cat /sys/class/graphics/fb0/virtual_size)
#export QWS_DISPLAY="LinuxFb:mmWidth76:mmHeight44:1"
case "$FB_SIZE" in
800,480)
export QWS_DISPLAY="LinuxFb:mmWidth91:mmHeight53:1"
;;
480,272)
export QWS_DISPLAY="LinuxFb:mmWidth76:mmHeight44:1"
;;
*)
export QWS_DISPLAY="LinuxFb:mmWidth91:mmHeight53:1"
;;
esac
#export QWS_DISPLAY=:1
export HOME=/root/QtE4Home
./filename -qws
复制上面代码,后面红色的filename 就填生成qt程序的名称
8 杀掉所有qt进程 利用ps命令查看 kill命令杀
9 运行这个脚本
0 0
- qt creator 文件移植到开发板上运行 的全过程
- 如何将QT程序移植到开发板上运行
- 如何将QT程序移植到开发板上运行
- Qt移植到开发板上改变字体的大小
- qt移植到s3c2440开发板上
- qt移植到s3c2440开发板上
- Qt Creator可执行程序移植到OK6410上
- Fedora9 下搭建Qt Creator的ARM开发环境并移植Qt4.6.3-books到mini2440
- Fedora9 下搭建Qt Creator的ARM开发环境并移植Qt4.6.3-books到min
- Fedora9 下搭建Qt Creator的ARM开发环境并移植Qt4.6.3-books到mini2440
- Fedora12下搭建Qt Creator的ARM开发环境 并 移植Qt4.6.2到Micro2440
- Qt Creator的ARM开发环境 并 移植Qt4.6.2到Micro2440
- QT程序怎么移植到开发板并运行
- QT程序移植到开发板并运行 解决方案
- 移植Qt到开发板的过程
- 将QT程序移植到arm2440开发板上
- Fedora9/12下搭建Qt Creator的ARM开发环境 并 移植Qt4.6.2到Micro2440(一)
- Fedora9/12下搭建Qt Creator的ARM开发环境 并 移植Qt4.6.2到Micro2440(二)
- Android-布局管理 (五大布局控件使用)
- 高质量文本转换工具
- 时间都去哪了
- 从零写bootloader--第一阶段启动的实现
- 练习一万小时成天才
- qt creator 文件移植到开发板上运行 的全过程
- 遍历Map集合的4种方法
- qt及java端实现自定义数字签名,数据加密传输。
- 幂函数
- BUG:Requesting JavaScript AST from selection
- 简单设置samba共享
- 注意设置httpclient连接数
- 关于平衡二叉树的一句代码不是很理解
- No orientation specified, and the default is horizontal. This is a common source of bugs when childr