Ubuntu QTCreator 程序打包

下载linuxdeployqt

官网地址:https://github.com/probonopd/linuxdeployqt/releases

image

安装

更改名字

mv linuxdeployqt-6-x86_64.AppImage linuxdeployqt
View Code

修改权限

chmod 777 linuxdeployqt
View Code


全局访问

sudo mv linuxdeployqt /usr/local/bin
View Code

测试

linuxdeployqt --version
View Code


image

表示成功


打包

QTCreator用release生成的可执行文件复制到新的控文件夹内然后执行


linuxdeployqt YourExcube -appimage
View Code


可能会报错,修改default.desktop

[Desktop Entry]
Type=Application
Name=YorAppName
Exec=YourExcute %F
Icon=favicon
Comment=Edit this default file
Terminal=false
Categories=Utility;Application;
View Code



image

打包成功

运行Appimage结尾的文件即可

posted @ 2024-10-29 10:32  Yimiu  阅读(4)  评论(0编辑  收藏  举报