From bf888095f552a8a7168cf9c3de2f5ab4d7dd87f5 Mon Sep 17 00:00:00 2001 From: castro-fidel Date: Wed, 1 Mar 2023 00:51:42 +0300 Subject: [PATCH] Scripts version 2172 --- data_from_portwine/changelog_eng | 3 +++ data_from_portwine/changelog_rus | 3 +++ data_from_portwine/scripts/functions_helper | 15 +++++++++------ data_from_portwine/scripts/var | 2 +- data_from_portwine/scripts/zen_yad_gui | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/data_from_portwine/changelog_eng b/data_from_portwine/changelog_eng index 21536ac..bc6bcef 100755 --- a/data_from_portwine/changelog_eng +++ b/data_from_portwine/changelog_eng @@ -2,6 +2,9 @@ You can help us in the development of the project on the website: boosty.to/linu ----------------------------------------- Changelog: +###Scripts version 2172### +* minor improvements searching the .exe files + ###Scripts version 2171### * all shortcuts created in the PortProton directory are automatically added to the "INSTALLED" tab item with which you can launch installed games and applications from PortProton itself * the menu tab "INSTALLED" is automatically transferred as the main (first) tab in PortProton, if you already have shortcuts to installed games or programs diff --git a/data_from_portwine/changelog_rus b/data_from_portwine/changelog_rus index bffc213..48223bf 100755 --- a/data_from_portwine/changelog_rus +++ b/data_from_portwine/changelog_rus @@ -2,6 +2,9 @@ ----------------------------------------- История изменений: +###Scripts version 2172### +* небольшие улучшения поиска .exe файлов + ###Scripts version 2171### * в пункт меню "УСТАНОВЛЕННЫЕ" автоматически добавляются все ярлыки созданные в каталоге PortProton с помощью которых вы можете запускать установленные игры и приложения из самого PortProton * пункт меню "УСТАНОВЛЕННЫЕ" автоматически переноситься как главная (первая) вкладка в PortProton, если у вас уже есть ярлыки установленных игр или программ diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 2f17979..9d53b4f 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -978,17 +978,20 @@ pw_find_exe () { PW_EXCLUDE_EXE_FIND='(windows|explorer|anticheat|programdata|redist|setup|.ppdb|unin|error|crash|handler|install|/jre/|steam|uploader|eac|netframe)' PW_PATH_FOR_FIND="${PORT_WINE_PATH}/data/prefixes/" - find -P "${PW_PATH_FOR_FIND}" -type f -name "*.exe" ${PW_FIND_TIME} | grep -viE ${PW_EXCLUDE_EXE_FIND} | awk -F"/prefixes/" '{print $2}' > "${PORT_WINE_TMP_PATH}/tmp_yad_find_exe" + pw_start_progress_bar_block "Searching for .exe files... Please wait." + find -P "${PW_PATH_FOR_FIND}" -type f -name "*.exe" ${PW_FIND_TIME} | grep -viE ${PW_EXCLUDE_EXE_FIND} | \ + awk -F"/prefixes/" '{print $2}' > "${PORT_WINE_TMP_PATH}/tmp_yad_find_exe" + pw_stop_progress_bar unset FIND_TO_GUI while read line; do - FIND_TO_GUI+="false%${line}%" + FIND_TO_GUI+="${line}%" done < "${PORT_WINE_TMP_PATH}/tmp_yad_find_exe" OrigIFS="$IFS" && IFS=% - PW_SET_FIND_EXE="$("${pw_yad_new}" --height="300" --width="1000" --center --list --radiolist \ + PW_SET_FIND_EXE="$("${pw_yad_new}" --height="300" --width="1000" --center --list \ --text-align=center --window-icon="$PW_GUI_ICON_PATH/port_proton.png" --title "Create shortcut for..." \ - --text="\n${loc_gui_create_shortcut_for_exe}" --column="set:" --column="path to .exe file:" ${FIND_TO_GUI})" + --text="\n${loc_gui_create_shortcut_for_exe}" --column="path to .exe file:" ${FIND_TO_GUI})" YAD_STATUS="$?" print_var YAD_STATUS if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" || -z "${PW_SET_FIND_EXE}" ]] ; then @@ -998,8 +1001,8 @@ pw_find_exe () { IFS=$OrigIFS if [[ -n "${PW_SET_FIND_EXE}" ]] ; then - portwine_exe="${PW_PATH_FOR_FIND}$(echo "${PW_SET_FIND_EXE}" | awk -F'|' '{print $2}')" - portwine_create_shortcut + portwine_exe="${PW_PATH_FOR_FIND}$(echo "${PW_SET_FIND_EXE}" | awk -F'|' '{print $1}')" + portwine_create_shortcut silent /usr/bin/env bash -c ${pw_full_command_line[*]} & exit 0 fi diff --git a/data_from_portwine/scripts/var b/data_from_portwine/scripts/var index 244f59c..f6ae465 100755 --- a/data_from_portwine/scripts/var +++ b/data_from_portwine/scripts/var @@ -1,6 +1,6 @@ #!/usr/bin/env bash #Author: Castro-Fidel (linux-gaming.ru) -#SCRIPTS_NEXT_VERSION=2171 +#SCRIPTS_NEXT_VERSION=2172 ######################################################################## export PW_MANGOHUD=0 export MANGOHUD_CONFIG=cpu_stats,cpu_temp,cpu_mhz,cpu_color=2e97cb,cpu_text=CPU,gpu_stats,gpu_temp,gpu_core_clock,gpu_mem_clock,vulkan_driver,gpu_name,gpu_color=2e9762,gpu_text=GPU,vram,vram_color=ad64c1,ram,ram_color=c26693,io_color=a491d3,frame_timing=1,frametime_color=00ff00,time,arch,wine,wine_color=eb5b5b,engine_color=eb5b5b,background_alpha=0.2,font_size=24,background_color=020202,text_color=ffffff,toggle_hud=Shift_R+F12,resolution,vkbasalt diff --git a/data_from_portwine/scripts/zen_yad_gui b/data_from_portwine/scripts/zen_yad_gui index 83cdb38..47a0288 100755 --- a/data_from_portwine/scripts/zen_yad_gui +++ b/data_from_portwine/scripts/zen_yad_gui @@ -487,7 +487,7 @@ portwine_create_shortcut () { cp -f "${PORT_WINE_PATH}/${name_desktop}.desktop" "${HOME}/Рабочий стол/" fi fi - xdg-open "${PORT_WINE_PATH}" 2>1 >/dev/null & + [[ "$1" != silent ]] && xdg-open "${PORT_WINE_PATH}" 2>1 >/dev/null & } portwine_delete_shortcut () {