forked from Kurumi78/mf-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mf-install.sh
executable file
·71 lines (52 loc) · 1.59 KB
/
mf-install.sh
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
#!/bin/bash
check_env() {
[ -z "$1" ] && echo "$2 is not set" && exit 1
}
check_sanity() {
[ ! -d "$1/$2" ] && echo "$1 isn't a valid path" && exit 1
}
override_dll() {
wine reg add "HKEY_CURRENT_USER\Software\Wine\DllOverrides" /v $1 /d native /f
}
check_env "$WINEPREFIX" WINEPREFIX
check_sanity "$WINEPREFIX" drive_c
# User instructions:
# Set PROTON to a Proton folder (in common not compatdata) just like WINEPREFIX, pass -proton to script
if [ "$1" = "-proton" ]; then
check_env "$PROTON" PROTON
if [ -d "$PROTON/files" ]; then
prefix="files"
elif [ -d "$PROTON/dist" ]; then
prefix="dist"
fi
check_sanity "$PROTON" $prefix/bin
export PATH="$PROTON/$prefix/bin:$PATH"
export WINESERVER="$PROTON/$prefix/bin/wineserver"
export WINELOADER="$PROTON/$prefix/bin/wine"
export WINEDLLPATH="$PROTON/$prefix/lib/wine:$PROTON/$prefix/lib64/wine"
fi
set -e
export WINEDEBUG="-all"
scriptdir="$(dirname "$(realpath "$0")")"
cd "$scriptdir"
cp -vf syswow64/* "$WINEPREFIX/drive_c/windows/syswow64"
cp -vf system32/* "$WINEPREFIX/drive_c/windows/system32"
override_dll "colorcnv"
override_dll "mf"
override_dll "mferror"
override_dll "mfplat"
override_dll "mfplay"
override_dll "mfreadwrite"
override_dll "msmpeg2adec"
override_dll "msmpeg2vdec"
override_dll "sqmapi"
wine regedit.exe mf.reg
wine regedit.exe wmf.reg
wine64 regedit.exe mf.reg
wine64 regedit.exe wmf.reg
wine regsvr32 colorcnv.dll
wine regsvr32 msmpeg2adec.dll
wine regsvr32 msmpeg2vdec.dll
wine64 regsvr32 colorcnv.dll
wine64 regsvr32 msmpeg2adec.dll
wine64 regsvr32 msmpeg2vdec.dll