思路参考上一篇:
银河麒麟V10 QT6.0以上版本 中文输入法 解决_银河麒麟输入法-CSDN博客
这一篇记录细节。
背景:
不同架构的机器或不同操作系统及不同版本都可能会重新编译输入法插件
经常会对新环境去安装搭建部署,出问题找资料比较麻烦,在此统一汇总记录。
1、QT6 安装
下载地址:
阿里源:
https://mirrors.aliyun.com/qt/official_releases/online_installers
其他镜像也可以,清华、腾讯等等
清华源:
https://mirrors.tuna.tsinghua.edu.cn/qt/official_releases/online_installers/
腾讯源:
https://mirrors.cloud.tencent.com/qt/official_releases/online_installers/
下载对应的安装程序后,在执行时最好通过镜像源安装,否则会非常慢
例如: xx.run --mirror http://mirrors.aliyun.com/qt
安装过程拉远程库比较慢,安装版本时先按默认版本安装
2、安装对应版本编译库
在安装目录用控制台运行维护工具 MaintenanceTool,最好也要加上镜像
例: ./MaintenanceTool --mirror http://mirrors.aliyun.com/qt
如果没有对应版本,在过滤条件选择一下 Archive,然后只需要选择对应版本的Desktop即可 。例:
3、编辑细节
CMakeLists.txt文件中关闭Qt5,打开Qt6
构建目录修改一下安装位置,否则异常后会导致QtCreator 闪退,不好排查问题
4、安装环境
CMake 需要3.20以上版本。否则 find_package 函数无法识别
备注:有一次遇到cmake安装时无法安装到/usr/bin目录,提示权限问题,用了sudo也没用,最终安装在其他目录下(/data/...),然后用软连接关联到/usr/bin ln -s 。。。
sudo apt-get install extra-cmake-modules
sudo apt-get install libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install freeglut3-dev libglew-dev libglfw3-dev
sudo apt-get install fcitx-libs-dev