| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 
 | #!/bin/bash
# TODO: rewrite this file in a faster, more portable language (e.g. C)
# APPDIR and APPIMAGE are environment variables which are set when the user
# runs the AppImage. They won't be set if you try to run this outside of an
# AppImage, so here we set them to something sensible instead for testing.
[  "${APPDIR}"  ] || export APPDIR="$(dirname "$(readlink -f "${0}")")"
[ "${APPIMAGE}" ] || export APPIMAGE="${APPDIR}/AppRun"
libs="${APPDIR}/lib"
# Setting LD_LIBRARY_PATH won't override AppImage libraries, but advanced users
# can do that with APPIMAGE_LIBRARY_PATH if they really want to.
export LD_LIBRARY_PATH="${APPIMAGE_LIBRARY_PATH}:${libs}:${libs}/qt5/lib:${LD_LIBRARY_PATH}"
export QT_STYLE_OVERRIDE="GTK+" # use system font size
case "$1" in
  -h|--help|install|uninstall|remove|man|manual|manpage|check-depends|check-dependencies )
    "${APPDIR}/bin/portable-utils" "$@"
    ;;
  * )
    "${APPDIR}/bin/mscore@MSCORE_INSTALL_SUFFIX@" "$@"
    ;;
esac
exit $?
 |