Corrected Krestianstvo.sh

4 views
Skip to first unread message

The Viking

unread,
Aug 5, 2010, 5:29:07 AM8/5/10
to Krestianstvo
Recently the Krestianstvo SDK 1.1 was made available to users to
download. When I downloaded it, I tried to start it up under Linux,
and could not. Here is the new file I created to fix the Linux loading
issue. The fix to finding the correct libGL.so library was provided by
Matthew Fulmer, so I've added his fixes in because people on Ubuntu
Linux were often discovering that Squeak couldn't find the libGL.so
library that they knew they had.
Sorry that I don't speak (or type) Russian, but I think you will
understand my English well.

Best of luck,
The Viking
Tester for Open Cobalt

--------
#!/bin/sh
IMAGE="Krestianstvo.image"
DIR=`dirname $0`
EXE="$DIR/Contents/Linux-i686"
LIB="$EXE/lib/squeak/4.0.3-2202"
RES="$DIR/Contents/Resources"

# make source link if necessary
if [ ! -r $RES/KrestianstvoV41.sources ] ; then
ln -s $RES/KrestianstvoV41.sources
fi


# make libGL.so link if necessary
test -f "$LIB/libGL.so" || {
src=$( ldd $LIB/so.vm-display-X11 | grep libGL.so | cut -d' ' -f3)
|| :
test -n "$src" -a ! -f "$src" && src=''
test -z "$src" -a -f /usr/lib/libGL.so && src="/usr/lib/libGL.so"
test -z "$src" -a -f /usr/lib/libGL.so.1 && src="/usr/lib/libGL.so.
1"
test -z "$src" -a -f /usr/lib/libGL.so.2 && src="/usr/lib/libGL.so.
2"

test -z "$src" && {
echo "I cannot find any usable libGL.so.{012} library. Giving
up" >&2
exit 1
}

echo "Creating libGL.so link in $LIB using $src"
ln -snf $src "${LIB}/libGL.so"
}

# Slight modification to cobalt.sh - line 26:
# make libopenal.so link if necessary - OpenAL is a good thing
if [ ! -f "$LIB/libopenal.so" -a -f /usr/lib/libopenal.so.1 ] ; then
echo "Creating libopenal.so symlink in $LIB"
ln -s /usr/lib/libopenal.so.1 "$LIB/libopenal.so"
elif [ ! -f "$LIB/libopenal.so" -a -f /usr/lib/libopenal.so.0 ] ; then
echo Creating libopenal.so symlink in $LIB
ln -s /usr/lib/libopenal.so.0 "$LIB/libopenal.so"
fi


exec "$EXE/bin/squeak" -plugins "$LIB" \
-encoding UTF-8 \
-vm-display-X11 -swapbtn \
"$RES/$IMAGE"


--------

Nikolay Suslov

unread,
Aug 7, 2010, 10:53:48 AM8/7/10
to Krestianstvo
Thanks a lot!
It is very important fix.
Will update the downloadable SDK.

Best regards,
Nikolay
Reply all
Reply to author
Forward
0 new messages