From 0b613aca389425846e8a0d3055e4c92f99282058 Mon Sep 17 00:00:00 2001
From: Mikhail Tergoev <fidel@altlinux.org>
Date: Fri, 28 Feb 2025 03:15:26 +0300
Subject: [PATCH] minor updated pw_wineboot

---
 data_from_portwine/scripts/functions_helper | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper
index 0c7c7b2f..efc405e5 100755
--- a/data_from_portwine/scripts/functions_helper
+++ b/data_from_portwine/scripts/functions_helper
@@ -3180,14 +3180,18 @@ start_portwine () {
 
         LIST_ICU_DLL_LINKS="icuin68 icuuc68 icudt68"
         for dll in $LIST_ICU_DLL_LINKS ; do
-            try_force_link_file "${WINEDIR}/lib/icu/${dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/${dll}.dll"
-            try_force_link_file "${WINEDIR}/lib64/icu/${dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/${dll}.dll"
+            if [[ -f "${WINEDIR}/lib/icu/${dll}.dll" ]] ; then
+                try_force_link_file "${WINEDIR}/lib/icu/${dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/${dll}.dll"
+                try_force_link_file "${WINEDIR}/lib64/icu/${dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/${dll}.dll"
+            else
+                try_remove_file "${WINEPREFIX}/drive_c/windows/syswow64/${dll}.dll"
+                try_remove_file "${WINEPREFIX}/drive_c/windows/system32/${dll}.dll"
+            fi
         done
 
         print_info "Used wineboot $@ for prefix: ${PW_PREFIX_NAME}"
         ${pw_runtime} GST_PLUGIN_SYSTEM_PATH_1_0="" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" \
-        WINEDEBUG="fixme-all,err+loaddll,err+dll,err+file,err+reg" \
-        "${WINELOADER}" wineboot $@ &>>"${PW_TMPFS_PATH}/update_pfx_log"
+        WINEDEBUG="err+all" "${WINELOADER}" wineboot $@ &>>"${PW_TMPFS_PATH}/update_pfx_log"
         wait_wineserver
         print_info "The prefix has been updated."
     }