diff --git a/mk/linux/editor b/mk/linux/editor new file mode 100755 index 000000000..588f15363 --- /dev/null +++ b/mk/linux/editor @@ -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 + + diff --git a/mk/linux/start_editor b/mk/linux/g3dviewer similarity index 87% rename from mk/linux/start_editor rename to mk/linux/g3dviewer index 012922630..6ef370cb2 100755 --- a/mk/linux/start_editor +++ b/mk/linux/g3dviewer @@ -19,6 +19,5 @@ cd $GAMEDIR # export game library directory test -n "${LIBDIR}" && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GAMEDIR}/${LIBDIR}" -./glest_editor -# ./glest > /tmp/`date +"%F_%k-%M-%S"`.glest.log 2>&1 +./bin/glest_g3dviewer diff --git a/mk/linux/glest b/mk/linux/glest index f364f6413..5ac029800 100755 --- a/mk/linux/glest +++ b/mk/linux/glest @@ -33,6 +33,6 @@ else fi fi -./glest.bin > glest.log 2>&1 -# ./glest > /tmp/`date +"%F_%k-%M-%S"`.glest.log 2>&1 +./bin/glest.bin 2>&1 | tee -a glest.log +# ./bin/glest.bin 2>&1 | tee -a /tmp/`date +"%F_%k-%M-%S"`.glest.log 2>&1 diff --git a/mk/linux/start_configuration b/mk/linux/start_configurator similarity index 86% rename from mk/linux/start_configuration rename to mk/linux/start_configurator index 36faa9514..b11f2d596 100755 --- a/mk/linux/start_configuration +++ b/mk/linux/start_configurator @@ -19,6 +19,5 @@ cd $GAMEDIR # export game library directory test -n "${LIBDIR}" && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GAMEDIR}/${LIBDIR}" -./glest_configurator -# ./glest > /tmp/`date +"%F_%k-%M-%S"`.glest.log 2>&1 +./bin/glest_configurator