Open XYYHun opened 12 years ago
I suggest you to try Bumblebee which alleviates this issue by passing both library paths. http://bumblebee-project.org/
Add a test to make sure arg is executable (get the real path with readlink in case it's a symlink). Also the test if it's a wine program needs to be fixed. I did this and tested it on "java -jar minecraft.jar". This worked for me:
for arg in $@; do
if [[ `echo $arg | grep -c wine` -eq 0 ]]; then
if [[ -x `which $arg` ]]; then
pathtofile=`which $arg`
abspath=`readlink -f $pathtofile`
if [[ `file $abspath | grep -c 64-bit` -ne 0 ]];then
VGL_DRIVER=/usr/lib/nvidia-current
break
elif [[ `file $abspath | grep -c 32-bit` -ne 0 ]];then
VGL_DRIVER=/usr/lib32/nvidia-current
break
fi
fi
fi
done
BTW. Just because MrMEEE had to take a sabbatical from development doesn't mean we should all switch over to Bumblebee and not try and work things out ourselves.
Ian
Neither program is perfect, you have the freedom to do whatever you want with it.These checks can be skipped by passing both library paths, the linker will take care of binding the right libraries:
VGL_DRIVER=/usr/lib/nvidia-current:/usr/lib32/nvidia-current
Some strange output is displayed when I run the following command.
Error might be here in optirun
these code test aplication whether it is a 32-bit programs or 64-bit programs. but file command must use full path, and only works with binary files.