-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaunch
executable file
·126 lines (108 loc) · 2.89 KB
/
launch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/bin/bash
# Log everything to stdout
exec 2>&1
DATADIR="$HOME/data"
case "x$WINE_BITS" in
x32)
export WINEARCH=win32
export WINEDIR="$DATADIR/w32"
export WINEPREFIX=$WINEDIR
;;
x|x64)
export WINEARCH=win64
export WINEDIR="$DATADIR/w64"
export WINEPREFIX=$WINEDIR
;;
*)
echo "Unexpected arch bits: $WINE_BITS"
exit 1
;;
esac
# Debugging options
#export WINEDEBUG="fixme-all"
export WINEDEBUG=
# Common Dirs
DOCDIR="My Documents"
DOCDATA="$DATADIR/$DOCDIR"
GAMEDIR="My Games"
GAMEDATA="$DATADIR/$GAMEDIR"
MUSICDIR="My Music"
MUSICDATA="$DATADIR/$MUSICDIR"
VIDEODIR="My Videos"
VIDEODATA="$DATADIR/$VIDEODIR"
# Bail on failure
set -e
# Setup on first launch
if [ ! -d "$DOCDATA" ]; then
echo "creating persistent doc data directory $DOCDATA ..."
mkdir "$DOCDATA"
fi
rm -f "$HOME/$DOCDIR"; ln -s "$DOCDATA" "$HOME/$DOCDIR"
if [ ! -d "$GAMEDATA" ]; then
echo "creating persistent game data directory $GAMEDATA ..."
mkdir "$GAMEDATA"
fi
rm -f "$HOME/$GAMEDIR"; ln -s "$GAMEDATA" "$HOME/$GAMEDIR"
if [ ! -d "$MUSICDATA" ]; then
echo "creating persistent music data directory $MUSICDATA ..."
mkdir "$MUSICDATA"
fi
rm -f "$HOME/$MUSICDIR"; ln -s "$MUSICDATA" "$HOME/$MUSICDIR"
if [ ! -d "$VIDEODATA" ]; then
echo "creating persistent video data directory $VIDEODATA ..."
mkdir "$VIDEODATA"
fi
rm -f "$HOME/$VIDEODIR"; ln -s "$VIDEODATA" "$HOME/$VIDEODIR"
if [ ! -d "$WINEPREFIX" -o "$STEAM_SKIP" = "reinstall" ]; then
echo "creating wine directory $WINEPREFIX ..."
mkdir "$WINEPREFIX"
echo "installing gecko"
if [ "$WINEARCH" == "win32" ]; then
wine msiexec /i /usr/local/share/wine/gecko/wine_gecko-$GECKO_VERSION-x86.msi
else
wine msiexec /i /usr/local/share/wine/gecko/wine_gecko-$GECKO_VERSION-x86_64.msi
fi
echo "installing core fonts..."
winetricks corefonts
echo "installing common dependencies..."
winetricks dxvk
winetricks xact
echo "installing steam..."
winetricks --no-isolate steam
wait
echo "starting wincfg for final tweaking..."
winecfg
echo "wine ready"
fi
case "$STEAM_SKIP" in
wait)
zenity --info --text="Wine Docker on stand-by. Click OK to terminate."
wait
;;
shell)
x-terminal-emulator
wait
;;
cfg)
winecfg
wait
;;
yes)
if [ -x "$DATADIR/launch.rc" ]; then
echo "running user launcher..."
source "$DATADIR/launch.rc"
fi
if [ -x "$WINEDIR/launch.rc" ]; then
echo "running wine launcher..."
source "$WINEDIR/launch.rc"
fi
wait
;;
*)
# Start steam
echo "starting steam..."
wineconsole "C:\\Program Files (x86)\\Steam\\Steam.exe" -no-cef-sandbox
wait
echo "steam terminated"
;;
esac