-
Notifications
You must be signed in to change notification settings - Fork 0
/
steamRunGameAndExitWine
executable file
·53 lines (48 loc) · 1.3 KB
/
steamRunGameAndExitWine
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
#!/bin/bash
#203160 tomb raider
#20900 wticher
unset STEAM_CLIENT_CONFIG_FILE
unset STEAMSCRIPT
unset SteamAppId
unset Steam3Master
unset STEAMSCRIPT_VERSION
unset SteamNoOverlayUI
unset SteamTenfoot
unset STEAMVIDEOTOKEN
unset STEAM_RUNTIME
unset SteamAppUser
unset SteamUser
unset SteamStreamingHardwareEncodingNVIDIA
unset SteamGameId
unset SteamStreamingHardwareEncodingIntel
unset SteamLauncherUI
unset SteamStreamingForceWindowedD3D9
unset SteamStreamingMaximumResolution
unset SteamStreamingAllowGameVsync
unset SteamStreaming
unset SteamStreamingHardwareEncodingAMD
if [ -z "$WINEPREFIX" ]; then
export WINEPREFIX=/usr/local/games/_wine/steam
fi
echo "using WINEPREFIX: $WINEPREFIX"
export XMODIFIERS=''
cd $WINEPREFIX/'drive_c/Program Files/Steam'
#CHKCMD="pgrep -l -w -f '.*steamapps\\common\\.*\.exe.*'"
# FUCK YOU
sed -ri 's/("SkipOfflineModeWarning"\s+)"0"/\1"1"/' $WINEPREFIX/'drive_c/Program Files/Steam/config/loginusers.vdf'
wine Steam.exe steam://rungameid/$1 &
# give steam some time to login and start the game
for i in $(seq 1 30); do
sleep 1;
if [ -n "$(pgrep -l -w -f '.*steamapps\\common\\.*\.exe.*')" ]; then
echo "game started after ~$i seconds"
break
fi
done
while true; do
sleep 1
if [ -z "$(pgrep -l -w -f '.*steamapps\\common\\.*\.exe.*')" ]; then
wine Steam.exe -shutdown
exit
fi
done