当前位置:网站首页>Work Subtotal QT Packing
Work Subtotal QT Packing
2022-08-03 22:25:00 【Zip-List】
工作小计 QT打包
qtAfter the program is debugged,Send to others if needed,It needs to be packaged together with the library and other files
需要工具linuxdeployqt,源码编译好后,Add executable path
The version is wronghigh version runninglinuxdeployqt,Just comment out part of the code
linuxdeployqt XXX -no-strip
#-no-stripwill make the file larger,保留更多的信息
执行完毕后,发现多了qt.conf文件和lib plugins translations三个文件夹
---bin
---xxx
---qt.conf
---lib
---plugins
---translations
可以看到qt.confThe dependent files are all generated and placed in the corresponding folder
# Generated by linuxdeployqt
# https://github.com/probonopd/linuxdeployqt/
[Paths]
Prefix = ../
Plugins = plugins
Imports = qml
Qml2Imports = qml
At this point, you can directly execute the followingxxx文件,发现报错缺少qt的部分组件,qml没有找到.将qt对应的qml文件夹拷贝到当前目录
cp /home/test/Qt/5.15.2/gcc_64/qml ./ -r
If the file is still missing,把lddAll files that need to be linked are linked to him,执行copylib.sh xxx
#!/bin/sh
bin=$1 #发布的程序名称
desDir="../lib" #你的路径,Here is the upper level directorylib
if [ ! -d $desDir ];then
#echo "makedir $desDir"
mkdir $desDir
fi
libList=$(ldd $bin | awk '{
if (match($3,"/")){
printf("%s "),$3 } }')
cp $libList $desDir
Start the script,Link to the corresponding library
PWD=`pwd`
export LD_LIBRARY_PATH=${
PWD}/lib:$LD_LIBRARY_PATH
nohup ./bin/xxx&
打包
zip pkg.zip ./bin/ ./translations/ ./qml/ ./lib ./plugins/ run.sh -r
Execute after receiving the packagerun.sh即可
qt相关的bashrc设置
#run qt
export QT_DIR=~/Qt/5.15.2/gcc_64/
export Qt5_DIR=~/Qt/5.15.2/gcc_64/
#qtdeploy
export QTDIR=~/Qt/5.15.2
export PATH=${QTDIR}/gcc_64/bin:~/Qt/Tools/QtCreator/bin:~/Qt/Tools/QtDesignStudio/bin:$PATH
export LD_LIBRARY_PATH=${QTDIR}/gcc_64/lib:~/Qt/Tools/QtCreator/lib/Qt/lib/:$LD_LIBRARY_PATH
export QML_IMPORT_PATH=${QTDIR}/gcc_64/qml
边栏推荐
猜你喜欢
Summary bug 】 【 Elipse garbled solution project code in Chinese!
E-commerce data warehouse ODS layer-----log data loading
【day6】类与对象、封装、构造方法
[MySQL Advanced] Creation and Management of Databases and Tables
藏宝计划TreasureProject(TPC)系统模式开发技术原理
从0到1看支付
趣链的产品构架
一文带你了解软件测试是干什么的?薪资高不高?0基础怎么学?
关于IDO预售系统开发技术讲解丨浅谈IDO预售合约系统开发原理分析
静态文件快速建站
随机推荐
CAS: 1192802-98-4 _uv cracking of biotin - PEG2 - azide
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
Cisco ike2 IPSec配置
斩获双奖|易知微荣获“2021中国数字孪生解决方案优秀供应商”“中国智能制造优秀推荐产品”双奖项!
LabVIEW代码生成错误 61056
2022-08-03 Oracle executes slow SQL-Q17 comparison
Canvas App中点击图标生成PDF并保存到Dataverse中
Golang Chapter 1: Getting Started
466. Count The Repetitions
生成器版和查看器版有什么区别?
投资性大于游戏性 NFT游戏到底是不是门好生意
Teach a Man How to Fish - How to Query the Properties of Any SAP UI5 Control by Yourself Documentation and Technical Implementation Details Demo
PowerMockup 4.3.4::::Crack
L2-029 特立独行的幸福
Golang Chapter 2: Program Structure
The development status of cloud computing at home and abroad
Cisco ike2 IPSec configuration
113. 授人以渔 - 如何自行查询任意 SAP UI5 控件属性的文档和技术实现细节
Testng监听器
《数字经济全景白皮书》金融数字用户篇 重磅发布!