launch_lmms.sh 1.1 KB

12345678910111213141516171819202122232425
  1. #!/usr/bin/env bash
  2. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  3. export PATH="$PATH:/sbin"
  4. if command -v carla > /dev/null 2>&1; then
  5. CARLAPATH="$(command -v carla)"
  6. CARLAPREFIX="${CARLAPATH%/bin*}"
  7. echo "Carla appears to be installed on this system at $CARLAPREFIX/lib[64]/carla so we'll use it."
  8. export LD_LIBRARY_PATH=$CARLAPREFIX/lib/carla:$CARLAPREFIX/lib64/carla:$LD_LIBRARY_PATH
  9. else
  10. echo "Carla does not appear to be installed. That's OK, please ignore any related library errors."
  11. fi
  12. export LD_LIBRARY_PATH=$DIR/usr/lib/:$DIR/usr/lib/lmms:$LD_LIBRARY_PATH
  13. # Prevent segfault on VirualBox
  14. if lsmod |grep vboxguest > /dev/null 2>&1; then
  15. echo "VirtualBox detected. Forcing libgl software rendering."
  16. export LIBGL_ALWAYS_SOFTWARE=1;
  17. fi
  18. if ldconfig -p | grep libjack.so.0 > /dev/null 2>&1; then
  19. echo "Jack appears to be installed on this system, so we'll use it."
  20. else
  21. echo "Jack does not appear to be installed. That's OK, we'll use a dummy version instead."
  22. export LD_LIBRARY_PATH=$DIR/usr/lib/lmms/optional:$LD_LIBRARY_PATH
  23. fi
  24. QT_X11_NO_NATIVE_MENUBAR=1 "$DIR"/usr/bin/lmms.real "$@"