From 936ce2d2a9fae0f3928f2352fa0ad768b9759096 Mon Sep 17 00:00:00 2001 From: tb14 Date: Wed, 2 Jul 2025 01:43:00 -0500 Subject: [PATCH] clean up .lnk shortcuts on desktop. fix register pdh.dll error message that is normal --- AmRRON-Vara-setup.sh | 40 ++++++++++++++++++++++++------ changelogs/CHANGELOG-Vara-setup.md | 1 + 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/AmRRON-Vara-setup.sh b/AmRRON-Vara-setup.sh index 68c6fef..e426eda 100755 --- a/AmRRON-Vara-setup.sh +++ b/AmRRON-Vara-setup.sh @@ -418,9 +418,14 @@ for FILE in "${FILES[@]}"; do echo "$FILE already exists in $TARGET_DIR." fi - # Register the DLL with wine regsvr32 - register_dll "$TARGET_DIR/$FILE" || - { ERRCODE="Failed to register $FILE with wine regsvr32"; errors; } + # Skip registering pdh.dll + if [ "$FILE" != "pdh.dll" ]; then + # Register the DLL with wine regsvr32 + register_dll "$TARGET_DIR/$FILE" || + { ERRCODE="Failed to register $FILE with wine regsvr32"; errors; return; } + else + echo "Skipping registration for $FILE." + fi done @@ -473,9 +478,14 @@ for FILE in "${FILES[@]}"; do echo "$FILE already exists in $TARGET_DIR." fi - # Register the DLL with wine regsvr32 - register_dll "$TARGET_DIR/$FILE" || - { ERRCODE="Failed to register $FILE with wine regsvr32"; errors; } + # Skip registering pdh.dll + if [ "$FILE" != "pdh.dll" ]; then + # Register the DLL with wine regsvr32 + register_dll "$TARGET_DIR/$FILE" || + { ERRCODE="Failed to register $FILE with wine regsvr32"; errors; return; } + else + echo "Skipping registration for $FILE." + fi done cd $HOME/Downloads && if ls VARA* 1> /dev/null 2>&1; then rm VARA* 2>/dev/null; fi && wget ${VARAFMLINK} || @@ -704,7 +714,23 @@ bash install_winelink.sh vara_only } function complete() { - rm /tmp/results + if [[ -f /tmp/results ]]; then + rm /tmp/results + fi + # Define the directory and file pattern +DIR="$HOME/Desktop" +PATTERN="*.lnk" + +# Loop through each .lnk file and remove it if it exists +for FILE in $DIR/$PATTERN; do + if [ -f "$FILE" ]; then + rm "$FILE" || + { ERRCODE="Failed to remove $FILE"; errors; } + else + echo "$FILE not found." + fi +done + echo "All selected updates have been completed." | yad --image=$DIR/images/donate2.png \ --text-info --center --wrap --button="gtk-ok:0" \ --title "Complete" ${r} ${c} diff --git a/changelogs/CHANGELOG-Vara-setup.md b/changelogs/CHANGELOG-Vara-setup.md index 44ed9b4..07c369a 100644 --- a/changelogs/CHANGELOG-Vara-setup.md +++ b/changelogs/CHANGELOG-Vara-setup.md @@ -1,6 +1,7 @@ # Version 1.2.1 - in testing, missing .ocx files were discovered. These are not locally hosted in the repo and copied during installation. - Added option to purge installation. +- clean up .lnk files on desktop at close # Version 1.2 - fix error on fresh install where varafm/varahf will not download # Version 1.1.1