2010-03-14 11:34:09 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Library directory
|
|
|
|
LIBDIR="lib"
|
|
|
|
|
|
|
|
# If we are launching from a symlink, such as /usr/local/bin/runglest.sh, we need to get where
|
|
|
|
# the symlink points to
|
|
|
|
pth="`readlink $0`"
|
|
|
|
|
|
|
|
# $pth will be empty if our start path wasnt a symlink
|
|
|
|
if [ $pth ]; then
|
|
|
|
GAMEDIR="`dirname $pth`"
|
|
|
|
else
|
|
|
|
GAMEDIR="`dirname $0`"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# export game library directory
|
|
|
|
test -n "${LIBDIR}" && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GAMEDIR}/${LIBDIR}"
|
|
|
|
|
|
|
|
# now deal with the openal library [libopenal.so.0]
|
|
|
|
hasopenal=`ldconfig -p | grep -m 1 "libopenal.so.0" | cut "-d>" -f2 | cut "-d " -f2`
|
|
|
|
#echo "openal search = [$hasopenal]"
|
|
|
|
if [ -n "$hasopenal" ]; then
|
|
|
|
echo "default openal library was found in [$hasopenal]"
|
|
|
|
else
|
|
|
|
echo "default openal library is missing, attempting to find and link to a newer version if available..."
|
|
|
|
|
|
|
|
hasopenal=`ldconfig -p | grep -m 1 "libopenal.so.1" | cut "-d>" -f2 | cut "-d " -f2`
|
|
|
|
if [ -n "$hasopenal" ]; then
|
2010-03-19 22:15:14 +00:00
|
|
|
ln -f -s $hasopenal $GAMEDIR/lib/libopenal.so.0
|
2010-03-14 11:34:09 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2010-03-19 22:15:14 +00:00
|
|
|
$GAMEDIR/bin/glest_editor "$1"
|
2010-03-14 11:34:09 +00:00
|
|
|
|
|
|
|
|