Merge branch 'develop' of git://git.backbone.ws/snail/snail into develop

This commit is contained in:
kolan 2012-05-13 16:49:16 +04:00
commit 1431123410
3 changed files with 9 additions and 8 deletions

View File

@ -2,7 +2,7 @@
PATH=/usr/local/sbin:/usr/local/bin:$PATH
TIMEOUT=10 # wait timeout for X server start
TIMEOUT=20 # wait timeout for X server start
let INTEL_IF_FAIL=1 # run on Intel if nVidia fails
LOCK_FILE=/tmp/.snail.lock
@ -15,14 +15,15 @@ FIFO_FILE=/tmp/.snail.fifo
if [ 0 -eq $? ]; then
echo "Running $@ on nVidia"
export LD_LIBRARY_PATH=/usr/lib/snail
LD_PRELOAD="/usr/lib/snail/lib32/libGL.so /usr/lib/snail/lib32/libnvidia-tls.so" \
LD_PRELOAD="/usr/lib/snail/lib32/libGL.so.1 /usr/lib/snail/lib32/libnvidia-tls.so" \
snail.vglrun -d :8293 "$@" 2>/dev/null
echo "Application $@ was performed on nVidia"
elif [ 0 -ne $INTEL_IF_FAIL ]; then
echo "Running $@ on Intel"
"$@"
echo "Application $@ was performed on Intel"
echo "Failed to run $@ on nVidia ;-("
# echo "Running $@ on Intel"
# "$@"
# echo "Application $@ was performed on Intel"
fi
flock -u 9

View File

@ -31,8 +31,8 @@ rm -f $FIFO_FILE && mkfifo --mode 660 $FIFO_FILE && chgrp video $FIFO_FILE # cre
read <$FIFO_FILE
snail.nv_pwr_on && $XSERVER_START_CMD # starting X server
flock -u 9
flock 9
echo >$FIFO_FILE | cat $FIFO_FILE >/dev/null # flush fifo
flock 9
$XSERVER_STOP_CMD && snail.nv_pwr_off # stopping X server
done
} 9>$LOCK_FILE

View File

@ -118,12 +118,12 @@ case "$DISTRIB_ID" in
done;
done
ln -sf /usr/lib/opengl/nvidia/lib/libGL.so.[0-9][0-9]* /usr/lib/snail/libGL.so.1
ln -sf /usr/lib32/opengl/nvidia/lib/libGL.so.[0-9][0-9]* /usr/lib/snail/lib32/libGL.so
ln -sf /usr/lib32/opengl/nvidia/lib/libGL.so.1 /usr/lib/snail/lib32/libGL.so.1
ln -sf /usr/lib/xorg/modules/libfb.so /usr/lib/snail/libfb.so
ln -sf /usr/lib/xorg/modules/libwfb.so /usr/lib/snail/libwfb.so
ln -sf /usr/lib/opengl/nvidia/extensions/libglx.so.[0-9][0-9]* /usr/lib/snail/libglx.so
ln -sf /usr/lib/opengl/nvidia/lib/libnvidia-tls.so.[0-9][0-9]* /usr/lib/snail/
ln -sf /usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.[0-9][0-9]* /usr/lib/snail/lib32/libnvidia-tls.so
ln -sf /usr/lib32/opengl/nvidia/lib/libnvidia-tls.so /usr/lib/snail/lib32/libnvidia-tls.so
ln -sf /usr/lib/xorg/modules/drivers/nvidia_drv.so /usr/lib/snail/nvidia_drv.so
;;