Skip to content

[WINE] Fix Wine script to work for version 10 #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions website/content/public/downloads/winesetup/net6_mgfxc_wine_setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
# so that mgfxc can be run on Linux / macOS systems.

# check dependencies
if ! type "wine64" > /dev/null 2>&1
WINEEXECUTABLE="wine64"
Copy link
Collaborator

@CartBlanche CartBlanche Mar 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@harry-cpp won't this still fail because it's still using wine64, instead of just wine?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't. If they have a previous version of wine installed, then it'll pick up the wine64 and use that, otherwise it falls back to just wine for the new version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be recommended that they have the newest version installed, or our docs need to lock it to a specific version otherwise.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nm, I missed some code further down.

if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
then
echo "wine64 not found"
WINEEXECUTABLE="wine"
fi

if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
then
echo "$WINEEXECUTABLE not found"
exit 1
fi

Expand All @@ -18,7 +24,7 @@ fi
# init wine stuff
export WINEARCH=win64
export WINEPREFIX=$HOME/.winemonogame
wine64 wineboot
eval "$WINEEXECUTABLE wineboot"

TEMP_DIR="${TMPDIR:-/tmp}"
SCRIPT_DIR="$TEMP_DIR/winemg2"
Expand All @@ -32,7 +38,7 @@ REGEDIT4
_EOF_

pushd $SCRIPT_DIR
wine64 regedit crashdialog.reg
eval "$WINEEXECUTABLE regedit crashdialog.reg"
popd

# get dotnet
Expand Down
16 changes: 11 additions & 5 deletions website/content/public/downloads/winesetup/net8_mgfxc_wine_setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
# so that mgfxc can be run on Linux / macOS systems.

# check dependencies
if ! type "wine64" > /dev/null 2>&1
WINEEXECUTABLE="wine64"
if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
then
echo "wine64 not found"
WINEEXECUTABLE="wine"
fi

if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
then
echo "$WINEEXECUTABLE not found"
exit 1
fi

Expand All @@ -17,7 +23,7 @@ fi

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

TEMP_DIR="${TMPDIR:-/tmp}"
SCRIPT_DIR="$TEMP_DIR/winemg2"
Expand All @@ -40,7 +46,7 @@ REGEDIT4
_EOF_

pushd $SCRIPT_DIR
wine64 regedit crashdialog.reg
eval "$WINEEXECUTABLE regedit crashdialog.reg"
popd

# get dotnet
Expand Down
16 changes: 11 additions & 5 deletions website/content/public/downloads/winesetup/net9_mgfxc_wine_setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
# so that mgfxc can be run on Linux / macOS systems.

# check dependencies
if ! type "wine64" > /dev/null 2>&1
WINEEXECUTABLE="wine64"
if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
then
echo "wine64 not found"
WINEEXECUTABLE="wine"
fi

if ! type "$WINEEXECUTABLE" > /dev/null 2>&1
then
echo "$WINEEXECUTABLE not found"
exit 1
fi

Expand All @@ -17,7 +23,7 @@ fi

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

TEMP_DIR="${TMPDIR:-/tmp}"
SCRIPT_DIR="$TEMP_DIR/winemg2"
Expand All @@ -40,7 +46,7 @@ REGEDIT4
_EOF_

pushd $SCRIPT_DIR
wine64 regedit crashdialog.reg
eval "$WINEEXECUTABLE regedit crashdialog.reg"
popd

# get dotnet
Expand Down