Add nimf and hime to appimage (#25)
* Add nimf to appimage * Add commit hash to AppImageKit-checkrt fetching step * Add hime to appimage * Update Qt to 5.12.8 in release appimage action
This commit is contained in:
parent
0a9b93a98c
commit
4808ac0fab
3 changed files with 177 additions and 10 deletions
75
.github/workflows/appimage-release.yml
vendored
75
.github/workflows/appimage-release.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
|
||||
env:
|
||||
GIT: "https://github.com"
|
||||
QT: "5_12_5"
|
||||
QT: "5_12_8"
|
||||
OPENSSL_VER: "1_1_1"
|
||||
CMAKE_VER: "3.17.0"
|
||||
ONLY_CACHE: "false"
|
||||
|
|
@ -53,7 +53,8 @@ jobs:
|
|||
libffi-dev libxcb1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-xfixes0-dev \
|
||||
libxcb-keysyms1-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-util0-dev \
|
||||
libxcb-xkb-dev libxcb-sync0-dev libxcb-randr0-dev libx11-xcb-dev libxrender-dev \
|
||||
xutils-dev libva-dev libvdpau-dev python3 python3-pip unzip -y --force-yes && \
|
||||
xutils-dev libva-dev libvdpau-dev libhangul-dev libxklavier-dev libappindicator3-dev \
|
||||
libxtst-dev librsvg2-bin unzip -y --force-yes && \
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
|
||||
sudo apt-get update && \
|
||||
sudo apt-get install gcc-8 g++-8 -y && \
|
||||
|
|
@ -454,18 +455,31 @@ jobs:
|
|||
cd ..
|
||||
rm -rf wayland
|
||||
|
||||
- name: Qt 5.12.5 cache.
|
||||
- name: Libwayland Protocols.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b 1.16 https://gitlab.freedesktop.org/wayland/wayland-protocols
|
||||
cd wayland-protocols
|
||||
./autogen.sh
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
cd ..
|
||||
rm -rf wayland-protocols
|
||||
|
||||
- name: Qt 5.12.8 cache.
|
||||
id: cache-qt
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ env.LibrariesPath }}/qt-cache
|
||||
key: ${{ runner.OS }}-qt-${{ env.CACHE_KEY }}-${{ hashFiles('**/qtbase_5_12_5_appimage.diff') }}
|
||||
- name: Qt 5.12.5 build.
|
||||
key: ${{ runner.OS }}-qt-${{ env.CACHE_KEY }}-${{ hashFiles('**/qtbase_5_12_8_appimage.diff') }}
|
||||
- name: Qt 5.12.8 build.
|
||||
if: steps.cache-qt.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b v5.12.5 --depth=1 git://code.qt.io/qt/qt5.git qt_${QT}
|
||||
git clone -b v5.12.8 --depth=1 git://code.qt.io/qt/qt5.git qt_${QT}
|
||||
cd qt_${QT}
|
||||
perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg
|
||||
git submodule update qtbase qtwayland qtimageformats qtsvg
|
||||
|
|
@ -492,7 +506,7 @@ jobs:
|
|||
sudo make INSTALL_ROOT="$LibrariesPath/qt-cache" install
|
||||
cd ..
|
||||
rm -rf qt_${QT}
|
||||
- name: Qt 5.12.5 install.
|
||||
- name: Qt 5.12.8 install.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
sudo cp -R qt-cache/. /
|
||||
|
|
@ -525,6 +539,50 @@ jobs:
|
|||
cd ..
|
||||
rm -rf fcitx-qt5
|
||||
|
||||
- name: Hime.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone $GIT/hime-ime/hime.git
|
||||
cd hime
|
||||
git checkout 7525645
|
||||
# disable all but xim
|
||||
./configure \
|
||||
--disable-nls \
|
||||
--disable-system-tray \
|
||||
--disable-tsin \
|
||||
--disable-gtk2-im-module \
|
||||
--disable-gtk3-im-module \
|
||||
--disable-qt4-immodule \
|
||||
--disable-anthy \
|
||||
--disable-chewing \
|
||||
--disable-appindicator \
|
||||
--disable-lib64 \
|
||||
--qt5-im-module-path=/usr/local/plugins/platforminputcontexts
|
||||
make
|
||||
sudo make install
|
||||
cd ..
|
||||
rm -rf hime
|
||||
|
||||
- name: Nimf.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone $GIT/hamonikr/nimf.git
|
||||
cd nimf
|
||||
git checkout 01ae33c
|
||||
git apply ../../$REPO_NAME/Telegram/Patches/nimf.diff
|
||||
meson build . \
|
||||
-Denable_gtk_doc=false \
|
||||
-Dwith_nimf_anthy=false \
|
||||
-Dwith_nimf_rime=false \
|
||||
-Dwith_nimf_m17n=false \
|
||||
-Dwith_nimf_qt4=false
|
||||
ninja -C build modules/clients/qt5/libqt5im_nimf.so
|
||||
sudo install -D build/modules/clients/qt5/libqt5im_nimf.so /usr/local/plugins/platforminputcontexts/libqt5im_nimf.so
|
||||
cd ..
|
||||
rm -rf nimf
|
||||
|
||||
- name: LibDBusMenu Qt.
|
||||
if: env.ONLY_CACHE == 'false'
|
||||
run: |
|
||||
|
|
@ -570,8 +628,9 @@ jobs:
|
|||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone --depth=1 $GIT/darealshinji/AppImageKit-checkrt
|
||||
git clone $GIT/darealshinji/AppImageKit-checkrt.git
|
||||
cd AppImageKit-checkrt
|
||||
git checkout a2866fd
|
||||
git apply ../../$REPO_NAME/Telegram/Patches/AppImageKit-checkrt.diff
|
||||
make -j$(nproc)
|
||||
|
||||
|
|
|
|||
63
.github/workflows/appimage.yml
vendored
63
.github/workflows/appimage.yml
vendored
|
|
@ -60,7 +60,8 @@ jobs:
|
|||
libffi-dev libxcb1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-xfixes0-dev \
|
||||
libxcb-keysyms1-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-util0-dev \
|
||||
libxcb-xkb-dev libxcb-sync0-dev libxcb-randr0-dev libx11-xcb-dev libxrender-dev \
|
||||
xutils-dev libva-dev libvdpau-dev python3 python3-pip unzip -y --force-yes && \
|
||||
xutils-dev libva-dev libvdpau-dev libhangul-dev libxklavier-dev libappindicator3-dev \
|
||||
libxtst-dev librsvg2-bin unzip -y --force-yes && \
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
|
||||
sudo apt-get update && \
|
||||
sudo apt-get install gcc-8 g++-8 -y && \
|
||||
|
|
@ -461,6 +462,19 @@ jobs:
|
|||
cd ..
|
||||
rm -rf wayland
|
||||
|
||||
- name: Libwayland Protocols.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b 1.16 https://gitlab.freedesktop.org/wayland/wayland-protocols
|
||||
cd wayland-protocols
|
||||
./autogen.sh
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
cd ..
|
||||
rm -rf wayland-protocols
|
||||
|
||||
- name: Qt 5.12.8 cache.
|
||||
id: cache-qt
|
||||
uses: actions/cache@v1
|
||||
|
|
@ -532,6 +546,50 @@ jobs:
|
|||
cd ..
|
||||
rm -rf fcitx-qt5
|
||||
|
||||
- name: Hime.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone $GIT/hime-ime/hime.git
|
||||
cd hime
|
||||
git checkout 7525645
|
||||
# disable all but xim
|
||||
./configure \
|
||||
--disable-nls \
|
||||
--disable-system-tray \
|
||||
--disable-tsin \
|
||||
--disable-gtk2-im-module \
|
||||
--disable-gtk3-im-module \
|
||||
--disable-qt4-immodule \
|
||||
--disable-anthy \
|
||||
--disable-chewing \
|
||||
--disable-appindicator \
|
||||
--disable-lib64 \
|
||||
--qt5-im-module-path=/usr/local/plugins/platforminputcontexts
|
||||
make
|
||||
sudo make install
|
||||
cd ..
|
||||
rm -rf hime
|
||||
|
||||
- name: Nimf.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone $GIT/hamonikr/nimf.git
|
||||
cd nimf
|
||||
git checkout 01ae33c
|
||||
git apply ../../$REPO_NAME/Telegram/Patches/nimf.diff
|
||||
meson build . \
|
||||
-Denable_gtk_doc=false \
|
||||
-Dwith_nimf_anthy=false \
|
||||
-Dwith_nimf_rime=false \
|
||||
-Dwith_nimf_m17n=false \
|
||||
-Dwith_nimf_qt4=false
|
||||
ninja -C build modules/clients/qt5/libqt5im_nimf.so
|
||||
sudo install -D build/modules/clients/qt5/libqt5im_nimf.so /usr/local/plugins/platforminputcontexts/libqt5im_nimf.so
|
||||
cd ..
|
||||
rm -rf nimf
|
||||
|
||||
- name: LibDBusMenu Qt.
|
||||
if: env.ONLY_CACHE == 'false'
|
||||
run: |
|
||||
|
|
@ -575,8 +633,9 @@ jobs:
|
|||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone --depth=1 $GIT/darealshinji/AppImageKit-checkrt
|
||||
git clone $GIT/darealshinji/AppImageKit-checkrt.git
|
||||
cd AppImageKit-checkrt
|
||||
git checkout a2866fd
|
||||
git apply ../../$REPO_NAME/Telegram/Patches/AppImageKit-checkrt.diff
|
||||
make -j$(nproc)
|
||||
|
||||
|
|
|
|||
49
Telegram/Patches/nimf.diff
Normal file
49
Telegram/Patches/nimf.diff
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
diff --git a/modules/clients/qt5/meson.build b/modules/clients/qt5/meson.build
|
||||
index 40cc467..29af7ac 100644
|
||||
--- a/modules/clients/qt5/meson.build
|
||||
+++ b/modules/clients/qt5/meson.build
|
||||
@@ -2,6 +2,7 @@ qt5 = import('qt5')
|
||||
qt5_deps = dependency('qt5', modules: ['Core', 'Gui', 'Widgets'])
|
||||
qt5_core = dependency('Qt5Core')
|
||||
qt5_version = qt5_core.version()
|
||||
+qt5_prefix = qt5_core.get_pkgconfig_variable('prefix')
|
||||
qt5_inc = qt5_core.get_pkgconfig_variable('includedir')
|
||||
qt5_libdir = qt5_core.get_pkgconfig_variable('libdir')
|
||||
|
||||
@@ -13,6 +14,9 @@ if run_command('[', '-d', qt5_libdir + '/qt5', ']').returncode() == 0
|
||||
# elif fs.is_dir(qt5_libdir + '/qt')
|
||||
elif run_command('[', '-d', qt5_libdir + '/qt', ']').returncode() == 0
|
||||
qt5_im_module_dir = qt5_libdir + '/qt/plugins/platforminputcontexts'
|
||||
+# elif fs.is_dir(qt5_libdir + '/plugins')
|
||||
+elif run_command('[', '-d', qt5_prefix + '/plugins', ']').returncode() == 0
|
||||
+ qt5_im_module_dir = qt5_prefix + '/plugins/platforminputcontexts'
|
||||
else
|
||||
error('Can not determine Qt5 plugins/platforminputcontexts directory')
|
||||
endif
|
||||
@@ -26,14 +30,18 @@ moc_files = qt5.preprocess(moc_sources : 'im-nimf-qt5.cpp',
|
||||
moc_extra_arguments: ['-DMAKES_MY_MOC_HEADER_COMPILE'],
|
||||
include_directories: include_directories(qt5_core_private_inc, qt5_gui_private_inc))
|
||||
|
||||
+cc = meson.get_compiler('c')
|
||||
+
|
||||
cpp_args = [
|
||||
'-DG_LOG_DOMAIN="nimf"',
|
||||
'-DNIMF_COMPILATION',
|
||||
+ '-DUSE_DLFCN',
|
||||
'-DQT_NO_KEYWORDS',
|
||||
'-fPIC'
|
||||
]
|
||||
|
||||
deps = [qt5_deps,
|
||||
+ cc.find_library('dl'),
|
||||
dependency('glib-2.0'),
|
||||
dependency('gobject-2.0'),
|
||||
dependency('gio-2.0')]
|
||||
@@ -43,7 +51,6 @@ shared_library('qt5im_nimf',
|
||||
include_directories: inc,
|
||||
cpp_args : cpp_args,
|
||||
cpp_std : 'c++11',
|
||||
- link_with: libnimf,
|
||||
dependencies : deps,
|
||||
install : true,
|
||||
install_dir : qt5_im_module_dir)
|
||||
Loading…
Add table
Reference in a new issue