virt-viewer/ci/appimage.yml
Rafael Gieschke a074953cdc wip
2024-11-18 18:55:35 +01:00

102 lines
4.6 KiB
YAML

image: rockylinux:9
variables:
GIT_STRATEGY: clone
stages:
- build_appimage
build-appimage-job:
stage: build_appimage
script:
- dnf install -y epel-release
- dnf --enablerepo=crb install -y
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
python3-pip
- pip3 install meson ninja pyparsing six
- 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
- git clone https://github.com/GNOME/glib.git
- meson setup -Dsysprof=enabled -Dglib_debug=disabled --prefix=/usr glib/build glib
- ninja -C glib/build install
- git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git
- meson setup -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 gstreamer/build gstreamer
- ninja -C gstreamer/build install
- git clone -b new_video_codecs https://gitlab.uni-freiburg.de/opensourcevdi/spice-protocol.git
- meson setup --prefix=/usr spice-protocol/build spice-protocol
- ninja -C spice-protocol/build install
- git clone -b queueu_remove_experiment https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk.git
- meson setup -Dwayland-protocols=enabled -Dbuiltin-mjpeg=false -Dopus=enabled -Dgtk=enabled --prefix=/usr --debug --buildtype=debug spice-gtk/build spice-gtk
- ninja -C spice-gtk/build 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