Skip to content

Commit 5c9ca74

Browse files
authored
[WINE} Fix Wine script to work for version 10 (#208)
1 parent 8797be7 commit 5c9ca74

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

website/content/public/downloads/winesetup/net6_mgfxc_wine_setup.sh

100644100755
+10-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
# so that mgfxc can be run on Linux / macOS systems.
44

55
# check dependencies
6-
if ! type "wine64" > /dev/null 2>&1
6+
WINEEXECUTABLE="wine64"
7+
if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
78
then
8-
echo "wine64 not found"
9+
WINEEXECUTABLE="wine"
10+
fi
11+
12+
if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
13+
then
14+
echo "$WINEEXECUTABLE not found"
915
exit 1
1016
fi
1117

@@ -18,7 +24,7 @@ fi
1824
# init wine stuff
1925
export WINEARCH=win64
2026
export WINEPREFIX=$HOME/.winemonogame
21-
wine64 wineboot
27+
eval "$WINEEXECUTABLE wineboot"
2228

2329
TEMP_DIR="${TMPDIR:-/tmp}"
2430
SCRIPT_DIR="$TEMP_DIR/winemg2"
@@ -32,7 +38,7 @@ REGEDIT4
3238
_EOF_
3339

3440
pushd $SCRIPT_DIR
35-
wine64 regedit crashdialog.reg
41+
eval "$WINEEXECUTABLE regedit crashdialog.reg"
3642
popd
3743

3844
# get dotnet

website/content/public/downloads/winesetup/net8_mgfxc_wine_setup.sh

100644100755
+11-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
# so that mgfxc can be run on Linux / macOS systems.
44

55
# check dependencies
6-
if ! type "wine64" > /dev/null 2>&1
6+
WINEEXECUTABLE="wine64"
7+
if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
78
then
8-
echo "wine64 not found"
9+
WINEEXECUTABLE="wine"
10+
fi
11+
12+
if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
13+
then
14+
echo "$WINEEXECUTABLE not found"
915
exit 1
1016
fi
1117

@@ -17,7 +23,7 @@ fi
1723

1824
# wine 8 is the minimum requirement for dotnet 8
1925
# wine --version will output "wine-#.# (Distro #.#.#)" or "wine-#.#"
20-
WINE_VERSION=$(wine64 --version 2>&1 | grep -o 'wine-..' | sed 's/wine-//' | sed 's/\.//')
26+
WINE_VERSION=$($WINEEXECUTABLE --version 2>&1 | grep -o 'wine-..' | sed 's/wine-//' | sed 's/\.//')
2127
if (( $WINE_VERSION < 8 )); then
2228
echo "Wine version $WINE_VERSION is below the minimum required version (8.0)."
2329
exit 1
@@ -26,7 +32,7 @@ fi
2632
# init wine stuff
2733
export WINEARCH=win64
2834
export WINEPREFIX=$HOME/.winemonogame
29-
wine64 wineboot
35+
eval "$WINEEXECUTABLE wineboot"
3036

3137
TEMP_DIR="${TMPDIR:-/tmp}"
3238
SCRIPT_DIR="$TEMP_DIR/winemg2"
@@ -40,7 +46,7 @@ REGEDIT4
4046
_EOF_
4147

4248
pushd $SCRIPT_DIR
43-
wine64 regedit crashdialog.reg
49+
eval "$WINEEXECUTABLE regedit crashdialog.reg"
4450
popd
4551

4652
# get dotnet

website/content/public/downloads/winesetup/net9_mgfxc_wine_setup.sh

100644100755
+11-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
# so that mgfxc can be run on Linux / macOS systems.
44

55
# check dependencies
6-
if ! type "wine64" > /dev/null 2>&1
6+
WINEEXECUTABLE="wine64"
7+
if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
78
then
8-
echo "wine64 not found"
9+
WINEEXECUTABLE="wine"
10+
fi
11+
12+
if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
13+
then
14+
echo "$WINEEXECUTABLE not found"
915
exit 1
1016
fi
1117

@@ -17,7 +23,7 @@ fi
1723

1824
# wine 8 is the minimum requirement for dotnet 8
1925
# wine --version will output "wine-#.# (Distro #.#.#)" or "wine-#.#"
20-
WINE_VERSION=$(wine64 --version 2>&1 | grep -o 'wine-..' | sed 's/wine-//' | sed 's/\.//')
26+
WINE_VERSION=$($WINEEXECUTABLE --version 2>&1 | grep -o 'wine-..' | sed 's/wine-//' | sed 's/\.//')
2127
if (( $WINE_VERSION < 8 )); then
2228
echo "Wine version $WINE_VERSION is below the minimum required version (8.0)."
2329
exit 1
@@ -26,7 +32,7 @@ fi
2632
# init wine stuff
2733
export WINEARCH=win64
2834
export WINEPREFIX=$HOME/.winemonogame
29-
wine64 wineboot
35+
eval "$WINEEXECUTABLE wineboot"
3036

3137
TEMP_DIR="${TMPDIR:-/tmp}"
3238
SCRIPT_DIR="$TEMP_DIR/winemg2"
@@ -40,7 +46,7 @@ REGEDIT4
4046
_EOF_
4147

4248
pushd $SCRIPT_DIR
43-
wine64 regedit crashdialog.reg
49+
eval "$WINEEXECUTABLE regedit crashdialog.reg"
4450
popd
4551

4652
# get dotnet

0 commit comments

Comments
 (0)