mirror of
https://github.com/glest/glest-source.git
synced 2025-08-14 04:13:58 +02:00
linux startscripts
This commit is contained in:
38
mk/linux/editor
Executable file
38
mk/linux/editor
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
# Change to the game dir, and go!
|
||||||
|
cd $GAMEDIR
|
||||||
|
# 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
|
||||||
|
ln -f -s $hasopenal lib/libopenal.so.0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
./bin/glest_editor
|
||||||
|
|
||||||
|
|
@@ -19,6 +19,5 @@ cd $GAMEDIR
|
|||||||
# export game library directory
|
# export game library directory
|
||||||
test -n "${LIBDIR}" && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GAMEDIR}/${LIBDIR}"
|
test -n "${LIBDIR}" && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GAMEDIR}/${LIBDIR}"
|
||||||
|
|
||||||
./glest_editor
|
./bin/glest_g3dviewer
|
||||||
# ./glest > /tmp/`date +"%F_%k-%M-%S"`.glest.log 2>&1
|
|
||||||
|
|
@@ -33,6 +33,6 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./glest.bin > glest.log 2>&1
|
./bin/glest.bin 2>&1 | tee -a glest.log
|
||||||
# ./glest > /tmp/`date +"%F_%k-%M-%S"`.glest.log 2>&1
|
# ./bin/glest.bin 2>&1 | tee -a /tmp/`date +"%F_%k-%M-%S"`.glest.log 2>&1
|
||||||
|
|
||||||
|
@@ -19,6 +19,5 @@ cd $GAMEDIR
|
|||||||
# export game library directory
|
# export game library directory
|
||||||
test -n "${LIBDIR}" && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GAMEDIR}/${LIBDIR}"
|
test -n "${LIBDIR}" && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GAMEDIR}/${LIBDIR}"
|
||||||
|
|
||||||
./glest_configurator
|
./bin/glest_configurator
|
||||||
# ./glest > /tmp/`date +"%F_%k-%M-%S"`.glest.log 2>&1
|
|
||||||
|
|
Reference in New Issue
Block a user