work on calling the correct version of wine when a game is launched.
This commit is contained in:
@@ -67,9 +67,9 @@ install_rhvoice() {
|
|||||||
download "${RHVoice[${voiceName}]}"
|
download "${RHVoice[${voiceName}]}"
|
||||||
winetricks -q win8 | agm_progressbox "RHVoice Setup" "Preparing Windows environment for RHVoice..."
|
winetricks -q win8 | agm_progressbox "RHVoice Setup" "Preparing Windows environment for RHVoice..."
|
||||||
echo "Installing RHVoice ${voiceName^}..."
|
echo "Installing RHVoice ${voiceName^}..."
|
||||||
"${WINE:-wine}" "${cache}/${voiceFile}" &
|
wine "${cache}/${voiceFile}" &
|
||||||
sleep 20 | agm_progressbox "RHVoice Setup" "Installing RHVoice ${voiceName^} voice..."
|
sleep 20 | agm_progressbox "RHVoice Setup" "Installing RHVoice ${voiceName^} voice..."
|
||||||
"${WINESERVER:-wineserver}" -k
|
wineserver -k
|
||||||
}
|
}
|
||||||
|
|
||||||
install_wine_bottle() {
|
install_wine_bottle() {
|
||||||
@@ -93,16 +93,6 @@ install_wine_bottle() {
|
|||||||
|
|
||||||
export WINEPREFIX="$HOME/.local/wine${architecture}"
|
export WINEPREFIX="$HOME/.local/wine${architecture}"
|
||||||
|
|
||||||
# Use managed wine32 for SAPI compatibility, system wine for everything else
|
|
||||||
if [[ "$WINEARCH" == "win32" ]] && [[ -n "$wine32" ]]; then
|
|
||||||
export WINE="$wine32"
|
|
||||||
export WINESERVER="$wine32server"
|
|
||||||
echo "Using managed Wine32 for SAPI compatibility"
|
|
||||||
else
|
|
||||||
export WINE="wine"
|
|
||||||
export WINESERVER="wineserver"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if bottle already exists and is properly initialized
|
# Check if bottle already exists and is properly initialized
|
||||||
local bottleExists=false
|
local bottleExists=false
|
||||||
if [[ -d "$WINEPREFIX" ]] && [[ -f "$WINEPREFIX/system.reg" ]] && [[ -f "$WINEPREFIX/user.reg" ]]; then
|
if [[ -d "$WINEPREFIX" ]] && [[ -f "$WINEPREFIX/system.reg" ]] && [[ -f "$WINEPREFIX/user.reg" ]]; then
|
||||||
@@ -113,8 +103,8 @@ install_wine_bottle() {
|
|||||||
# Only do basic setup if bottle doesn't exist
|
# Only do basic setup if bottle doesn't exist
|
||||||
if [[ "$bottleExists" == false ]]; then
|
if [[ "$bottleExists" == false ]]; then
|
||||||
echo -n "Creating new wine${architecture} bottle - Using "
|
echo -n "Creating new wine${architecture} bottle - Using "
|
||||||
"$WINE" --version
|
wine --version
|
||||||
DISPLAY="" "$WINE" wineboot -u | agm_progressbox "Wine Setup" "Initializing wine bottle..."
|
DISPLAY="" wine wineboot -u | agm_progressbox "Wine Setup" "Initializing wine bottle..."
|
||||||
|
|
||||||
# Install mono and gecko only for new bottles
|
# Install mono and gecko only for new bottles
|
||||||
monoPath="$(find /usr/share/wine/ -maxdepth 1 -type d -name mono 2> /dev/null)"
|
monoPath="$(find /usr/share/wine/ -maxdepth 1 -type d -name mono 2> /dev/null)"
|
||||||
@@ -127,8 +117,8 @@ install_wine_bottle() {
|
|||||||
download 'http://dl.winehq.org/wine/wine-gecko/2.40/wine_gecko-2.40-x86.msi'
|
download 'http://dl.winehq.org/wine/wine-gecko/2.40/wine_gecko-2.40-x86.msi'
|
||||||
geckoPath="${cache}/wine_gecko-2.40-x86.msi"
|
geckoPath="${cache}/wine_gecko-2.40-x86.msi"
|
||||||
fi
|
fi
|
||||||
"$WINE" msiexec /i z:"$monoPath" /quiet | agm_progressbox "Wine Setup" "Installing .NET Framework..."
|
wine msiexec /i z:"$monoPath" /quiet | agm_progressbox "Wine Setup" "Installing .NET Framework..."
|
||||||
"$WINE" msiexec /i z:"$geckoPath" /quiet | agm_progressbox "Wine Setup" "Installing Web Browser support..."
|
wine msiexec /i z:"$geckoPath" /quiet | agm_progressbox "Wine Setup" "Installing Web Browser support..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install RHVoice only if needed and not already installed
|
# Install RHVoice only if needed and not already installed
|
||||||
|
@@ -9,7 +9,7 @@ install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/P
|
|||||||
if curl -L --output "${cache}/SwampPatch.zip" "https://www.kaldobsky.com/audiogames/SwampPatch.zip" ; then
|
if curl -L --output "${cache}/SwampPatch.zip" "https://www.kaldobsky.com/audiogames/SwampPatch.zip" ; then
|
||||||
install_with_progress unzip "Installing Swamp patch..." -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPatch.zip"
|
install_with_progress unzip "Installing Swamp patch..." -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPatch.zip"
|
||||||
fi
|
fi
|
||||||
"$WINE" 'c:\Program Files\swamp\checkup.exe' /verysilent
|
wine 'c:\Program Files\swamp\checkup.exe' /verysilent
|
||||||
#wine cmd.exe /c 'cd /d c:\Program Files\swamp && Windows64bit.bat'
|
#wine cmd.exe /c 'cd /d c:\Program Files\swamp && Windows64bit.bat'
|
||||||
# Delete music if requested.
|
# Delete music if requested.
|
||||||
if [[ $deleteMusic -eq 0 ]]; then
|
if [[ $deleteMusic -eq 0 ]]; then
|
||||||
|
@@ -41,13 +41,33 @@ check_wine32() {
|
|||||||
} | agm_progressbox "Wine32 Setup" "Extracting Wine32 for SAPI compatibility..."
|
} | agm_progressbox "Wine32 Setup" "Extracting Wine32 for SAPI compatibility..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Export wine32 path for bottle.sh
|
# Export wine32 path for function overrides
|
||||||
if [[ -f "$wine32Dir/bin/wine" ]]; then
|
if [[ -f "$wine32Dir/bin/wine" ]]; then
|
||||||
export wine32="$wine32Dir/bin/wine"
|
export wine32="$wine32Dir/bin/wine"
|
||||||
export wine32server="$wine32Dir/bin/wineserver"
|
export wine32server="$wine32Dir/bin/wineserver"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Wine function overrides for automatic architecture detection
|
||||||
|
wine() {
|
||||||
|
if [[ "$WINEPREFIX" =~ wine32 ]] && [[ -n "$wine32" ]]; then
|
||||||
|
"$wine32" "$@"
|
||||||
|
else
|
||||||
|
command wine "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
wineserver() {
|
||||||
|
if [[ "$WINEPREFIX" =~ wine32 ]] && [[ -n "$wine32server" ]]; then
|
||||||
|
"$wine32server" "$@"
|
||||||
|
else
|
||||||
|
command wineserver "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Export functions so they're available in subshells and sourced scripts
|
||||||
|
export -f wine wineserver
|
||||||
|
|
||||||
# Install games
|
# Install games
|
||||||
game_installer() {
|
game_installer() {
|
||||||
export LANG="en_US.UTF-8"
|
export LANG="en_US.UTF-8"
|
||||||
|
Reference in New Issue
Block a user