Send inital setup stuff like installing wine32 through progress indication system.

This commit is contained in:
Storm Dragon
2025-08-07 02:18:15 -04:00
parent 50bb078de2
commit e94b4ed13b

View File

@@ -17,26 +17,28 @@ check_wine32() {
# If version mismatch or missing, install/update # If version mismatch or missing, install/update
if [[ "$currentVersion" != "$wineThirtyTwoVersion" ]]; then if [[ "$currentVersion" != "$wineThirtyTwoVersion" ]]; then
echo "Setting up Wine32 version $wineThirtyTwoVersion for SAPI compatibility..."
# Remove old installation # Remove old installation
rm -rf "$wine32Dir" 2>/dev/null rm -rf "$wine32Dir" 2>/dev/null
mkdir -p "$wine32Dir" mkdir -p "$wine32Dir"
# Download and install wine32 # Download wine32 using existing download function
local installFile="$(mktemp)" local wineFile="PlayOnLinux-wine-${wineThirtyTwoVersion}-upstream-linux-x86.tar.gz"
if curl -L --output "$installFile" "https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-x86/PlayOnLinux-wine-${wineThirtyTwoVersion}-upstream-linux-x86.tar.gz"; then local wineUrl="https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-x86/${wineFile}"
if tar xf "$installFile" -C "$wine32Dir" --strip-components=1; then
# Use existing download function which handles progress
download "$wineUrl"
# Extract with progress feedback
{
echo "# Extracting Wine32 version $wineThirtyTwoVersion..."
if tar xf "${cache}/${wineFile}" -C "$wine32Dir" --strip-components=1; then
echo "$wineThirtyTwoVersion" > "$versionFile" echo "$wineThirtyTwoVersion" > "$versionFile"
echo "Wine32 version $wineThirtyTwoVersion installed successfully." echo "# Wine32 setup complete."
else else
echo "Failed to extract wine32. SAPI games may not work properly." echo "# Failed to extract wine32. SAPI games may not work properly."
rm -rf "$wine32Dir" rm -rf "$wine32Dir"
fi fi
else } | agm_progressbox "Wine32 Setup" "Extracting Wine32 for SAPI compatibility..."
echo "Failed to download wine32. SAPI games may not work properly."
fi
rm -f "$installFile"
fi fi
# Export wine32 path for bottle.sh # Export wine32 path for bottle.sh