fix(@desktop/input): deploy Qt plugin to support fcitx
Qt provides support for various input methods through plugins. Since the fcitx plugin is not delivered with Qt, it needs to be built and deployed by us. Fixes: #4436
This commit is contained in:
parent
d713c6fe9f
commit
ee462ea178
|
@ -43,3 +43,6 @@
|
||||||
[submodule "vendor/nim-result"]
|
[submodule "vendor/nim-result"]
|
||||||
path = vendor/nim-result
|
path = vendor/nim-result
|
||||||
url = https://github.com/arnetheduck/nim-result
|
url = https://github.com/arnetheduck/nim-result
|
||||||
|
[submodule "vendor/fcitx5-qt"]
|
||||||
|
path = vendor/fcitx5-qt
|
||||||
|
url = https://github.com/fcitx/fcitx5-qt
|
||||||
|
|
21
Makefile
21
Makefile
|
@ -344,8 +344,24 @@ STATUS_CLIENT_APPIMAGE ?= pkg/Status.AppImage
|
||||||
STATUS_CLIENT_TARBALL ?= pkg/Status.tar.gz
|
STATUS_CLIENT_TARBALL ?= pkg/Status.tar.gz
|
||||||
STATUS_CLIENT_TARBALL_FULL ?= $(shell realpath $(STATUS_CLIENT_TARBALL))
|
STATUS_CLIENT_TARBALL_FULL ?= $(shell realpath $(STATUS_CLIENT_TARBALL))
|
||||||
|
|
||||||
|
ifeq ($(detected_OS),Linux)
|
||||||
|
FCITX5_QT := vendor/fcitx5-qt/build/qt5/platforminputcontext/libfcitx5platforminputcontextplugin.so
|
||||||
|
FCITX5_QT_CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY_PLUGIN=ON -DENABLE_QT4=OFF -DENABLE_QT5=ON
|
||||||
|
FCITX5_QT_BUILD_CMD := cmake --build . --config Release $(HANDLE_OUTPUT)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(FCITX5_QT): | deps
|
||||||
|
echo -e $(BUILD_MSG) "fcitx5-qt"
|
||||||
|
+ cd vendor/fcitx5-qt && \
|
||||||
|
mkdir -p build && \
|
||||||
|
cd build && \
|
||||||
|
rm -f CMakeCache.txt && \
|
||||||
|
cmake $(FCITX5_QT_CMAKE_PARAMS) \
|
||||||
|
.. $(HANDLE_OUTPUT) && \
|
||||||
|
$(FCITX5_QT_BUILD_CMD)
|
||||||
|
|
||||||
$(STATUS_CLIENT_APPIMAGE): override RESOURCES_LAYOUT := -d:production
|
$(STATUS_CLIENT_APPIMAGE): override RESOURCES_LAYOUT := -d:production
|
||||||
$(STATUS_CLIENT_APPIMAGE): nim_status_client $(APPIMAGE_TOOL) nim-status.desktop
|
$(STATUS_CLIENT_APPIMAGE): nim_status_client $(APPIMAGE_TOOL) nim-status.desktop $(FCITX5_QT)
|
||||||
rm -rf pkg/*.AppImage
|
rm -rf pkg/*.AppImage
|
||||||
rm -rf tmp/linux/dist
|
rm -rf tmp/linux/dist
|
||||||
mkdir -p tmp/linux/dist/usr/bin
|
mkdir -p tmp/linux/dist/usr/bin
|
||||||
|
@ -376,6 +392,9 @@ $(STATUS_CLIENT_APPIMAGE): nim_status_client $(APPIMAGE_TOOL) nim-status.desktop
|
||||||
echo -e $(BUILD_MSG) "AppImage"
|
echo -e $(BUILD_MSG) "AppImage"
|
||||||
linuxdeployqt tmp/linux/dist/nim-status.desktop -no-copy-copyright-files -qmldir=ui -qmlimport=$(QTDIR)/qml -bundle-non-qt-libs
|
linuxdeployqt tmp/linux/dist/nim-status.desktop -no-copy-copyright-files -qmldir=ui -qmlimport=$(QTDIR)/qml -bundle-non-qt-libs
|
||||||
|
|
||||||
|
# Qt plugins
|
||||||
|
cp $(FCITX5_QT) tmp/linux/dist/usr/plugins/platforminputcontexts/
|
||||||
|
|
||||||
rm tmp/linux/dist/AppRun
|
rm tmp/linux/dist/AppRun
|
||||||
cp AppRun tmp/linux/dist/.
|
cp AppRun tmp/linux/dist/.
|
||||||
|
|
||||||
|
|
|
@ -8,20 +8,35 @@ ENV QTDIR="${QT_PATH}/${QT_VERSION}/${QT_PLATFORM}"
|
||||||
ENV LD_LIBRARY_PATH="${QTDIR}/lib:${LD_LIBRARY_PATH}"
|
ENV LD_LIBRARY_PATH="${QTDIR}/lib:${LD_LIBRARY_PATH}"
|
||||||
# $OPENSSL_PREFIX is provided by the docker image
|
# $OPENSSL_PREFIX is provided by the docker image
|
||||||
ENV LIBRARY_PATH="${OPENSSL_PREFIX}/lib:${LIBRARY_PATH}"
|
ENV LIBRARY_PATH="${OPENSSL_PREFIX}/lib:${LIBRARY_PATH}"
|
||||||
|
ENV OPENSSL_ROOT_DIR="${OPENSSL_PREFIX}"
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& sudo apt update -yq \
|
&& sudo apt update -yq \
|
||||||
&& sudo apt install -yq software-properties-common \
|
&& sudo apt install -yq software-properties-common \
|
||||||
&& sudo add-apt-repository -y ppa:git-core/ppa \
|
&& sudo add-apt-repository -y ppa:git-core/ppa \
|
||||||
|
&& sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test \
|
||||||
&& sudo apt update -yq \
|
&& sudo apt update -yq \
|
||||||
&& sudo apt purge -yq gnupg \
|
&& sudo apt purge -yq gnupg \
|
||||||
&& sudo apt install -yq --fix-missing \
|
&& sudo apt install -yq --fix-missing \
|
||||||
build-essential cmake jq git s3cmd gnupg2 ca-certificates \
|
jq git s3cmd gnupg2 ca-certificates \
|
||||||
|
build-essential extra-cmake-modules gcc-9 g++-9 \
|
||||||
libpcre3-dev libnss3 libxcomposite1 libxtst6 libpcsclite-dev \
|
libpcre3-dev libnss3 libxcomposite1 libxtst6 libpcsclite-dev \
|
||||||
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
|
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
|
||||||
gstreamer1.0-plugins-ugly gstreamer1.0-libav \
|
gstreamer1.0-plugins-ugly gstreamer1.0-libav \
|
||||||
gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-pulseaudio
|
gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-pulseaudio
|
||||||
|
|
||||||
|
# C++17 is required
|
||||||
|
RUN sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 \
|
||||||
|
--slave /usr/bin/g++ g++ /usr/bin/g++-9
|
||||||
|
|
||||||
|
# CMake 3.16 or higher is required
|
||||||
|
RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-x86_64.sh \
|
||||||
|
&& chmod +x cmake-3.22.1-linux-x86_64.sh \
|
||||||
|
&& sudo mkdir /opt/cmake \
|
||||||
|
&& sudo sh cmake-3.22.1-linux-x86_64.sh --prefix=/opt/cmake --exclude-subdir --skip-license \
|
||||||
|
&& rm -f cmake-3.22.1-linux-x86_64.sh
|
||||||
|
ENV PATH="/opt/cmake/bin:${PATH}"
|
||||||
|
|
||||||
# Fix LetsEncrypt X3 root certificate expliration
|
# Fix LetsEncrypt X3 root certificate expliration
|
||||||
RUN sudo sed -i 's#\(mozilla/DST_Root_CA_X3.crt\)#!\1#' /etc/ca-certificates.conf \
|
RUN sudo sed -i 's#\(mozilla/DST_Root_CA_X3.crt\)#!\1#' /etc/ca-certificates.conf \
|
||||||
&& sudo dpkg-reconfigure -fnoninteractive ca-certificates
|
&& sudo dpkg-reconfigure -fnoninteractive ca-certificates
|
||||||
|
|
|
@ -4,7 +4,7 @@ pipeline {
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
label 'linux'
|
label 'linux'
|
||||||
image 'statusteam/nim-status-client-build:1.1.2'
|
image 'statusteam/nim-status-client-build:1.1.3'
|
||||||
/* allows jenkins use cat and mounts '/dev/fuse' for linuxdeployqt */
|
/* allows jenkins use cat and mounts '/dev/fuse' for linuxdeployqt */
|
||||||
args '--entrypoint="" --cap-add SYS_ADMIN --security-opt apparmor:unconfined --device /dev/fuse'
|
args '--entrypoint="" --cap-add SYS_ADMIN --security-opt apparmor:unconfined --device /dev/fuse'
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit fd06094f48e8281b6dc3fd4aaadfcd216c426a5a
|
Loading…
Reference in New Issue