Qt creator中文输入—fctix-qt5 源码编译 libfcitxplatforminputcontextplugin.so
fctix-qt5 的源码有两个地方可以下载:
wget https://download.fcitx-im.org/fcitx-qt5/fcitx-qt5-1.0.5.tar.xztar -xJf fcitx-qt5-1.0.5.tar.xz
git clone http://github.com/fcitx/fcitx-qt5.git
6、7、8行 根据自己的安装位置进行修改。
#!/bin/bash
CMD_PATH=`dirname $0`
userdir=`env | grep ^HOME= | cut -c 6-`
qt5Creator=${userdir}/Qt5.9.0/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts
qt5gcc_64=${userdir}/Qt5.9.0/5.9/gcc_64/plugins/platforminputcontexts
export Qt5_DIR=${userdir}/Qt5.9.0/5.9/gcc_64/lib/cmake/Qt5
sudo apt install git
git clone http://github.com/fcitx/fcitx-qt5.git
rm -r ~/fcitx-qt5/build
mkdir ~/fcitx-qt5/build
cd ~/fcitx-qt5/build
sudo apt install gcc g++ cmake extra-cmake-modules
sudo apt install libgl1-mesa-dev libglu1-mesa-dev libxkbcommon-dev fcitx-libs-dev
cmake ../
make
libfcix=~/fcitx-qt5/build/platforminputcontext/libfcitxplatforminputcontextplugin.so
sudo cp $libfcix ${qt5Creator}
sudo cp $libfcix ${qt5gcc_64}
sudo chmod +x ${qt5Creator}/libfcitxplatforminputcontextplugin.so
sudo chmod 777 ${qt5Creator}/libfcitxplatforminputcontextplugin.so
sudo chmod +x ${qt5gcc_64}/libfcitxplatforminputcontextplugin.so
sudo chmod 777 ${qt5gcc_64}/libfcitxplatforminputcontextplugin.so