image: rockylinux:9 variables: GIT_STRATEGY: clone stages: - build_appimage build-appimage-job: stage: build_appimage script: - dnf install epel-release -y - dnf --enablerepo=crb install wget git gcc gcc-c++ flex bison wayland-devel openssl-devel gtk3-devel libdrm-devel openssl-devel gtk3-devel opus-devel libcurl-devel file libjpeg-turbo-devel nasm libva-utils patchelf intel-mediasdk-devel libgudev-devel libva-devel -y - vvsrc=$(pwd) - mkdir /home/code - cd /home/code - wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage - wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage - wget https://bootstrap.pypa.io/get-pip.py - python3 get-pip.py - pip install meson ninja pyparsing six - git clone -b queueu_remove_experiment https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk.git; - git clone -b new_video_codecs https://gitlab.uni-freiburg.de/opensourcevdi/spice-protocol.git; - git clone -b code_selection https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer.git; - git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git; - git clone https://github.com/GNOME/glib.git - cd /home/ - mkdir AppDir - cd /home/code/glib; - meson setup -Dsysprof=enabled -Dglib_debug=disabled --prefix=/usr build - cd build; - ninja install; - cd /home/code/gstreamer; - meson -Dbad=enabled -Dgst-plugins-base:pango=disabled -Dgst-plugins-good:jpeg=disabled -Dgst-plugins-bad:openjpeg=disabled -Dgst-plugins-bad:jpegformat=disabled -Dgst-plugins-bad:va=enabled -Dgst-plugins-bad:wayland=enabled -Dgst-plugins-bad:msdk=enabled -Dgst-plugins-bad:aja=disabled -Dgst-plugins-base:opus=disabled -Dgpl=enabled --prefix=/usr build; - cd build; - ninja install; - cd /home/code/spice-protocol; - meson --prefix=/usr build; - cd build; - ninja install; - cd /home/code/spice-gtk; - meson -Dwayland-protocols=enabled -Dbuiltin-mjpeg=false -Dopus=enabled -Dgtk=enabled --prefix=/usr --debug --buildtype=debug build; - cd build; - ninja install; - cd $vvsrc - DESTDIR=/home/AppDir meson -Dspice=enabled --prefix=/usr --debug --buildtype=debug build; - cd build; - DESTDIR=/home/AppDir ninja install; - cd /home/code - chmod +x linuxdeploy-x86_64.AppImage; - chmod +x linuxdeploy-plugin-appimage-x86_64.AppImage; - (mkdir linuxdeploy; cd linuxdeploy; ../linuxdeploy-x86_64.AppImage --appimage-extract;) - (mkdir linuxdeploy-plugin-appimage; cd linuxdeploy-plugin-appimage; ../linuxdeploy-plugin-appimage-x86_64.AppImage --appimage-extract;) - ln -s linuxdeploy/linuxdeploy-plugin-appimage/squashfs-root/AppRun linuxdeploy/squashfs-root/linuxdeploy-plugin-appimage; - cd linuxdeploy/squashfs-root - wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gstreamer/refs/heads/master/linuxdeploy-plugin-gstreamer.sh - wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh - chmod +x linuxdeploy-plugin-gstreamer.sh - chmod +x linuxdeploy-plugin-gtk.sh # patch both plugins to accept an exclude library env variable - APPEND_TEXT=' --exclude-library "$LINUXDEPLOY_EXCLUDE_LIBRARY"' - sed -i '/"$LINUXDEPLOY" --appdir "$APPDIR"/s|$|'"$APPEND_TEXT"'|' /home/code/linuxdeploy/squashfs-root/linuxdeploy-plugin-gstreamer.sh - sed -i '/env LINUXDEPLOY_PLUGIN_MODE=1 "$LINUXDEPLOY" --appdir="$APPDIR" "${LIBRARIES[@]}"/s|$|'"$APPEND_TEXT"'|' /home/code/linuxdeploy/squashfs-root/linuxdeploy-plugin-gtk.sh # remove the GDK_BACKEND variable, since it prevents autoscaling on wayland (and it doesn't crash on wayland) - sed -i '/export GDK_BACKEND=x11 \# Crash with Wayland backend on Wayland/d' /home/code/linuxdeploy/squashfs-root/linuxdeploy-plugin-gtk.sh - sed -i '/env LINUXDEPLOY_PLUGIN_MODE=1 "$LINUXDEPLOY" --appdir="$APPDIR"/s|\(--appdir="$APPDIR"\)|\1'test'|' /home/code/linuxdeploy/squashfs-root/linuxdeploy-plugin-gtk.sh - export LINUXDEPLOY_EXCLUDE_LIBRARY="*libva*"; - ./AppRun --appdir /home/AppDir/ --exclude-library ${LINUXDEPLOY_EXCLUDE_LIBRARY} --plugin gtk; - GSTREAMER_PLUGINS_DIR=/usr/lib64/gstreamer-1.0 GSTREAMER_HELPERS_DIR=/usr/libexec/gstreamer-1.0 GSTREAMER_INCLUDE_BAD_PLUGINS=1 NO_STRIP=1 ./AppRun --appdir /home/AppDir/ --exclude-library ${LINUXDEPLOY_EXCLUDE_LIBRARY} --plugin gstreamer; - ./AppRun --appdir /home/AppDir/ --exclude-library ${LINUXDEPLOY_EXCLUDE_LIBRARY} --output appimage; - mv Remote_Viewer-x86_64.AppImage $vvsrc artifacts: paths: - Remote_Viewer-x86_64.AppImage