From 5eb170a438d8a7a21c952f5e0c45f87e85106eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Kone=C4=8Dn=C3=BD?= Date: Tue, 3 Nov 2015 21:48:00 +0100 Subject: [PATCH 2/3] Change check_gl to use compiled version of check_dd as fallback When make install command is used the bz2 versions of check_dd_* binaries are not installed but the ./src/check_direct_rendering.c is compiled as check_dd to bin folder. The check_gl script was changed to use this compiled check_dd when bz2 version is missing. --- Makefile | 2 +- bash/check_gl | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 2e7c538..54ca41f 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ clean: $(RM) ./ChangeLog build: - $(CC) ./src/check_direct_rendering.c -o ./bin/check_dd + $(CC) ./src/check_direct_rendering.c -o ./bin/playonlinux-check_dd $(PYTHON) ./python/*.py $(PYTHON) ./python/lib/*.py echo -e '#!/bin/bash\n${sharedir}/playonlinux/playonlinux "$$@"\nexit 0' > ./bin/playonlinux diff --git a/bash/check_gl b/bash/check_gl index 01b52e6..51a48e3 100755 --- a/bash/check_gl +++ b/bash/check_gl @@ -41,19 +41,25 @@ Check_OpenGL() chmod +x "$POL_USER_ROOT/tmp/check_dd_$1" message="$("$POL_USER_ROOT/tmp/check_dd_$1")" out="$?" - - if [ "$out" = "0" ] - then - $cmd "$message" - exit 0 - else - $cmdW "$message" - exit 2 - fi + # When bz2 version is not presented (was installed on specific platform) + # use on site compiled check_dd version + elif [ -e "/usr/libexec/playonlinux-check_dd" ] + then + message="$("/usr/libexec/playonlinux-check_dd")" + out="$?" else $cmdW "check_dd_$1 missing, test skipped" exit 0 fi + + if [ "$out" = "0" ] + then + $cmd "$message" + exit 0 + else + $cmdW "$message" + exit 2 + fi } cd /tmp -- 2.5.0