From: minkee.lee Date: Mon, 20 Oct 2014 10:21:06 +0000 (+0900) Subject: Check-GL: Added check-gl pop-up when install SDK in Ubuntu. X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~629^2~37^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=281c7425166f6151f5a43aa3bcc660933cd7665d;p=sdk%2Femulator%2Fqemu.git Check-GL: Added check-gl pop-up when install SDK in Ubuntu. Change-Id: Ic79803a622d397ad52ce79fcce0aff1afe8b63cb Signed-off-by: minkee.lee --- diff --git a/package/emulator-qemu-x86.install.ubuntu-32 b/package/emulator-qemu-x86.install.ubuntu-32 index f952b2c22c..8a4560338a 100755 --- a/package/emulator-qemu-x86.install.ubuntu-32 +++ b/package/emulator-qemu-x86.install.ubuntu-32 @@ -57,3 +57,28 @@ else fi rm ${TMP_FILE} + +# run check-gl and show pop-up if using gallium driver. +CHECK_GL_CMD=${TIZEN_SDK_INSTALL_PATH}/tools/emulator/bin/check-gl + +showGraphicDriverWarning() +{ + zenity --error --no-wrap --text=" +You are using invalid graphic card driver for the emulator. +You have to use the lastest vendor-provided graphic card driver. + +For more information, see under ubuntu driver help page. +https://help.ubuntu.com/community/BinaryDriverHowto/ " +} + + +$CHECK_GL_CMD +RET=$? +echo "check_gl return : $RET" +if [ "$RET" = "0" ] ; then + echo "check-gl ... OK." +elif [ "$RET" = "2" ] ; then + # show warning dialog + echo "check-gl ... fail." + showGraphicDriverWarning +fi diff --git a/package/emulator-qemu-x86.install.ubuntu-64 b/package/emulator-qemu-x86.install.ubuntu-64 index f952b2c22c..4c313c6ba6 100755 --- a/package/emulator-qemu-x86.install.ubuntu-64 +++ b/package/emulator-qemu-x86.install.ubuntu-64 @@ -57,3 +57,27 @@ else fi rm ${TMP_FILE} + +# run check-gl and show pop-up if using gallium driver. +CHECK_GL_CMD=${TIZEN_SDK_INSTALL_PATH}/tools/emulator/bin/check-gl + +showGraphicDriverWarning() +{ + zenity --error --no-wrap --text=" +You are using invalid graphic card driver for the emulator. +You have to use the lastest vendor-provided graphic card driver. + +For more information, see under ubuntu driver help page. +https://help.ubuntu.com/community/BinaryDriverHowto/ " +} + +$CHECK_GL_CMD +RET=$? +echo "check_gl return : $RET" +if [ "$RET" = "0" ] ; then + echo "check-gl ... OK." +elif [ "$RET" = "2" ] ; then + # show warning dialog + echo "check-gl ... fail." + showGraphicDriverWarning +fi