From 9f5d1d7b5167d677f40e3ba905a911e61d525776 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Tue, 13 Jun 2023 22:32:50 -0400 Subject: [PATCH] Wine (x86): only uninstall specific pi-apps version if user has manually installed some other wine versions using the `wine-` name previously the uninstall script would remove them on uninstall. this is undesirable if a user wants to have multiple wine versions or types installed at once. --- apps/Wine (x86)/install-32 | 1 + apps/Wine (x86)/uninstall | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/Wine (x86)/install-32 b/apps/Wine (x86)/install-32 index bb6fddc3002..761f1a07bc1 100755 --- a/apps/Wine (x86)/install-32 +++ b/apps/Wine (x86)/install-32 @@ -131,6 +131,7 @@ else fi #Past this point, the pi is running a Wine-compatible kernel. +#note to maintainer, if you change the below version make sure to update it in the uninstall script as well version=8.10 #install box86 diff --git a/apps/Wine (x86)/uninstall b/apps/Wine (x86)/uninstall index f90b0e10e17..093dae8a34c 100755 --- a/apps/Wine (x86)/uninstall +++ b/apps/Wine (x86)/uninstall @@ -1,5 +1,7 @@ #!/bin/bash +version=8.10 + pkill -9 wine command -v wineserver >/dev/null && wineserver -k @@ -8,7 +10,7 @@ sudo rm -rf /usr/local/bin/wine /usr/local/bin/winecfg /usr/local/bin/wineserver status_green "Done" status -n "Removing Wine folders... " -sudo rm -rf /opt/wine-* +sudo rm -rf /opt/wine-${version} rm -rf ~/.cache/winetricks ~/.cache/wine status_green "Done"