当前位置:网站首页>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
边栏推荐
猜你喜欢
一些思考:腾讯股价为何持续都低
Network basic learning series four (network layer, data link layer and some other important protocols or technologies)
CAS:153162-70-0_N-BOC-6-Biotinamidohexylamine
静态文件快速建站
Embedded Systems: GPIO
IO thread process -> thread synchronization mutual exclusion mechanism -> day6
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!
七夕快乐!
CAS: 1192802-98-4 _uv cracking of biotin - PEG2 - azide
HCIP第十六天
随机推荐
navicat 连接 mongodb 报错[13][Unauthorized] command listDatabases requires authentication
Data_web(八)mysql增量同步到mongodb
【进阶自动化测试】一文1000教你如何用Postman做接口自动化测试
PowerMockup 4.3.4::::Crack
384. Shuffle an Array
Lift, Splat, Shoot: Encoding Images from Arbitrary Camera Rigs by Implicitly Unprojecting to 3D 论文笔记
Codeup刷题笔记-简单模拟
Pay from 0 to 1
CAS:908007-17-0_Biotin-azide_Biotin azide
What is Adobe?
2022-08-03 Oracle executes slow SQL-Q17 comparison
21天打卡挑战学习MySQL—Day第一周 第一篇
noip preliminary round
伴随着元宇宙、web3.0等概念的兴起,数字人、数字场景等诸多数字化的形态开始出现
Embedded Systems: GPIO
Adobe是什么?
CAS:1797415-74-7_TAMRA-Azide-PEG-Biotin
CAS: 773888-45-2_BIOTIN ALKYNE_Biotin-alkynyl
[b01lers2020]Life on Mars
优化查询(工作中)