mesa/.gitlab-ci/container/setup-wine.sh
Eric Engestrom 83c022fe5d ci: close individual build sections by default
In the normal case, what we care about is how long the various builds take,
and in the special case when something fails to build we can click to open
the section and see the error.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39670>
2026-02-12 20:53:18 +00:00

30 lines
737 B
Bash
Executable file

#!/usr/bin/env bash
set -u
section_start wine "Setting up Wine"
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
section_end wine