summarylogtreecommitdiffstats
path: root/moonplayer.sh
blob: f03007fc2fc808c11a96afb863f7a050e3d95447 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
set -o pipefail
_APPDIR="/usr/lib/@appname@"
_RUNNAME="${_APPDIR}/bin/@runname@"
export PATH="${_APPDIR}:${_APPDIR}/bin+:${PATH}"
export LD_LIBRARY_PATH="${_APPDIR}/lib+:${LD_LIBRARY_PATH}"
export QT_QPA_PLATFORM_PLUGIN_PATH="${_APPDIR}/plugins+:${QT_QPA_PLATFORM_PLUGIN_PATH}"
export QML_IMPORT_PATH="${_APPDIR}/qml+:${QML2_IMPORT_PATH}"
export QML2_IMPORT_PATH="${_APPDIR}/qml+:${QML2_IMPORT_PATH}"
case "${XDG_CURRENT_DESKTOP}" in
    *GNOME*|*gnome*|*XFCE*)
        export QT_QPA_PLATFORMTHEME=gtk2
        ;;
esac
cd "${_APPDIR}"
exec "${_RUNNAME}" "$@" || exit $?