~ubuntu-branches/ubuntu/utopic/ardour3/utopic

« back to all changes in this revision

Viewing changes to gtk2_ardour/ardour.sh.in

  • Committer: Package Import Robot
  • Author(s): Felipe Sateler
  • Date: 2013-09-21 19:05:02 UTC
  • Revision ID: package-import@ubuntu.com-20130921190502-8gsftrku6jnzhd7v
Tags: upstream-3.4~dfsg
ImportĀ upstreamĀ versionĀ 3.4~dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
#
 
4
# This script runs an installed version of Ardour. It sets a few environment variables
 
5
# and does a few checks before exec'ing the real executable.
 
6
 
7
 
 
8
export GTK_PATH=@SYSCONFDIR@/ardour3:@LIBDIR@/ardour3${GTK_PATH:+:$GTK_PATH}
 
9
 
 
10
export LD_LIBRARY_PATH=@LIBDIR@/ardour3${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
 
11
 
 
12
## Memlock check
 
13
 
 
14
MLOCK_LIMIT=$(ulimit -l)
 
15
if [ "$MLOCK_LIMIT" != "unlimited" ]; then
 
16
        echo "WARNING: Your system has a limit for maximum amount of locked memory!"
 
17
        echo "         This might cause Ardour to run out of memory before your system runs"
 
18
        echo "         out of memory. You can view the memory limit with 'ulimit -l', and it"
 
19
        echo "         is normally controlled by /etc/security/limits.conf"
 
20
        echo ""
 
21
 
 
22
fi
 
23
 
 
24
## Glib atomic test
 
25
 
 
26
GLIB=$(ldd @LIBDIR@/ardour3/ardour-@VERSION@ 2> /dev/null | grep glib-2.0 | sed 's/.*=> \([^ ]*\) .*/\1/')
 
27
 
 
28
if [ "$GLIB" = "" ]; then
 
29
        echo "WARNING: Could not check your glib-2.0 for mutex locking atomic operations."
 
30
        echo ""
 
31
elif [ $(nm -D --radix=dec --defined-only -S $GLIB | grep -w g_atomic_int_add | cut -d ' ' -f 2) -gt 32 ]; then
 
32
        echo "WARNING: Your system contains a suspect libglib-2.0. Your version might be built"
 
33
        echo "         to use mutex locking atomic operations. This is a fallback solution to"
 
34
        echo "         a more robust hardware supported atomicity. It might cause reduced "
 
35
        echo "         performance and/or deadlocks. Please contact your distribution support"
 
36
        echo "         about this issue."
 
37
        echo "         Unfortunately this check is not 100% accurate, so this might not be"
 
38
        echo "         the case with your system."
 
39
        echo ""
 
40
fi
 
41
 
 
42
#
 
43
# Running Ardour requires these 3 variables to be set
 
44
#
 
45
 
 
46
export ARDOUR_DATA_PATH=@DATADIR@/ardour3
 
47
export ARDOUR_CONFIG_PATH=@SYSCONFDIR@/ardour3
 
48
export ARDOUR_DLL_PATH=@LIBDIR@/ardour3
 
49
 
 
50
#
 
51
# VAMP has its own lookup path
 
52
 
53
 
 
54
export VAMP_PATH=@LIBDIR@/ardour3/vamp
 
55
 
 
56
if [ $# -gt 0 ] ; then
 
57
    case $1 in
 
58
        -g|--gdb) GDB=gdb; shift ;;
 
59
    esac
 
60
fi
 
61
 
 
62
exec $GDB @LIBDIR@/ardour3/ardour-@VERSION@ "$@"
 
63
 
 
64