qt: playlist: use item title if available
[vlc.git] / extras / package / snap / vlc-snap-wrapper.sh
1 #!/bin/bash
2 case "$SNAP_ARCH" in
3         "amd64") ARCH='x86_64-linux-gnu'
4         ;;
5         "i386") ARCH='i386-linux-gnu'
6         ;;
7         *)
8                 echo "Unsupported architecture for this app build"
9                 exit 1
10         ;;
11 esac
12
13 VENDOR=$(glxinfo | grep "OpenGL vendor")
14
15 if [[ $VENDOR == *"Intel"* ]]; then
16   export VDPAU_DRIVER_PATH="$SNAP/usr/lib/$ARCH/dri"
17   export LIBVA_DRIVERS_PATH="$SNAP/usr/lib/$ARCH/dri"
18 fi
19
20 if [[ $VENDOR == *"NVIDIA"* ]]; then
21   export VDPAU_DRIVER_PATH="/var/lib/snapd/lib/gl/vdpau"
22 elif [[ $VENDOR == *"X.Org"* ]]; then
23   export VDPAU_DRIVER_PATH="/usr/lib/$ARCH/vdpau/"
24 fi
25
26 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/vlc"
27
28 # KDE specific
29 ## Do not start slaves through klauncher but fork them directly.
30 export KDE_FORK_SLAVES=1
31 ## Neon PATCH! make KIO look for slaves in a dynamic location depending on $SNAP
32 export KF5_LIBEXEC_DIR=$SNAP/usr/lib/$ARCH/libexec/kf5
33
34 # set QML2 import path for Qt UI
35 export QML2_IMPORT_PATH="$QML2_IMPORT_PATH:$SNAP/usr/lib/x86_64-linux-gnu/qt5/qml/"
36
37 exec $SNAP/usr/bin/vlc --config=$SNAP_USER_COMMON/vlcrc "$@"