Bundle Enchant/Hunspell into AppImage spellcheck

This commit is contained in:
2026-04-07 14:33:38 -06:00
parent 0052b6589e
commit 8e8e075d84

View File

@@ -31,6 +31,7 @@ jobs:
libcanberra-dev libdbus-glib-1-dev libglib2.0-dev \
libarchive-dev \
libgtk-3-dev \
libenchant-2-2 libenchant-2-dev hunspell-en-us \
libwayland-client0 libwayland-cursor0 libwayland-egl1 \
libxkbcommon0 \
libgtk-3-bin libglib2.0-bin shared-mime-info gsettings-desktop-schemas \
@@ -125,6 +126,26 @@ jobs:
cp -a /usr/lib/gtk-3.0/modules AppDir/usr/lib/gtk-3.0/
fi
if [ -d "/usr/lib/x86_64-linux-gnu/enchant-2" ]; then
install -d AppDir/usr/lib/x86_64-linux-gnu
cp -a /usr/lib/x86_64-linux-gnu/enchant-2 AppDir/usr/lib/x86_64-linux-gnu/
fi
if [ -d "/usr/lib/enchant-2" ]; then
install -d AppDir/usr/lib
cp -a /usr/lib/enchant-2 AppDir/usr/lib/
fi
if [ -d "/usr/share/enchant-2" ]; then
install -d AppDir/usr/share
cp -a /usr/share/enchant-2 AppDir/usr/share/
fi
if [ -d "/usr/share/hunspell" ]; then
install -d AppDir/usr/share
cp -a /usr/share/hunspell AppDir/usr/share/
fi
- name: Verify bundled plugins
run: |
set -eux
@@ -192,6 +213,21 @@ jobs:
export ZOITECHAT_LIBDIR="$APPDIR/usr/lib/zoitechat/plugins"
fi
if [ -d "$APPDIR/usr/lib/x86_64-linux-gnu/enchant-2" ]; then
export ENCHANT_MODULE_DIR="$APPDIR/usr/lib/x86_64-linux-gnu/enchant-2"
elif [ -d "$APPDIR/usr/lib/enchant-2" ]; then
export ENCHANT_MODULE_DIR="$APPDIR/usr/lib/enchant-2"
fi
if [ -d "$APPDIR/usr/share/enchant-2" ]; then
export ENCHANT_DATA_DIR="$APPDIR/usr/share/enchant-2"
export ENCHANT_CONFIG_DIR="$APPDIR/usr/share/enchant-2"
fi
if [ -d "$APPDIR/usr/share/hunspell" ]; then
export DICPATH="$APPDIR/usr/share/hunspell${DICPATH:+:$DICPATH}"
fi
if [ -d "$APPDIR/usr/share/glib-2.0/schemas" ]; then
export GSETTINGS_SCHEMA_DIR="$APPDIR/usr/share/glib-2.0/schemas${GSETTINGS_SCHEMA_DIR:+:$GSETTINGS_SCHEMA_DIR}"
fi