41 lines
1.2 KiB
Bash
Executable File
41 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
case "$SNAP_ARCH" in
|
|
*86)
|
|
ARCH="i386-linux-gnu"
|
|
;;
|
|
*64)
|
|
ARCH="x86_64-linux-gnu"
|
|
;;
|
|
*)
|
|
ARCH="$SNAP_ARCH-linux-gnu"
|
|
;;
|
|
esac
|
|
|
|
|
|
export HOME="$SNAP_USER_DATA"
|
|
cd
|
|
|
|
export LD_LIBRARY_PATH="$SNAP/usr/lib/$ARCH/pulseaudio:$LD_LIBRARY_PATH"
|
|
export LD_LIBRARY_PATH="$SNAP/usr/lib/$ARCH/dri:$LD_LIBRARY_PATH"
|
|
export LD_LIBRARY_PATH="$SNAP/usr/lib/$ARCH/qt5/libs:$LD_LIBRARY_PATH"
|
|
export QT_PLUGIN_PATH="$SNAP/usr/lib/$ARCH/qt5/plugins"
|
|
export XDG_DATA_HOME="$SNAP/usr/share"
|
|
export FONTCONFIG_PATH="$SNAP/etc/fonts/config.d"
|
|
export FONTCONFIG_FILE="$SNAP/etc/fonts/fonts.conf"
|
|
export XKB_CONFIG_ROOT="$SNAP/usr/share/X11/xkb"
|
|
# Mesa Libs
|
|
export LD_LIBRARY_PATH="$SNAP/usr/lib/$ARCH/mesa:$LD_LIBRARY_PATH"
|
|
export LD_LIBRARY_PATH="$SNAP/usr/lib/$ARCH/mesa-egl:$LD_LIBRARY_PATH"
|
|
# Tell libGL where to find the drivers
|
|
export LIBGL_DRIVERS_PATH="$SNAP/usr/lib/$ARCH/dri"
|
|
|
|
# Ensure that the Minetest HW/opengl libs are before the snap specific libs
|
|
export LD_LIBRARY_PATH="$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH"
|
|
|
|
# Make sure ~/.minetest is $SNAP_USER_DATA
|
|
if [ ! -e "$SNAP_USER_DATA/.minetest" ]; then
|
|
ln -s . "$SNAP_USER_DATA/.minetest"
|
|
fi
|
|
|
|
exec "$SNAP/bin/minetest" "$@"
|