From aef7a72478c6cb8919c19b6d0d21668dc1596f7c Mon Sep 17 00:00:00 2001 From: Boria138 Date: Sat, 11 May 2024 21:53:10 +0500 Subject: [PATCH] Use icoextract instead of wrestool (if available) icoextract is able to extract an icon from an exe that wrestool is unable to extract an icon from. --- data_from_portwine/scripts/functions_helper | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 21a2f2d8..1d2e3467 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -1441,7 +1441,9 @@ pw_create_gui_png () { if [[ ! -f "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" ]] ; then try_remove_dir "${PORT_WINE_TMP_PATH}/tmp_img" create_new_dir "${PORT_WINE_TMP_PATH}/tmp_img" - if command -v wrestool &>/dev/null ; then + if command -v icoextract &>/dev/null ; then + icoextract "$(readlink -f "${portwine_exe}")" "${PORT_WINE_TMP_PATH}/tmp_img/${PORTPROTON_NAME}.ico" + elif command -v wrestool &>/dev/null ; then wrestool -x --output="${PORT_WINE_TMP_PATH}/tmp_img/" -t14 "$(readlink -f "${portwine_exe}")" else env LD_LIBRARY_PATH="${PW_PLUGINS_PATH}/portable/lib/lib64" "${PW_PLUGINS_PATH}/portable/bin/wrestool" \