Initial attempt to get a working wine32. This should hopefully work for a while once correctly set up.
This commit is contained in:
@@ -3,6 +3,49 @@
|
||||
# Dialog accessibility
|
||||
export DIALOGOPTS='--no-lines --visit-items'
|
||||
|
||||
# Wine32 version for SAPI compatibility
|
||||
wineThirtyTwoVersion="9.0"
|
||||
|
||||
# Check and manage wine32 installation
|
||||
check_wine32() {
|
||||
local wine32Dir="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/wine32"
|
||||
local versionFile="$wine32Dir/VERSION"
|
||||
local currentVersion=""
|
||||
|
||||
# Check current installed version
|
||||
[[ -f "$versionFile" ]] && currentVersion=$(cat "$versionFile")
|
||||
|
||||
# If version mismatch or missing, install/update
|
||||
if [[ "$currentVersion" != "$wineThirtyTwoVersion" ]]; then
|
||||
echo "Setting up Wine32 version $wineThirtyTwoVersion for SAPI compatibility..."
|
||||
|
||||
# Remove old installation
|
||||
rm -rf "$wine32Dir" 2>/dev/null
|
||||
mkdir -p "$wine32Dir"
|
||||
|
||||
# Download and install wine32
|
||||
local installFile="$(mktemp)"
|
||||
if curl -L --output "$installFile" "https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-x86/PlayOnLinux-wine-${wineThirtyTwoVersion}-upstream-linux-x86.tar.gz"; then
|
||||
if tar xf "$installFile" -C "$wine32Dir" --strip-components=1; then
|
||||
echo "$wineThirtyTwoVersion" > "$versionFile"
|
||||
echo "Wine32 version $wineThirtyTwoVersion installed successfully."
|
||||
else
|
||||
echo "Failed to extract wine32. SAPI games may not work properly."
|
||||
rm -rf "$wine32Dir"
|
||||
fi
|
||||
else
|
||||
echo "Failed to download wine32. SAPI games may not work properly."
|
||||
fi
|
||||
rm -f "$installFile"
|
||||
fi
|
||||
|
||||
# Export wine32 path for bottle.sh
|
||||
if [[ -f "$wine32Dir/bin/wine" ]]; then
|
||||
export wine32="$wine32Dir/bin/wine"
|
||||
export wine32server="$wine32Dir/bin/wineserver"
|
||||
fi
|
||||
}
|
||||
|
||||
# Install games
|
||||
game_installer() {
|
||||
export LANG="en_US.UTF-8"
|
||||
@@ -476,6 +519,8 @@ source .includes/update.sh
|
||||
|
||||
# Check minimum requirements
|
||||
check_requirements || exit 1
|
||||
# Set up wine32 for SAPI games
|
||||
check_wine32
|
||||
# Check for updates
|
||||
update
|
||||
# Get latest news if available
|
||||
|
Reference in New Issue
Block a user