Skip to content

Set runpath of QML plugins on Linux #26

Set runpath of QML plugins on Linux

Set runpath of QML plugins on Linux #26

name: "Linux (AppImage) CI"
on:
push:
branches:
- '**'
release:
types: [published]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '6.6.3'
target: 'desktop'
arch: 'gcc_64'
cache: true
modules: 'qt3d qtcharts qtconnectivity qtdatavis3d qtgraphs qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3dphysics qtquickeffectmaker qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtspeech qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview qt5compat qtquick3d qtquicktimeline qtshadertools'
- name: Install QCoro
uses: theCheeseboard/actions/build-cmake-project@actions
with:
project: danvratil/qcoro
commitish: v0.10.0
- name: Install libcontemporary
uses: theCheeseboard/actions/build-cmake-project@actions
with:
project: theCheeseboard/libcontemporary
commitish: features/qml
- name: Install contemporary-qml
uses: theCheeseboard/actions/build-cmake-project@actions
with:
project: theCheeseboard/contemporary-qml
commitish: main
- name: Install theterminal
id: theterminal
uses: theCheeseboard/actions/build-cmake-project@actions
with:
project: .
commitish: .
- name: Deploy theterminal
env:
SOURCE_DIRECTORY: ${{ steps.theterminal.outputs.source-directory }}
BUILD_DIRECTORY: ${{ steps.theterminal.outputs.build-directory }}
INSTALL_DIRECTORY: ${{ steps.theterminal.outputs.install-directory }}
run: |
rm $QT_PLUGIN_PATH/sqldrivers/libqsqlmimer.so
sudo apt-get install libfuse2 libxcb-cursor0
curl https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage -o linuxdeployqt -L
chmod +x ./linuxdeployqt
mkdir -p ./appdir/usr
mv "$INSTALL_DIRECTORY/"* ./appdir/usr
find ./appdir/usr/qml -type f | while read -r elf
do
# Check if elf is an executable
if file "${elf}" | grep -q ELF; then
path_to_lib=$(realpath --relative-to="$(dirname "${elf}")" ./appdir/usr)
echo "Setting RUNPATH of ${elf} to ${path_to_lib}"
patchelf --set-rpath "${path_to_lib}" "${elf}"
fi
done
mkdir -p ./appdir/usr/share/doc/libc6/
touch ./appdir/usr/share/doc/libc6/copyright
./linuxdeployqt ./appdir/usr/share/applications/*.desktop -appimage -qmldir="$SOURCE_DIRECTORY" -unsupported-allow-new-glibc
- name: Upload theterminal artifact
uses: actions/upload-artifact@v4
with:
name: theterminal-linux
path: "*.AppImage"