Skip to content

Commit

Permalink
Change AppImage packager to patch libqxcb.so's runpath instead of LD_…
Browse files Browse the repository at this point in the history
…LIBRARY_PATH workaround
  • Loading branch information
brkzlr committed Jun 3, 2024
1 parent 013cd34 commit ba0744f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt install libfuse2 libmpc-dev libmpfr-dev gmpc-dev appstream qt6-l10n-tools libcairo2-dev libgirepository1.0-dev
run: sudo apt install libfuse2 libmpc-dev libmpfr-dev gmpc-dev appstream qt6-l10n-tools libcairo2-dev libgirepository1.0-dev patchelf
- name: Build
run: |
export ARCH=x86_64
Expand Down
5 changes: 4 additions & 1 deletion ci/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,13 @@ if [ "$(id -u)" != "0" ]; then
fi
export APPDIR="$(dirname "$0")"
export PYTHONHOME=$APPDIR/usr/conda
LD_LIBRARY_PATH=$PYTHONHOME/lib $APPDIR/usr/bin/python3 $APPDIR/opt/PINCE/PINCE.py
$APPDIR/usr/bin/python3 $APPDIR/opt/PINCE/PINCE.py
EOF
chmod +x AppRun.sh

# Patch libqxcb's runpath (not rpath) to point to our packaged libxcb-cursor to fix X11 issues
patchelf --add-rpath "\$ORIGIN/../../../../../../" AppDir/usr/conda/lib/python3.12/site-packages/PyQt6/Qt6/plugins/platforms/libqxcb.so

# Package AppDir into AppImage
export LD_LIBRARY_PATH="$(readlink -f ./AppDir/usr/conda/lib)"
$DEPLOYTOOL --appdir AppDir/ --output appimage --custom-apprun AppRun.sh || exit_on_failure

0 comments on commit ba0744f

Please sign in to comment.