編譯介紹:
https://github.com/omgredfog/yong
由于要使用 QT5.9 編譯『小小輸入法』的QT插件霜运,索性重新編譯小刑约瘛:
在 deepin 15.5 上編譯小小輸入法記錄:
1:下載代碼包
2:補(bǔ)完整缺失的目錄
mkdir -p {llib,cloud,gbk,mb,vim}/{l32,l64}
mkdir -p {im,config}/{l32-gtk3,l32-gtk2,l64-gtk3,l64-gtk2}
mkdir -p im/gtk-im/{l32-gtk3,l32-gtk2,l64-gtk3,l64-gtk2}
mkdir -p im/IMdkit/{l32,l64}
mkdir -p im/qt5-im/l64-qt5
3:安裝普通的依賴
sudo apt install g++
sudo apt install nodejs
sudo apt install npm
sudo apt install nodejs-legacy
sudo apt install libgtk-3-dev
sudo apt install libgtk2.0-dev
sudo apt install libxkbcommon-dev
sudo apt install libibus-1.0-dev
sudo apt install p7zip-full
4:處理QT5相關(guān)問(wèn)題
環(huán)境變量 作彤,寫(xiě)入 /etc/profile
- export Qt5_DIR=/home/i7/Qt5.9.3/5.9.3/gcc_64/lib/cmake/Qt5
- export PATH="/home/i7/Qt5.9.3/5.9.3/gcc_64/bin":$PATH
- export PATH="/home/i7/Qt5.9.3/5.9.3/gcc_64":$PATH
- export PATH="/home/i7/Qt5.9.3/5.9.3/gcc_64/include/QtGui":$PATH
- export PATH="/home/i7/Qt5.9.3/5.9.3/gcc_64/include/QtGui/5.9.3":$PATH
- export PATH="/home/i7/Qt5.9.3/5.9.3/gcc_64/include/QtGui/5.9.3/QtGui":$PATH
- export PATH="/home/i7/Qt5.9.3/5.9.3/gcc_64/include/QtCore":$PATH
- export PATH="/home/i7/Qt5.9.3/5.9.3/gcc_64/include/QtCore/5.9.3":$PATH
- export PATH="/home/i7/Qt5.9.3/5.9.3/gcc_64/include/QtCore/5.9.3/QtCore":$PATH
- export PKG_CONFIG_PATH="/usr/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/home/i7/Qt5.9.3/5.9.3/gcc_64/lib/pkgconfig":$PKG_CONFIG_PATH
在 pkgconfig 下竭讳,給『Qt5Core.pc』、『Qt5Core.pc』創(chuàng)建軟鏈接灿渴。
- /usr/share/pkgconfig
- /usr/lib/x86_64-linux-gnu/pkgconfig
- /usr/lib/pkgconfig
- /home/i7/Qt5.9.3/5.9.3/gcc_64/lib/pkgconfig
或者逻杖,給『/home/i7/Qt5.9.3/5.9.3/gcc_64/lib/pkgconfig』下的所有文件思瘟,建立軟鏈接到上述路徑,用 『ln -s a b』這個(gè)命令够话。
修正QT插件的build.txt
其間的『MOC』定義光绕,要改成絕對(duì)路徑:
var MOC='/home/i7/Qt5.9.3/5.9.3/gcc_64/bin/moc';
編譯并打包
代碼根目錄里,分別執(zhí)行
- node build.js l64
- node build.js -C install copy dist
僅僅生成QT5
如果僅僅要QT5的插件
- node build.js -C im/qt5-im