Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (36 sloc) 1.46 KB
#############################
# QT launcher specific part #
#############################
# select qt version
. $SNAP/flavor-select
export QTCHOOSER_NO_GLOBAL_DIR=1
if [ "$USE_qt5" = true ]; then
# QT_SELECT not exported by ubuntu app platform runtime
if [ -z "$QT_SELECT" ]; then
export QT_SELECT=snappy-qt5
fi
else
export QT_SELECT=snappy-qt4
fi
# Removes Qt warning: Could not find a location
# of the system Compose files
export QTCOMPOSE=$RUNTIME/usr/share/X11/locale
# Qt Libs, Modules and helpers
if [ "$USE_qt5" = true ]; then
export QT_PLUGIN_PATH=$RUNTIME/usr/lib/$ARCH/qt5/plugins
export QML2_IMPORT_PATH=$RUNTIME/lib/$ARCH:$RUNTIME/usr/lib/$ARCH/qt5/qml:$QML2_IMPORT_PATH
# Try to use qtubuntu-print plugin, if not found Qt will fallback to the first found (usually cups plugin)
export QT_PRINTER_MODULE=qtubuntu-print
[ "$WITH_RUNTIME" = yes ] && QML2_IMPORT_PATH=$SNAP/lib/$ARCH:$SNAP/usr/lib/$ARCH/qt5/qml:$QML2_IMPORT_PATH
PATH=$RUNTIME/usr/lib/$ARCH/qt5/bin:$PATH
# If a X11 $DISPLAY variable is set we should use it
export QT_QPA_PLATFORM=xcb
export QT_QPA_PLATFORMTHEME=appmenu-qt5
else
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/$ARCH/qt4
export QT_PLUGIN_PATH=$SNAP/usr/lib/$ARCH/qt4/plugins
export QML_IMPORT_PATH=$SNAP/usr/lib/$ARCH/qt4/qml:$SNAP/lib/$ARCH:$QML_IMPORT_PATH
PATH=$SNAP/usr/lib/$ARCH/qt4/bin:$PATH
fi
# Use GTK styling for running under the GNOME desktop
export GTK_PATH=$RUNTIME/usr/lib/$ARCH/gtk-2.0