File: AppRun.in

package info (click to toggle)
musescore3 3.2.3%2Bdfsg2-21
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 219,852 kB
  • sloc: cpp: 291,412; xml: 200,226; sh: 3,779; ansic: 1,447; python: 393; makefile: 246; perl: 82; pascal: 79
file content (37 lines) | stat: -rw-r--r-- 1,390 bytes parent folder | download | duplicates (11)
1
2
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
28
29
30
31
32
33
34
35
36
37
#!/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"

# Workaround for Jack library
# Based on the solution https://github.com/LMMS/lmms/pull/3958/files
if ldconfig -p | grep libjack.so.0 > /dev/null 2>&1; then
   echo "Jack appears to be installed on this system, so we'll use it."
else
   echo "Jack does not appear to be installed.  That's OK, we'll use a dummy version instead."
   export LD_LIBRARY_PATH="${APPDIR}/optional:${LD_LIBRARY_PATH}"
fi

# 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 $?