d476f06556183f1763a0b259b21215cf88f61951
[platform/upstream/mesa.git] / .gitlab-ci / container / setup-wine.sh
1 #!/bin/bash
2
3 export WINEPREFIX="$1"
4 export WINEDEBUG="-all"
5
6 # We don't want crash dialogs
7 cat >crashdialog.reg <<EOF
8 Windows Registry Editor Version 5.00
9
10 [HKEY_CURRENT_USER\Software\Wine\WineDbg]
11 "ShowCrashDialog"=dword:00000000
12
13 EOF
14
15 # Set the wine prefix and disable the crash dialog
16 wine regedit crashdialog.reg
17 rm crashdialog.reg
18
19 # An immediate wine command may fail with: "${WINEPREFIX}: Not a
20 # valid wine prefix."  and that is just spit because of checking
21 # the existance of the system.reg file, which fails.  Just giving
22 # it a bit more of time for it to be created solves the problem
23 # ...
24 while ! test -f  "${WINEPREFIX}/system.reg"; do sleep 1; done