Module: Mesa Branch: main Commit: 0fc06daabb08ee7748493ae7a561662cf3f62cff URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0fc06daabb08ee7748493ae7a561662cf3f62cff
Author: David Heidelberg <[email protected]> Date: Thu Aug 4 15:57:51 2022 +0200 ci: separate wine setup into own script It will be used by LAVA jobs too. Reviewed-by: "Sergi Blanch Torne" <[email protected]> Signed-off-by: David Heidelberg <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17887> --- .gitlab-ci/container/debian/x86_test-vk.sh | 29 ++--------------------------- .gitlab-ci/container/setup-wine.sh | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.gitlab-ci/container/debian/x86_test-vk.sh b/.gitlab-ci/container/debian/x86_test-vk.sh index 4fc35c62eb2..b0ea3fa3c5c 100644 --- a/.gitlab-ci/container/debian/x86_test-vk.sh +++ b/.gitlab-ci/container/debian/x86_test-vk.sh @@ -74,34 +74,9 @@ pip3 install gfxinfo-mupuf==0.0.9 apt install -y --no-remove --install-recommends winehq-stable -function setup_wine() { - export WINEDEBUG="-all" - export WINEPREFIX="$1" - - # We don't want crash dialogs - cat >crashdialog.reg <<EOF -Windows Registry Editor Version 5.00 - -[HKEY_CURRENT_USER\Software\Wine\WineDbg] -"ShowCrashDialog"=dword:00000000 - -EOF - - # Set the wine prefix and disable the crash dialog - wine regedit crashdialog.reg - rm crashdialog.reg - - # An immediate wine command may fail with: "${WINEPREFIX}: Not a - # valid wine prefix." and that is just spit because of checking - # the existance of the system.reg file, which fails. Just giving - # it a bit more of time for it to be created solves the problem - # ... - while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done -} - ############### Install DXVK -setup_wine "/dxvk-wine64" +. .gitlab-ci/container/setup-wine.sh "/dxvk-wine64" . .gitlab-ci/container/install-wine-dxvk.sh ############### Install apitrace binaries for wine @@ -145,7 +120,7 @@ PIGLIT_BUILD_TARGETS="piglit_replayer" . .gitlab-ci/container/build-piglit.sh ############### Build VKD3D-Proton -setup_wine "/vkd3d-proton-wine64" +. .gitlab-ci/container/setup-wine.sh "/vkd3d-proton-wine64" . .gitlab-ci/container/build-vkd3d-proton.sh diff --git a/.gitlab-ci/container/setup-wine.sh b/.gitlab-ci/container/setup-wine.sh new file mode 100755 index 00000000000..d476f065561 --- /dev/null +++ b/.gitlab-ci/container/setup-wine.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +export WINEPREFIX="$1" +export WINEDEBUG="-all" + +# We don't want crash dialogs +cat >crashdialog.reg <<EOF +Windows Registry Editor Version 5.00 + +[HKEY_CURRENT_USER\Software\Wine\WineDbg] +"ShowCrashDialog"=dword:00000000 + +EOF + +# Set the wine prefix and disable the crash dialog +wine regedit crashdialog.reg +rm crashdialog.reg + +# An immediate wine command may fail with: "${WINEPREFIX}: Not a +# valid wine prefix." and that is just spit because of checking +# the existance of the system.reg file, which fails. Just giving +# it a bit more of time for it to be created solves the problem +# ... +while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done
