• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2
3set -u
4
5uncollapsed_section_start wine "Setting up Wine"
6
7export WINEPREFIX="$1"
8export WINEDEBUG="-all"
9
10# We don't want crash dialogs
11cat >crashdialog.reg <<EOF
12Windows Registry Editor Version 5.00
13
14[HKEY_CURRENT_USER\Software\Wine\WineDbg]
15"ShowCrashDialog"=dword:00000000
16
17EOF
18
19# Set the wine prefix and disable the crash dialog
20wine regedit crashdialog.reg
21rm crashdialog.reg
22
23# An immediate wine command may fail with: "${WINEPREFIX}: Not a
24# valid wine prefix."  and that is just spit because of checking
25# the existance of the system.reg file, which fails.  Just giving
26# it a bit more of time for it to be created solves the problem
27# ...
28while ! test -f  "${WINEPREFIX}/system.reg"; do sleep 1; done
29
30section_end wine
31