With upgrade to wow64 no need to use a variable so switch to direct wine calls.

This commit is contained in:
Storm Dragon
2025-08-04 20:13:38 -04:00
parent 4d2134b9a9
commit ddecf09fb1
2 changed files with 27 additions and 29 deletions

View File

@@ -72,9 +72,9 @@ game_installer() {
game_removal() {
source .includes/bottle.sh
if [[ "$(uname -m)" == "aarch64" ]]; then
export wine="${wine:-/usr/bin/wine}"
# Modern wine is unified
else
export wine="${wine:-/usr/bin/wine}"
# Modern wine is unified
fi
mapfile -t lines < <(sed -e '/^$/d' -e '/^[[:space:]]*#/d' "${configFile}" 2> /dev/null)
if [[ ${#lines} -eq 0 ]]; then
@@ -111,7 +111,7 @@ game_removal() {
if [[ "${HOME}/.local/wine/${game%|*}" == "${WINEPREFIX}" ]]; then
read -rp "To remove the wine bottle \"${WINEPREFIX##*/}\" and all of its contents press enter. To cancel press control+c. " continue
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
${wine}server -k
wineserver -k
# remove the game
rm -rf "${WINEPREFIX}"
else
@@ -129,9 +129,9 @@ game_removal() {
kill_game() {
source .includes/bottle.sh
if [[ "$(uname -m)" == "aarch64" ]]; then
export wine="${wine:-/usr/bin/wine}"
# Modern wine is unified
else
export wine="${wine:-/usr/bin/wine}"
# Modern wine is unified
fi
mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null)
if [[ ${#lines} -eq 0 ]]; then
@@ -163,7 +163,7 @@ kill_game() {
wineExec="${wineExec##*\\}"
# kill the wine server.
get_bottle "${game%|*}"
${wine}server -k
wineserver -k
echo "The selected game has been stopped."
fi
exit 0
@@ -231,7 +231,7 @@ custom_launch_parameters() {
fi
if [[ "${game[0]}" == "screaming-strike-2" ]]; then
pushd "$(winepath "$winePath")"
${wine} "$wineExec"
wine "$wineExec"
popd
exit 0
fi
@@ -249,7 +249,7 @@ custom_launch_parameters() {
fi
if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then
# switch to wine64 for 64 bit prefix.
[[ "${wine}" == "/usr/bin/wine" ]] && export wine="/usr/bin/wine64"
# Modern wine is unified - no separate wine32/wine64 executables
fi
}
@@ -334,14 +334,14 @@ game_launcher() {
get_bottle "${game[0]}"
# make sure wine is actually set to something
if [[ "$(uname -m)" == "aarch64" ]]; then
export wine="${wine:-/usr/bin/wine}"
# Modern wine is unified
else
export wine="${wine:-/usr/bin/wine}"
# Modern wine is unified
fi
echo -n "launching "
${wine} --version
wine --version
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
${wine}server -k
wineserver -k
# launch the game
if command -v qjoypad &> /dev/null ; then
mkdir -p ~/.qjoypad3
@@ -358,7 +358,7 @@ game_launcher() {
fi
process_launcher_flags
custom_launch_parameters
${wine:-/usr/bin/wine} start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime
wine start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime
fi
exit 0
}