银河麒麟ARM64 飞腾FT2000 linuxdeployqt linux打包qt
下载linuxdeployqt-aarch64.AppImage
下载地址 linuxdeployqt-aarch64.AppImage
qt版本说明
银河麒麟arm64 自带Qt 4.8.7 和 Qt5.6.1
查看linuxdeployqt源码对版本对区分
if (qmakePath.isEmpty()) {
// Try to find a version specific qmake first
// openSUSE has qmake for Qt 4 and qmake-qt5 for Qt 5
// Qt 4 on Fedora comes with suffix -qt4
// http://www.geopsy.org/wiki/index.php/Installing_Qt_binary_packages
if(qtDetected == 5){
qmakePath = QStandardPaths::findExecutable("qmake-qt5");
LogDebug() << "qmake 5";
} else if(qtDetected == 4){
qmakePath = QStandardPaths::findExecutable("qmake-qt4");
LogDebug() << "qmake 4";
}
if(qmakePath.isEmpty()){
// The upstream name of the binary is "qmake", for Qt 4 and Qt 5
qmakePath = QStandardPaths::findExecutable("qmake");
}
}
银河麒麟arm64 /usr/bin目录下 默认只有 qmake qmake-qt4 没有qmake-qt5
手动为/usr/lib/aarch64-linux-gnu/qt5/bin/qmake 创建快捷方式并重命名为qmake-qt5
执行如下命令
sudo ln -s /usr/lib/aarch64-linux-gnu/qt5/bin/qmake /usr/bin/qmake-qt5
执行完成后检验方法如下:
如果默认使用Qt4版本 无需执行创建快捷方式这一步 因为默认qmake-qt4就有
linuxdeployqt 拷贝至bin目录
linuxdeployqt-aarch64.AppImage 下载完成后移动到/usr/local/bin目录下并重命名
sudo mv linuxdeployqt-aarch64.AppImage /usr/local/bin/linuxdeployqt
验证
有版本信息输出表示打包程序已就为
打包
准备编译好的程序
Simplest example
You’ll need to provide the basic structure of an AppDir which should look something like this:
└── usr
├── bin
│ └── your_app
├── lib
└── share
├── applications
│ └── your_app.desktop
└── icons
└──
└──
└── apps
└── your_app.png
扫描二维码关注公众号,回复:
12499883 查看本文章
执行如下命令
linuxdeployqt your_app.AppDir/your_app.desktop -verbose=3 -appimage
将会输出your_app-aarch64.AppImage
具体可参考官方说明
其他参考
linuxdeployqt github
patchelf
AppImageKit
其他平台打包教程