diff --git a/Makefile b/Makefile index cf1f52a..30d5111 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,6 @@ install: install -d ${DESTDIR}/${PREFIX}/share/snail install -d ${DESTDIR}/${PREFIX}/share/snail/init.d install share/init.d/* ${DESTDIR}/${PREFIX}/share/snail/init.d - install -d ${DESTDIR}/${PREFIX}/lib/snail/extensions uninstall: rm -f ${DESTDIR}/etc/X11/xorg.conf.*.snail diff --git a/bin/nvrun b/bin/nvrun index 27287b0..ef1660d 100755 --- a/bin/nvrun +++ b/bin/nvrun @@ -15,8 +15,9 @@ FIFO_FILE=/tmp/.snail.fifo if [ 0 -eq $? ]; then echo "Running $@ on nVidia" - export LD_LIBRARY_PATH=/usr/lib/snail - export LD_PRELOAD="/usr/lib/snail/libGL.so:/usr/lib/snail/libnvidia-tls.so" + export LD_LIBRARY_PATH=/usr/lib/snail:/usr/lib/snail/lib + [ -f /usr/lib/snail/libGL.so ] && LD_PRELOAD=$LD_PRELOAD:/usr/lib/snail/libGL.so + [ -f /usr/lib/snail/libnvidia-tls.so ] && LD_PRELOAD=$LD_PRELOAD:/usr/lib/snail/libnvidia-tls.so snail.vglrun -d :1 "$@" echo "Application $@ was performed on nVidia" diff --git a/sbin/snail.configure b/sbin/snail.configure index d156eb0..ce06c5e 100755 --- a/sbin/snail.configure +++ b/sbin/snail.configure @@ -120,14 +120,9 @@ case "$DISTRIB_ID" in eselect mesa set $arch $chip classic &>/dev/null; done; done - ln -sf /usr/lib/xorg/modules/extensions/libdbe.so /usr/lib/snail/extensions/libdbe.so - ln -sf /usr/lib/xorg/modules/extensions/libdri.so /usr/lib/snail/extensions/libdri.so - ln -sf /usr/lib/xorg/modules/extensions/libdri2.so /usr/lib/snail/extensions/libdri2.so - ln -sf /usr/lib/xorg/modules/extensions/libextmod.so /usr/lib/snail/extensions/libextmod.so - ln -sf /usr/lib/xorg/modules/extensions/librecord.so /usr/lib/snail/extensions/librecord.so - ln -sf /usr/lib/opengl/nvidia/extensions/libglx.so /usr/lib/snail/extensions/libglx.so - ln -sf /usr/lib/opengl/nvidia/lib/libGL.so /usr/lib/snail/libGL.so - ln -sf /usr/lib/opengl/nvidia/lib/libnvidia-tls.so /usr/lib/snail/libnvidia-tls.so + ln -sf /usr/lib/opengl/nvidia/extensions /usr/lib/snail/extensions + ln -sf /usr/lib/opengl/nvidia/lib /usr/lib/snail/lib + ln -sf /usr/lib/xorg/modules /usr/lib/snail/modules grep acpi_call /etc/conf.d/modules || echo 'modules="${modules} acpi_call' >> /etc/conf.d/modules ;; diff --git a/share/init.d/snail-xserver.openrc b/share/init.d/snail-xserver.openrc index 8a96e45..84b9a96 100644 --- a/share/init.d/snail-xserver.openrc +++ b/share/init.d/snail-xserver.openrc @@ -8,8 +8,7 @@ PIDFILE=/var/run/snail-xserver.pid start() { ebegin "Starting Snail nVidia Optimus" snail.nv_pwr_on || eend -1 - export LD_LIBRARY_PATH=/usr/lib/snail - export LD_PRELOAD=/usr/lib/snail/libGL.so + export LD_LIBRARY_PATH=/usr/lib/snail:/usr/lib/snail/lib pid=`cat $PIDFILE 2>/dev/null` rm -f $PIDFILE [ -z $pid ] || ! pgrep -s $pid X &>/dev/null && \ diff --git a/share/init.d/snail-xserver.sysv b/share/init.d/snail-xserver.sysv index 8a8c26e..12dea3c 100644 --- a/share/init.d/snail-xserver.sysv +++ b/share/init.d/snail-xserver.sysv @@ -27,8 +27,7 @@ case "$1" in start) log_begin_msg "Starting Snail nVidia Optimus" snail.nv_pwr_on || log_end_msg 1 - export LD_LIBRARY_PATH=/usr/lib/snail - export LD_PRELOAD=/usr/lib/snail/libGL.so + export LD_LIBRARY_PATH=/usr/lib/snail:/usr/lib/snail/lib pid=`cat $PIDFILE 2>/dev/null` rm -f $PIDFILE [ -z $pid ] || ! pgrep -s $pid X &>/dev/null && \