mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-13 09:10:20 +00:00
fix: source AppRun hook scripts so GTK runtime setup actually runs in AppImage
This commit is contained in:
31
.github/workflows/appimage-build.yml
vendored
31
.github/workflows/appimage-build.yml
vendored
@@ -36,6 +36,7 @@ jobs:
|
||||
libgtk-3-bin libglib2.0-bin shared-mime-info gsettings-desktop-schemas \
|
||||
libluajit-5.1-dev libpci-dev libperl-dev libssl-dev libayatana-appindicator3-dev \
|
||||
perl python3 python3-minimal python3-dev python3-cffi mono-devel desktop-file-utils \
|
||||
fonts-noto-color-emoji \
|
||||
patchelf file curl
|
||||
|
||||
- name: Configure
|
||||
@@ -104,6 +105,16 @@ jobs:
|
||||
cp -a /usr/lib/x86_64-linux-gnu/libpython3*.so* AppDir/usr/lib/x86_64-linux-gnu/
|
||||
fi
|
||||
|
||||
if [ -d "/usr/share/gtk-3.0/emoji" ]; then
|
||||
install -d AppDir/usr/share/gtk-3.0
|
||||
cp -a /usr/share/gtk-3.0/emoji AppDir/usr/share/gtk-3.0/
|
||||
fi
|
||||
|
||||
if [ -f "/usr/share/fonts/truetype/noto/NotoColorEmoji.ttf" ]; then
|
||||
install -d AppDir/usr/share/fonts/truetype/noto
|
||||
cp -a /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf AppDir/usr/share/fonts/truetype/noto/
|
||||
fi
|
||||
|
||||
- name: Verify bundled plugins
|
||||
run: |
|
||||
set -eux
|
||||
@@ -144,6 +155,16 @@ jobs:
|
||||
export PATH="${PATH:-/usr/bin:/bin}:$APPDIR/usr/bin"
|
||||
export LD_LIBRARY_PATH="$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}"
|
||||
export XDG_DATA_DIRS="$APPDIR/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
|
||||
export GTK_EXE_PREFIX="$APPDIR/usr"
|
||||
export GTK_DATA_PREFIX="$APPDIR/usr"
|
||||
|
||||
if [ -d "$APPDIR/etc/fonts" ]; then
|
||||
export FONTCONFIG_SYSROOT="$APPDIR"
|
||||
export FONTCONFIG_PATH="$APPDIR/etc/fonts${FONTCONFIG_PATH:+:$FONTCONFIG_PATH}"
|
||||
if [ -f "$APPDIR/etc/fonts/fonts.conf" ]; then
|
||||
export FONTCONFIG_FILE="$APPDIR/etc/fonts/fonts.conf"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$APPDIR/usr/lib/x86_64-linux-gnu/zoitechat/plugins" ]; then
|
||||
export ZOITECHAT_LIBDIR="$APPDIR/usr/lib/x86_64-linux-gnu/zoitechat/plugins"
|
||||
@@ -192,6 +213,16 @@ jobs:
|
||||
fi
|
||||
fi
|
||||
|
||||
for hook_dir in "$APPDIR/apprun-hooks" "$APPDIR/usr/apprun-hooks"; do
|
||||
if [ -d "$hook_dir" ]; then
|
||||
for hook in "$hook_dir"/*.sh; do
|
||||
if [ -f "$hook" ]; then
|
||||
. "$hook"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
exec "$APPDIR/usr/bin/zoitechat" "$@"
|
||||
EOF
|
||||
chmod +x AppRun
|
||||
|
||||
Reference in New Issue
Block a user