1#!/usr/bin/env bash 2 3export WINEPREFIX="$1" 4export WINEDEBUG="-all" 5 6# We don't want crash dialogs 7cat >crashdialog.reg <<EOF 8Windows Registry Editor Version 5.00 9 10[HKEY_CURRENT_USER\Software\Wine\WineDbg] 11"ShowCrashDialog"=dword:00000000 12 13EOF 14 15# Set the wine prefix and disable the crash dialog 16wine regedit crashdialog.reg 17rm 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# ... 24while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done 25