Support skipping gfx check

This commit is contained in:
RealJohnGalt 2018-11-19 14:02:55 -08:00
parent 091e983386
commit fb6e4f5a20

View File

@ -33,23 +33,27 @@ do
fi fi
done done
if ! $(glxinfo | grep -q -e 'Mesa 18.2' -e 'Mesa 18.3' -e 'Mesa 18.4' -e 'Mesa 19'); then function checkgfxver {
echo "Checking graphics packages are new enough. To skip this check (on Nvidia for instance), run with -f flag."
if ! $(glxinfo | grep -q -e 'Mesa 18.2' -e 'Mesa 18.3' -e 'Mesa 18.4' -e 'Mesa 19'); then
echo "You must install at least Mesa 18.2.0" echo "You must install at least Mesa 18.2.0"
exit 1 exit 1
fi fi
if ! $(glxinfo | grep -q "LLVM 8"); then if ! $(glxinfo | grep -q "LLVM 8"); then
if ! $(glxinfo | grep -q "LLVM 7"); then if ! $(glxinfo | grep -q "LLVM 7"); then
echo "You must install Mesa built with at least LLVM 7" echo "You must install Mesa built with at least LLVM 7"
exit 1 exit 1
fi fi
fi fi
if ! $(glxinfo | grep -q "4.5 (Compat"); then if ! $(glxinfo | grep -q "4.5 (Compat"); then
echo "Your hardware doesn't support the required OpenGL version." echo "Your hardware doesn't support the required OpenGL version."
echo "You may attempt using MESA_GL_VERSION_OVERRIDE=4.4COMPAT in the LaunchCEMU script." echo "You may attempt using MESA_GL_VERSION_OVERRIDE=4.4COMPAT in the LaunchCEMU script."
echo "This isn't officially supported, and may cause heavy glitches or not work. Proceeding as usual..." echo "This isn't officially supported, and may cause heavy glitches or not work. Proceeding as usual..."
fi fi
return
}
#Check for args #Check for args
if [[ ! $@ =~ ^\-.+ ]] if [[ ! $@ =~ ^\-.+ ]]
@ -58,7 +62,7 @@ then
fi fi
#Handle args #Handle args
while getopts ":c:h:ai:" opt; do while getopts ":c:h:afi:" opt; do
case ${opt} in case ${opt} in
c ) c )
cemuzip=$OPTARG cemuzip=$OPTARG
@ -77,6 +81,9 @@ while getopts ":c:h:ai:" opt; do
a ) a )
downloadlatest downloadlatest
;; ;;
f )
skipgfxcheck=1
;;
i ) i )
instdir=$OPTARG instdir=$OPTARG
;; ;;
@ -91,6 +98,11 @@ while getopts ":c:h:ai:" opt; do
done done
shift $((OPTIND -1)) shift $((OPTIND -1))
#check gfx package vers
if [[ "$skipgfxcheck" == "" ]]; then
checkgfxver
fi
#Set opts if unset #Set opts if unset
if [[ "$instdir" == "" ]]; then if [[ "$instdir" == "" ]]; then
instdir=$HOME/.cemu instdir=$HOME/.cemu