forked from CastroFidel/PortWINE
		
	Merge branch 'fixed-vulkaninfo' of github.com:Htylol/PortWINE into Htylol-fixed-vulkaninfo
This commit is contained in:
		| @@ -477,6 +477,16 @@ unpack () { | ||||
|     fi | ||||
| } | ||||
|  | ||||
| debug_timer () { | ||||
|     if [[ "$1" == "--start" ]] ; then | ||||
|         START=$(date +%s%N) | ||||
|     elif [[ "$1" == "--end" ]] ; then | ||||
|         END=$(date +%s%N) | ||||
|         DIFF=$((($END - $START)/1000000)) | ||||
|         print_warning "It took $DIFF milliseconds for $2" | ||||
|     fi | ||||
| } | ||||
|  | ||||
| combobox_fix () { | ||||
|     name1="$1" | ||||
|     name2="$2" | ||||
| @@ -1617,9 +1627,17 @@ pw_create_gui_png () { | ||||
|             PORTPROTON_NAME="${PORTWINE_CREATE_SHORTCUT_NAME}" | ||||
|         else | ||||
|             if command -v exiftool &>/dev/null ; then | ||||
|                 PW_PRODUCTNAME=$(exiftool -ProductName "${portwine_exe}" 2>/dev/null | sed -n 's/^Product Name\s*:\s*//p') | ||||
|                 if ! PW_PRODUCTNAME=$(timeout 3 exiftool -ProductName "${portwine_exe}" 2>/dev/null | sed -n 's/^Product Name\s*:\s*//p') ; then | ||||
|                     print_error "exiftool - broken!" | ||||
|                     if [[ ! -z $PW_DEBUG ]] ; then | ||||
|                         debug_timer --start | ||||
|                         timeout 5 exiftool -ProductName "${portwine_exe}" | ||||
|                         debug_timer --end "exiftool" | ||||
|                     fi | ||||
|                 fi | ||||
|             else | ||||
|                 PW_PRODUCTNAME=$(env PERL5LIB="${PW_PLUGINS_PATH}/portable/lib/perl5" "${PW_PLUGINS_PATH}/portable/bin/exiftool" -ProductName "${portwine_exe}" 2>/dev/null | sed -n 's/^Product Name\s*:\s*//p') | ||||
|                 print_warning "use portable exiftool" | ||||
|                 PW_PRODUCTNAME=$(env PERL5LIB="${PW_PLUGINS_PATH}/portable/lib/perl5" "${PW_PLUGINS_PATH}/portable/bin/exiftool" -ProductName "${portwine_exe}" | sed -n 's/^Product Name\s*:\s*//p') | ||||
|             fi | ||||
|  | ||||
|             if [[ "$PW_PRODUCTNAME" =~ "Launcher" ]] \ | ||||
| @@ -4340,10 +4358,10 @@ gui_gamescope () { | ||||
|     PW_GS_EXPOSE_WAYLAND PW_GS_REALTIME_SCHEDULING PW_GS_FIX_AMD_AND_INTEL | ||||
|     " | ||||
|  | ||||
|     grep -e '--mangoapp' "${PW_TMPFS_PATH}/gamescope-help.tmp" &>/dev/null && add_to_var PW_GS_LIST "PW_GS_MANGOAPP" | ||||
|     grep -e '--mangoapp' "${PW_TMPFS_PATH}/gamescope.tmp" &>/dev/null && add_to_var PW_GS_LIST "PW_GS_MANGOAPP" | ||||
|  | ||||
|     if check_wayland_session ; then | ||||
|         grep -e '--backend' "${PW_TMPFS_PATH}/gamescope-help.tmp" &>/dev/null \ | ||||
|         grep -e '--backend' "${PW_TMPFS_PATH}/gamescope.tmp" &>/dev/null \ | ||||
|         && add_to_var PW_GS_LIST "PW_GS_BACKEND_SDL" && add_to_var PW_GS_LIST "PW_GS_SDL_VIDEODRIVER_X11" | ||||
|     else | ||||
|         export PW_GS_BACKEND_SDL="0" | ||||
| @@ -4352,7 +4370,7 @@ gui_gamescope () { | ||||
|  | ||||
|     GS_FILTER_CB="linear!nearest!fsr!nis!pixel" | ||||
|     #debian bookworm fix | ||||
|     if grep -e '-U, --fsr-upscaling' "${PW_TMPFS_PATH}/gamescope-help.tmp" &>/dev/null ; then | ||||
|     if grep -e '-U, --fsr-upscaling' "${PW_TMPFS_PATH}/gamescope.tmp" &>/dev/null ; then | ||||
|         GS_FILTER_CB="fsr!nis" | ||||
|         export PW_GS_FILTER_MODE_OLD="true" | ||||
|         rm_from_var PW_GS_LIST "PW_GS_HDR_ENABLE" | ||||
| @@ -4553,8 +4571,18 @@ resize_png () { | ||||
|     try_remove_file "${PORT_WINE_PATH}/data/img/Launcher.png" | ||||
|  | ||||
|     if check_flatpak ; then | ||||
|         exe-thumbnailer --force-resize -s "$RESIZE_TO" "$(readlink -f "${RESIZE_FILE}")" "${PORT_WINE_PATH}/data/img/${RESIZE_NAME_PNG}.png" | ||||
|         if ! timeout 3 \ | ||||
|         exe-thumbnailer --force-resize -s "$RESIZE_TO" "$(readlink -f "${RESIZE_FILE}")" "${PORT_WINE_PATH}/data/img/${RESIZE_NAME_PNG}.png" 2>/dev/null | ||||
|         then | ||||
|             print_error "exe-thumbnailer - broken!" | ||||
|             if [[ ! -z $PW_DEBUG ]] ; then | ||||
|                 debug_timer --start | ||||
|                 timeout 5 exe-thumbnailer --force-resize -s "$RESIZE_TO" "$(readlink -f "${RESIZE_FILE}")" "${PORT_WINE_PATH}/data/img/${RESIZE_NAME_PNG}.png" | ||||
|                 debug_timer --end "exe-thumbnailer" | ||||
|             fi | ||||
|         fi | ||||
|     else | ||||
|         print_warning "use portable exe-thumbnailer" | ||||
|         env PYTHONPATH="${PW_PLUGINS_PATH}/portable/lib/python3.9/site-packages/" \ | ||||
|         LD_LIBRARY_PATH="${PW_PLUGINS_PATH}/portable/lib/lib64" \ | ||||
|         "${PW_WINELIB}/runtime/files/bin/python3.9"  \ | ||||
| @@ -4720,22 +4748,8 @@ pw_auto_create_shortcut () { | ||||
|     SORTED_LINKS=($(echo ${LINKS[@]} | tr ' ' '\n' | sort -u)) | ||||
|  | ||||
|     for link_file in "${SORTED_LINKS[@]//@_@/ }" ; do | ||||
|         if timeout 3 exiftool "$link_file" 2>/dev/null > "${PW_TMPFS_PATH}/exiftool.tmp" ; then | ||||
|             prefix_name=$(echo "$link_file" | awk -F"/prefixes/" '{print $2}' | awk -F"/" '{print $1}') | ||||
|             if fix_icon_name=$(grep -i "Icon File Name" "${PW_TMPFS_PATH}/exiftool.tmp" 2>/dev/null) \ | ||||
|             && [[ "${fix_icon_name//*.exe/true}" == "true" ]] ; then | ||||
|                 link_drive=$(sed -n 's/^Icon File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | cut -d: -f1 | awk '{print tolower($0)}') | ||||
|                 link_path=$(sed -n 's/^Icon File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | sed 's|%ProgramFiles(x86)%|C:\\Program Files (x86)|gi;s|%ProgramFiles%|C:\\Program Files|gi' | sed "s|^.|${PORT_WINE_PATH}/data/prefixes/$prefix_name/dosdevices/$link_drive|g" | sed 's/\\/\//g') | ||||
|             else | ||||
|                 link_drive=$(sed -n 's/^Local Base Path\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | cut -d: -f1 | awk '{print tolower($0)}') | ||||
|                 link_path=$(sed -n 's/^Local Base Path\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | sed 's|%ProgramFiles(x86)%|C:\\Program Files (x86)|gi;s|%ProgramFiles%|C:\\Program Files|gi' | sed "s|^.|${PORT_WINE_PATH}/data/prefixes/$prefix_name/dosdevices/$link_drive|g" | sed 's/\\/\//g') | ||||
|             fi | ||||
|             link_name=$(sed -n 's/^File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | sed 's|\.lnk||') | ||||
|             link_cmd=$(sed -n 's/^Command Line Arguments\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp") | ||||
|         else | ||||
|             if ! command -v exiftool &>/dev/null ; then | ||||
|                 print_warning "use portable exiftool" | ||||
|                 env PERL5LIB="${PW_PLUGINS_PATH}/portable/lib/perl5" "${PW_PLUGINS_PATH}/portable/bin/exiftool" "$link_file" 2>/dev/null > "${PW_TMPFS_PATH}/exiftool.tmp" | ||||
|         if command -v exiftool &>/dev/null ; then | ||||
|             if timeout 3 exiftool "$link_file" 2>/dev/null &> "${PW_TMPFS_PATH}/exiftool.tmp" ; then | ||||
|                 prefix_name=$(echo "$link_file" | awk -F"/prefixes/" '{print $2}' | awk -F"/" '{print $1}') | ||||
|                 if fix_icon_name=$(grep -i "Icon File Name" "${PW_TMPFS_PATH}/exiftool.tmp" 2>/dev/null) \ | ||||
|                 && [[ "${fix_icon_name//*.exe/true}" == "true" ]] ; then | ||||
| @@ -4748,8 +4762,27 @@ pw_auto_create_shortcut () { | ||||
|                 link_name=$(sed -n 's/^File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | sed 's|\.lnk||') | ||||
|                 link_cmd=$(sed -n 's/^Command Line Arguments\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp") | ||||
|             else | ||||
|                 yad_error "exiftool - broken!" | ||||
|                 print_error "exiftool - broken!" | ||||
|                 if [[ ! -z $PW_DEBUG ]] ; then | ||||
|                     debug_timer --start | ||||
|                     timeout 5 exiftool "$link_file" | ||||
|                     debug_timer --end "exiftool" | ||||
|                 fi | ||||
|             fi | ||||
|         else | ||||
|             print_warning "use portable exiftool" | ||||
|             env PERL5LIB="${PW_PLUGINS_PATH}/portable/lib/perl5" "${PW_PLUGINS_PATH}/portable/bin/exiftool" "$link_file" &> "${PW_TMPFS_PATH}/exiftool.tmp" | ||||
|             prefix_name=$(echo "$link_file" | awk -F"/prefixes/" '{print $2}' | awk -F"/" '{print $1}') | ||||
|             if fix_icon_name=$(grep -i "Icon File Name" "${PW_TMPFS_PATH}/exiftool.tmp" 2>/dev/null) \ | ||||
|             && [[ "${fix_icon_name//*.exe/true}" == "true" ]] ; then | ||||
|                 link_drive=$(sed -n 's/^Icon File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | cut -d: -f1 | awk '{print tolower($0)}') | ||||
|                 link_path=$(sed -n 's/^Icon File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | sed 's|%ProgramFiles(x86)%|C:\\Program Files (x86)|gi;s|%ProgramFiles%|C:\\Program Files|gi' | sed "s|^.|${PORT_WINE_PATH}/data/prefixes/$prefix_name/dosdevices/$link_drive|g" | sed 's/\\/\//g') | ||||
|             else | ||||
|                 link_drive=$(sed -n 's/^Local Base Path\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | cut -d: -f1 | awk '{print tolower($0)}') | ||||
|                 link_path=$(sed -n 's/^Local Base Path\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | sed 's|%ProgramFiles(x86)%|C:\\Program Files (x86)|gi;s|%ProgramFiles%|C:\\Program Files|gi' | sed "s|^.|${PORT_WINE_PATH}/data/prefixes/$prefix_name/dosdevices/$link_drive|g" | sed 's/\\/\//g') | ||||
|             fi | ||||
|             link_name=$(sed -n 's/^File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | sed 's|\.lnk||') | ||||
|             link_cmd=$(sed -n 's/^Command Line Arguments\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp") | ||||
|         fi | ||||
|          | ||||
|         try_remove_file "$link_file" | ||||
| @@ -5007,11 +5040,11 @@ portwine_start_debug () { | ||||
|     echo "------------------------------------------------" >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     echo "RAM:" >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     free -m >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     echo "--------------------------------------------------" >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     echo "--------------------------------------------------------------" >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     echo "Filesystem "${PATH_TO_GAME}" - $(stat -f -c %T "${PATH_TO_GAME}")" >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     echo "Filesystem "${PORT_WINE_PATH}" - $(stat -f -c %T "${PORT_WINE_PATH}")" >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     echo "Filesystem "${PW_TMPFS_PATH}" - $(stat -f -c %T "${PW_TMPFS_PATH}")" >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     echo "-----------------------------------------------" >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     echo "---------------------------------------------------------------" >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     echo "Graphic cards and drivers:" >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     echo 'lspci -k | grep -EA3 VGA|3D|Display :' >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|     lspci -k | grep -EA3 'VGA|3D|Display' >> "${PORT_WINE_PATH}/PortProton.log" | ||||
|   | ||||
| @@ -224,57 +224,76 @@ pw_check_and_download_plugins | ||||
| if [[ "${SKIP_CHECK_UPDATES}" != 1 ]] ; then | ||||
|     pw_port_update | ||||
|  | ||||
|     if timeout 3 gamescope --help 2> "${PW_TMPFS_PATH}/gamescope-help.tmp" ; then | ||||
|         export GAMESCOPE_INSTALLED="1" | ||||
|     else | ||||
|         if ! command -v gamescope &>/dev/null ; then | ||||
|             print_error "gamescope - not found!" | ||||
|     if command -v gamescope &>/dev/null ; then | ||||
|         if timeout 3 gamescope --help 2>/dev/null &> "${PW_TMPFS_PATH}/gamescope.tmp" ; then | ||||
|             export GAMESCOPE_INSTALLED="1" | ||||
|         else | ||||
|             yad_error "gamescope - broken!" | ||||
|             print_error "gamescope - broken!" | ||||
|             if [[ ! -z $PW_DEBUG ]] ; then | ||||
|                 debug_timer --start | ||||
|                 timeout 5 gamescope --help | ||||
|                 debug_timer --end "gamescope" | ||||
|             fi | ||||
|         fi | ||||
|     else | ||||
|         print_warning "gamescope - not found!" | ||||
|     fi | ||||
|  | ||||
|     if timeout 3 vulkaninfo --summary 2>/dev/null > "${PW_TMPFS_PATH}/vulkaninfo.tmp" ; then | ||||
|         VULKAN_DRIVER_NAME="$(grep -e 'driverName' "${PW_TMPFS_PATH}/vulkaninfo.tmp" | awk '{print$3}' | head -1)" | ||||
|         GET_GPU_NAMES=$(awk -F '=' '/deviceName/{print $2}' "${PW_TMPFS_PATH}/vulkaninfo.tmp" | sed '/llvm/d'| sort -u | sed 's/^ //' | paste -sd '!') | ||||
|         export VULKAN_DRIVER_NAME GET_GPU_NAMES | ||||
|     else | ||||
|         if ! command -v vulkaninfo &>/dev/null ; then | ||||
|             print_warning "use portable vulkaninfo" | ||||
|             $PW_PLUGINS_PATH/portable/bin/x86_64-linux-gnu-vulkaninfo 2>/dev/null > "${PW_TMPFS_PATH}/vulkaninfo.tmp" | ||||
|     if command -v vulkaninfo &>/dev/null ; then | ||||
|         if timeout 3 vulkaninfo --summary 2>/dev/null &> "${PW_TMPFS_PATH}/vulkaninfo.tmp" ; then | ||||
|             VULKAN_DRIVER_NAME="$(grep -e 'driverName' "${PW_TMPFS_PATH}/vulkaninfo.tmp" | awk '{print$3}' | head -1)" | ||||
|             GET_GPU_NAMES=$(awk -F '=' '/deviceName/{print $2}' "${PW_TMPFS_PATH}/vulkaninfo.tmp" | sed '/llvm/d'| sort -u | sed 's/^ //' | paste -sd '!') | ||||
|             export VULKAN_DRIVER_NAME GET_GPU_NAMES | ||||
|         else | ||||
|             yad_error "vulkaninfo - broken!" | ||||
|             print_error "vulkaninfo - broken!" | ||||
|             if [[ ! -z $PW_DEBUG ]] ; then | ||||
|                 debug_timer --start | ||||
|                 timeout 5 vulkaninfo | ||||
|                 debug_timer --end "vulkaninfo" | ||||
|             fi | ||||
|         fi | ||||
|     else | ||||
|         print_warning "use portable vulkaninfo" | ||||
|         $PW_PLUGINS_PATH/portable/bin/x86_64-linux-gnu-vulkaninfo &> "${PW_TMPFS_PATH}/vulkaninfo.tmp" | ||||
|         VULKAN_DRIVER_NAME="$(grep -e 'driverName' "${PW_TMPFS_PATH}/vulkaninfo.tmp" | awk '{print$3}' | head -1)" | ||||
|         GET_GPU_NAMES=$(awk -F '=' '/deviceName/{print $2}' "${PW_TMPFS_PATH}/vulkaninfo.tmp" | sed '/llvm/d'| sort -u | sed 's/^ //' | paste -sd '!') | ||||
|         export VULKAN_DRIVER_NAME GET_GPU_NAMES | ||||
|     fi | ||||
|  | ||||
|     if timeout 3 lspci -k 2>/dev/null > "${PW_TMPFS_PATH}/lspci.tmp" ; then | ||||
|         LSPCI_VGA="$(grep -e 'VGA|3D' "${PW_TMPFS_PATH}/lspci.tmp" | tr -d '\n')" | ||||
|         export LSPCI_VGA | ||||
|     else | ||||
|         if ! command -v lspci &>/dev/null ; then | ||||
|             print_error "lspci - not found!" | ||||
|     if command -v lspci &>/dev/null ; then | ||||
|         if timeout 3 lspci -k 2>/dev/null &> "${PW_TMPFS_PATH}/lspci.tmp" ; then | ||||
|             LSPCI_VGA="$(grep -e 'VGA|3D' "${PW_TMPFS_PATH}/lspci.tmp" | tr -d '\n')" | ||||
|             export LSPCI_VGA | ||||
|         else | ||||
|             yad_error "lspci - broken!" | ||||
|             print_error "lspci - broken!" | ||||
|             if [[ ! -z $PW_DEBUG ]] ; then | ||||
|                 debug_timer --start | ||||
|                 timeout 5 lspci -vv | ||||
|                 debug_timer --end "lspci" | ||||
|             fi | ||||
|         fi | ||||
|     else | ||||
|         print_warning "lspci - not found!" | ||||
|     fi | ||||
|  | ||||
|     if timeout 3 xrandr --current 2>/dev/null > "${PW_TMPFS_PATH}/xrandr.tmp" ; then | ||||
|         PW_SCREEN_RESOLUTION="$(cat "${PW_TMPFS_PATH}/xrandr.tmp" | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')" | ||||
|         PW_SCREEN_PRIMARY="$(grep -e 'primary' "${PW_TMPFS_PATH}/xrandr.tmp" | awk '{print $1}')" | ||||
|         export PW_SCREEN_PRIMARY PW_SCREEN_RESOLUTION | ||||
|         echo "" | ||||
|         print_var PW_SCREEN_RESOLUTION PW_SCREEN_PRIMARY | ||||
|     else | ||||
|         if ! command -v xrandr &>/dev/null ; then | ||||
|             print_error "xrandr - not found!" | ||||
|     if command -v xrandr &>/dev/null ; then | ||||
|         if timeout 3 xrandr --current 2>/dev/null &> "${PW_TMPFS_PATH}/xrandr.tmp" ; then | ||||
|             PW_SCREEN_RESOLUTION="$(cat "${PW_TMPFS_PATH}/xrandr.tmp" | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')" | ||||
|             PW_SCREEN_PRIMARY="$(grep -e 'primary' "${PW_TMPFS_PATH}/xrandr.tmp" | awk '{print $1}')" | ||||
|             export PW_SCREEN_PRIMARY PW_SCREEN_RESOLUTION | ||||
|             echo "" | ||||
|             print_var PW_SCREEN_RESOLUTION PW_SCREEN_PRIMARY | ||||
|         else | ||||
|             yad_error "xrandr - broken!" | ||||
|             print_error "xrandr - broken!" | ||||
|             if [[ ! -z $PW_DEBUG ]] ; then | ||||
|                 debug_timer --start | ||||
|                 timeout 5 xrandr --verbose | ||||
|                 debug_timer --end "xrandr" | ||||
|             fi | ||||
|         fi | ||||
|     else | ||||
|         print_warning "xrandr - not found!" | ||||
|     fi | ||||
|     echo "" | ||||
|  | ||||
|     logical_cores=$(grep -c "^processor" /proc/cpuinfo) | ||||
|     if [[ "${logical_cores}" -le "4" ]] ; then | ||||
| @@ -284,24 +303,29 @@ if [[ "${SKIP_CHECK_UPDATES}" != 1 ]] ; then | ||||
|     fi | ||||
|     export GET_LOGICAL_CORE | ||||
|  | ||||
|     if timeout 3 locale -a 2>/dev/null > "${PW_TMPFS_PATH}/locale.tmp" ; then | ||||
|         GET_LOCALE_LIST="ru_RU.utf en_US.utf zh_CN.utf ja_JP.utf ko_KR.utf" | ||||
|         unset LOCALE_LIST | ||||
|         for LOCALE in $GET_LOCALE_LIST ; do | ||||
|             if grep -e $LOCALE "${PW_TMPFS_PATH}/locale.tmp" &>/dev/null ; then | ||||
|                 if [[ ! -z "$LOCALE_LIST" ]] | ||||
|                 then LOCALE_LIST+="!$(grep -e $LOCALE "${PW_TMPFS_PATH}/locale.tmp")" | ||||
|                 else LOCALE_LIST="$(grep -e $LOCALE "${PW_TMPFS_PATH}/locale.tmp")" | ||||
|     if command -v locale &>/dev/null ; then | ||||
|         if timeout 3 locale -a 2>/dev/null &> "${PW_TMPFS_PATH}/locale.tmp" ; then | ||||
|             GET_LOCALE_LIST="ru_RU.utf en_US.utf zh_CN.utf ja_JP.utf ko_KR.utf" | ||||
|             unset LOCALE_LIST | ||||
|             for LOCALE in $GET_LOCALE_LIST ; do | ||||
|                 if grep -e $LOCALE "${PW_TMPFS_PATH}/locale.tmp" &>/dev/null ; then | ||||
|                     if [[ ! -z "$LOCALE_LIST" ]] | ||||
|                     then LOCALE_LIST+="!$(grep -e $LOCALE "${PW_TMPFS_PATH}/locale.tmp")" | ||||
|                     else LOCALE_LIST="$(grep -e $LOCALE "${PW_TMPFS_PATH}/locale.tmp")" | ||||
|                     fi | ||||
|                 fi | ||||
|             fi | ||||
|         done | ||||
|         export LOCALE_LIST | ||||
|     else | ||||
|         if ! command -v locale &>/dev/null ; then | ||||
|             print_error "locale - not found!" | ||||
|             done | ||||
|             export LOCALE_LIST | ||||
|         else | ||||
|             yad_error "locale - broken!" | ||||
|             print_error "locale - broken!" | ||||
|             if [[ ! -z $PW_DEBUG ]] ; then | ||||
|                 debug_timer --start | ||||
|                 timeout 5 locale -a | ||||
|                 debug_timer --end "locale" | ||||
|             fi | ||||
|         fi | ||||
|     else | ||||
|         print_warning "locale - not found!" | ||||
|     fi | ||||
|  | ||||
|     PW_FILESYSTEM=$(stat -f -c %T "${PORT_WINE_PATH}") | ||||
| @@ -648,20 +672,12 @@ else | ||||
|         fi | ||||
|         PW_ICON_PATH="$(grep Icon "${PORT_WINE_PATH}/${PW_DESKTOP_FILES}" | awk -F= '{print $2}')" | ||||
|         PW_NAME_D_ICON_48="${PW_ICON_PATH%.png}_48.png" | ||||
|         PW_NAME_D_ICON_48_HELPER="${PW_ICON_PATH%.png}_48" | ||||
|         if [[ ! -f "${PW_NAME_D_ICON_48}" ]] \ | ||||
|         && [[ -f "${PW_NAME_D_ICON}" ]] ; then | ||||
|             if check_flatpak ; then | ||||
|                 exe-thumbnailer --force-resize -s "48" "${PW_NAME_D_ICON}" "${PW_NAME_D_ICON_48}" | ||||
|             else | ||||
|                 env PYTHONPATH="${PW_PLUGINS_PATH}/portable/lib/python3.9/site-packages/" \ | ||||
|                 LD_LIBRARY_PATH="${PW_PLUGINS_PATH}/portable/lib/lib64" \ | ||||
|                 "${PW_WINELIB}/runtime/files/bin/python3.9" \ | ||||
|                 "${PW_PLUGINS_PATH}/portable/bin/exe-thumbnailer" \ | ||||
|                 --force-resize -s "48" "${PW_NAME_D_ICON}" "${PW_NAME_D_ICON_48}" | ||||
|             fi | ||||
|             resize_png "${PW_NAME_D_ICON}" "${PW_NAME_D_ICON_48_HELPER//"${PORT_WINE_PATH}/data/img/"/}" "48" | ||||
|         fi | ||||
|         PW_DESKTOP_HELPER="${PW_DESKTOP_FILES// /@_@}" | ||||
|         PW_GENERATE_BUTTONS+="--field=   ${PW_DESKTOP_FILES//".desktop"/""}!${PW_NAME_D_ICON_48}!:FBTN%@bash -c \"run_desktop_b_click "${PW_DESKTOP_HELPER}"\"%" | ||||
|         PW_GENERATE_BUTTONS+="--field=   ${PW_DESKTOP_FILES//".desktop"/""}!${PW_NAME_D_ICON_48}!:FBTN%@bash -c \"run_desktop_b_click "${PW_DESKTOP_FILES// /@_@}"\"%" | ||||
|     done | ||||
|  | ||||
|     IFS="$orig_IFS" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user