当前位置:网站首页>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
边栏推荐
猜你喜欢
如何基于WPF写一款数据库文档管理工具(二)
趣链的产品构架
for循环练习题
Flutter 桌面探索 | 自定义可拖拽导航栏
嵌入式系统:GPIO
Bytebase数据库 Schema 变更管理工具
CAS: 1192802-98-4 _uv cracking of biotin - PEG2 - azide
Lift, Splat, Shoot: Encoding Images from Arbitrary Camera Rigs by Implicitly Unprojecting to 3D 论文笔记
[b01lers2020]Life on Mars
CAS: 773888-45-2_BIOTIN ALKYNE_Biotin-alkynyl
随机推荐
【进阶自动化测试】一文1000教你如何用Postman做接口自动化测试
老板:公司系统太多,能不能实现账号互通?
for loop exercises
113. 授人以渔 - 如何自行查询任意 SAP UI5 控件属性的文档和技术实现细节
LabVIEW code generation error 61056
Pay from 0 to 1
《数字经济全景白皮书》金融数字用户篇 重磅发布!
FVCOM 3D Numerical Simulation of Hydrodynamics, Water Exchange, Dispersion and Transport of Oil Spills丨FVCOM Model Watershed, Numerical Simulation Method of Marine Water Environment
encapsulation, package, access modifier, static variable
With 4 years of work experience, the 5 communication methods between multi-threads can't be said, can you believe it?
【刷题篇】二叉树的右视图
生成器版和查看器版有什么区别?
E-commerce data warehouse ODS layer-----log data loading
Adobe是什么?
CAS:1260586-88-6_Biotin-C5-Azide_Biotin-C5-Azide
云计算国内外发展现状
2022-08-02 mysql/stonedb slow SQL-Q18 - memory usage surge analysis
Summary bug 】 【 Elipse garbled solution project code in Chinese!
CAS:908007-17-0_Biotin-azide_Biotin azide
Internet user account information management regulations come into effect today: must crack down on account trading and gray products