From e94b4ed13b7ed7ec9305c314e999e444f67aaa59 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 7 Aug 2025 02:18:15 -0400 Subject: [PATCH] Send inital setup stuff like installing wine32 through progress indication system. --- audiogame-manager.sh | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 03744b3..22af297 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -17,26 +17,28 @@ check_wine32() { # 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 + # Download wine32 using existing download function + local wineFile="PlayOnLinux-wine-${wineThirtyTwoVersion}-upstream-linux-x86.tar.gz" + local wineUrl="https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-x86/${wineFile}" + + # 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 "Wine32 version $wineThirtyTwoVersion installed successfully." + echo "# Wine32 setup complete." 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" fi - else - echo "Failed to download wine32. SAPI games may not work properly." - fi - rm -f "$installFile" + } | agm_progressbox "Wine32 Setup" "Extracting Wine32 for SAPI compatibility..." fi # Export wine32 path for bottle.sh