当前位置:网站首页>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
边栏推荐
猜你喜欢

noip preliminary round

斩获双奖|易知微荣获“2021中国数字孪生解决方案优秀供应商”“中国智能制造优秀推荐产品”双奖项!

Gains double award | know micro easily won the "2021 China digital twin solution suppliers in excellence" "made in China's smart excellent recommended products" double award!

一文带你了解软件测试是干什么的?薪资高不高?0基础怎么学?

一些思考:腾讯股价为何持续都低

Canvas App中点击图标生成PDF并保存到Dataverse中

Teach a Man How to Fish - How to Query the Properties of Any SAP UI5 Control by Yourself Documentation and Technical Implementation Details Demo

Adobe是什么?

Network basic learning series four (network layer, data link layer and some other important protocols or technologies)

电商秒杀系统
随机推荐
Internet user account information management regulations come into effect today: must crack down on account trading and gray products
PowerMockup 4.3.4::::Crack
Causes of Mysql Disk Holes and Several Ways to Rebuild Tables
FVCOM 3D Numerical Simulation of Hydrodynamics, Water Exchange, Dispersion and Transport of Oil Spills丨FVCOM Model Watershed, Numerical Simulation Method of Marine Water Environment
2022-08-02 mysql/stonedb慢SQL-Q18-内存使用暴涨分析
授人以渔 - 如何自行查询任意 SAP UI5 控件属性的文档和技术实现细节试读版
深度学习和机器学习有什么区别?
HCIP第十三天
CAS:908007-17-0_Biotin-azide_Biotin azide
[N1CTF 2018]eating_cms
云计算国内外发展现状
HCIP第十五天
HDU 5655 CA Loves Stick
关于IDO预售系统开发技术讲解丨浅谈IDO预售合约系统开发原理分析
[MySQL Advanced] Creation and Management of Databases and Tables
Gains double award | know micro easily won the "2021 China digital twin solution suppliers in excellence" "made in China's smart excellent recommended products" double award!
382. Linked List Random Node
【bug】汇总Elipse项目中代码中文乱码解决方法!
目标检测技术研究现状及发展趋势
Codeup brushing notes - simple simulation