Commit bfeb559a authored by Mikhail Tergoev's avatar Mikhail Tergoev

Scripts version 2271

parent 26307299
...@@ -2,6 +2,11 @@ You can help us in the development of the project on the website: https://linux- ...@@ -2,6 +2,11 @@ You can help us in the development of the project on the website: https://linux-
---------------------------------------- ----------------------------------------
Changelog: Changelog:
###Scripts version 2271### Date: 03.04.2024 / Download update size: 15 megabytes
* improved interface of the prefix manager (xterm has been replaced with the standard PortProton interface)
* fixed the launch of the game "Dragon Age: Origin" from EAapp
* many small script improvements
###Scripts version 2270### Date: 31.03.2024 / Download update size: 15 megabytes ###Scripts version 2270### Date: 31.03.2024 / Download update size: 15 megabytes
* added support for the game Horizon Forbidden West (to apply, you need to run the exe of the game and select SETTINGS -> RESET SETTINGS) * added support for the game Horizon Forbidden West (to apply, you need to run the exe of the game and select SETTINGS -> RESET SETTINGS)
* fixed the operation of WINE from Kron4ek and returned the ability to download it using GET-OTHER-WINE * fixed the operation of WINE from Kron4ek and returned the ability to download it using GET-OTHER-WINE
......
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
----------------------------------------- -----------------------------------------
История изменений: История изменений:
###Scripts version 2271### Дата: 03.04.2024 / Размер скачиваемого обновления: 15 мегабайт
* улучшен интерфейс менеджера префиксов (xterm заменен на стандартный интерфейс PortProton)
* исправлена работа русского языка в EAapp (для применения необходимо запустить EALauncher и в PP выбрать НАСТРОЙКИ -> СБРОСИТЬ НАСТРОЙКИ)
* исправлен запуск игры "DragonAge: Origin" из EAapp
* множество небольших улучшений скриптов
###Scripts version 2270### Дата: 31.03.2024 / Размер скачиваемого обновления: 15 мегабайт ###Scripts version 2270### Дата: 31.03.2024 / Размер скачиваемого обновления: 15 мегабайт
* добавлена поддержка игры Horizon Forbidden West (для применения необходимо запустить exe игры и выбрать НАСТРОЙКИ -> СБРОСИТЬ НАСТРОЙКИ) * добавлена поддержка игры Horizon Forbidden West (для применения необходимо запустить exe игры и выбрать НАСТРОЙКИ -> СБРОСИТЬ НАСТРОЙКИ)
* исправлена работа WINE от Kron4ek и возвращена возможность его скачивания с помощью GET-OTHER-WINE * исправлена работа WINE от Kron4ek и возвращена возможность его скачивания с помощью GET-OTHER-WINE
......
...@@ -139,7 +139,7 @@ Akai ...@@ -139,7 +139,7 @@ Akai
Haschwalth Haschwalth
haunteduser haunteduser
Homyakin Homyakin
horuno2020 horuno2020
Igor14936 Igor14936
Ivan Vlasov Ivan Vlasov
ivboss ivboss
...@@ -315,7 +315,7 @@ Akai ...@@ -315,7 +315,7 @@ Akai
Роман Игнатьев Роман Игнатьев
Роман Паженский Роман Паженский
Ростислав Кузнецов Ростислав Кузнецов
Саша Саша
Семён Семён
Семён Клишин Семён Клишин
Семён Сорокин Семён Сорокин
...@@ -358,7 +358,7 @@ WINE-PROTON: https://github.com/ValveSoftware/Proton ...@@ -358,7 +358,7 @@ WINE-PROTON: https://github.com/ValveSoftware/Proton
WINE-PROTON-GE: https://github.com/GloriousEggroll/proton-ge-custom/ WINE-PROTON-GE: https://github.com/GloriousEggroll/proton-ge-custom/
Kron4ek/Wine: https://github.com/Kron4ek/Wine-Builds Kron4ek/Wine: https://github.com/Kron4ek/Wine-Builds
YAD: https://github.com/v1cont/yad" 2>/dev/null & YAD: https://github.com/v1cont/yad" 2>/dev/null &
"${pw_yad_v12_3}" --title "О НАС" --key="${KEY_CREDITS}" --window-icon="$PW_GUI_ICON_PATH/portproton.svg" \ "${pw_yad_v12_3}" --title "О НАС" --key="${KEY_CREDITS}" --window-icon="$PW_GUI_ICON_PATH/portproton.svg" \
--notebook --no-buttons --tab-pos=bottom \ --notebook --no-buttons --tab-pos=bottom \
--tab="О PORTPROTON" --tab="АВТОРЫ" --tab="ЛИЦЕНЗИЯ" --tab="СПОНСОРЫ" --tab="ПРИСОЕДИНИТЬСЯ" \ --tab="О PORTPROTON" --tab="АВТОРЫ" --tab="ЛИЦЕНЗИЯ" --tab="СПОНСОРЫ" --tab="ПРИСОЕДИНИТЬСЯ" \
...@@ -506,7 +506,7 @@ SOFTWARE." 2>/dev/null & ...@@ -506,7 +506,7 @@ SOFTWARE." 2>/dev/null &
Haschwalth Haschwalth
haunteduser haunteduser
Homyakin Homyakin
horuno2020 horuno2020
Igor14936 Igor14936
Ivan Vlasov Ivan Vlasov
ivboss ivboss
...@@ -682,7 +682,7 @@ SOFTWARE." 2>/dev/null & ...@@ -682,7 +682,7 @@ SOFTWARE." 2>/dev/null &
Роман Игнатьев Роман Игнатьев
Роман Паженский Роман Паженский
Ростислав Кузнецов Ростислав Кузнецов
Саша Саша
Семён Семён
Семён Клишин Семён Клишин
Семён Сорокин Семён Сорокин
......
...@@ -56,7 +56,7 @@ if [[ -f "${PORT_WINE_TMP_PATH}/tmp_main_gui_size" ]] && [[ ! -z "$(cat ${PORT_W ...@@ -56,7 +56,7 @@ if [[ -f "${PORT_WINE_TMP_PATH}/tmp_main_gui_size" ]] && [[ ! -z "$(cat ${PORT_W
else else
export PW_MAIN_SIZE_W="1100" export PW_MAIN_SIZE_W="1100"
export PW_MAIN_SIZE_H="350" export PW_MAIN_SIZE_H="350"
fi fi
if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then
export PW_ADD_TO_ARGS_IN_RUNTIME="--xterm" export PW_ADD_TO_ARGS_IN_RUNTIME="--xterm"
...@@ -134,17 +134,17 @@ portwine_start_debug () { ...@@ -134,17 +134,17 @@ portwine_start_debug () {
echo "GLIBC version:" >> "${PORT_WINE_PATH}/${portname}.log" echo "GLIBC version:" >> "${PORT_WINE_PATH}/${portname}.log"
echo $(ldd --version | grep -m1 ldd | awk '{print $NF}') >> "${PORT_WINE_PATH}/${portname}.log" echo $(ldd --version | grep -m1 ldd | awk '{print $NF}') >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log" echo "--------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
if [[ "${PW_VULKAN_USE}" = "0" ]] ; then if [[ "${PW_VULKAN_USE}" = "0" ]] ; then
echo "PW_VULKAN_USE=${PW_VULKAN_USE} - DX9-11 to ${loc_gui_open_gl}" >> "${PORT_WINE_PATH}/${portname}.log" echo "PW_VULKAN_USE=${PW_VULKAN_USE} - DX9-11 to ${loc_gui_open_gl}" >> "${PORT_WINE_PATH}/${portname}.log"
elif [[ "${PW_VULKAN_USE}" = "1" ]] ; then elif [[ "${PW_VULKAN_USE}" = "1" ]] ; then
echo "PW_VULKAN_USE=${PW_VULKAN_USE} - DXVK v.${DXVK_STABLE_VER} and VKD3D-PROTON v.${VKD3D_STABLE_VER}" >> "${PORT_WINE_PATH}/${portname}.log" echo "PW_VULKAN_USE=${PW_VULKAN_USE} - DXVK v.${DXVK_STABLE_VER} and VKD3D-PROTON v.${VKD3D_STABLE_VER}" >> "${PORT_WINE_PATH}/${portname}.log"
elif [[ "${PW_VULKAN_USE}" = "2" ]] ; then elif [[ "${PW_VULKAN_USE}" = "2" ]] ; then
echo "PW_VULKAN_USE=${PW_VULKAN_USE} - DXVK v.${DXVK_GIT_VER} and VKD3D-PROTON v.${VKD3D_GIT_VER}" >> "${PORT_WINE_PATH}/${portname}.log" echo "PW_VULKAN_USE=${PW_VULKAN_USE} - DXVK v.${DXVK_GIT_VER} and VKD3D-PROTON v.${VKD3D_GIT_VER}" >> "${PORT_WINE_PATH}/${portname}.log"
elif [[ "${PW_VULKAN_USE}" = "3" ]] ; then elif [[ "${PW_VULKAN_USE}" = "3" ]] ; then
echo "PW_VULKAN_USE=${PW_VULKAN_USE} - native DX9 on MESA drivers" >> "${PORT_WINE_PATH}/${portname}.log" echo "PW_VULKAN_USE=${PW_VULKAN_USE} - native DX9 on MESA drivers" >> "${PORT_WINE_PATH}/${portname}.log"
elif [[ "${PW_VULKAN_USE}" = "4" ]] ; then elif [[ "${PW_VULKAN_USE}" = "4" ]] ; then
echo "PW_VULKAN_USE=${PW_VULKAN_USE} - DirectX to wined3d vulkan" >> "${PORT_WINE_PATH}/${portname}.log" echo "PW_VULKAN_USE=${PW_VULKAN_USE} - DirectX to wined3d vulkan" >> "${PORT_WINE_PATH}/${portname}.log"
else else
echo "PW_VULKAN_USE=${PW_VULKAN_USE}" >> "${PORT_WINE_PATH}/${portname}.log" echo "PW_VULKAN_USE=${PW_VULKAN_USE}" >> "${PORT_WINE_PATH}/${portname}.log"
fi fi
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log" echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
...@@ -266,7 +266,7 @@ portwine_start_debug () { ...@@ -266,7 +266,7 @@ portwine_start_debug () {
sed -i '/wine: RLIMIT_NICE is <= 20/d' "${PORT_WINE_PATH}/${portname}.log" sed -i '/wine: RLIMIT_NICE is <= 20/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/ALT_2.24/d' "${PORT_WINE_PATH}/${portname}.log" sed -i '/ALT_2.24/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/UDEV monitor/d' "${PORT_WINE_PATH}/${portname}.log" sed -i '/UDEV monitor/d' "${PORT_WINE_PATH}/${portname}.log"
deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++') deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++')
echo "$deb_text" > "${PORT_WINE_PATH}/${portname}.log" echo "$deb_text" > "${PORT_WINE_PATH}/${portname}.log"
"$pw_yad" --title="${portname}.log" --borders=${YAD_BORDERS} --no-buttons --text-align=center \ "$pw_yad" --title="${portname}.log" --borders=${YAD_BORDERS} --no-buttons --text-align=center \
--text-info --show-uri --wrap --width=1200 --height=550 --uri-color=red \ --text-info --show-uri --wrap --width=1200 --height=550 --uri-color=red \
...@@ -368,7 +368,7 @@ pw_prefix_manager () { ...@@ -368,7 +368,7 @@ pw_prefix_manager () {
if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" ]] ; then if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" ]] ; then
stop_portwine stop_portwine
exit 0 exit 0
fi fi
try_remove_file "${PORT_WINE_TMP_PATH}/dll_list_tmp" try_remove_file "${PORT_WINE_TMP_PATH}/dll_list_tmp"
try_remove_file "${PORT_WINE_TMP_PATH}/fonts_list_tmp" try_remove_file "${PORT_WINE_TMP_PATH}/fonts_list_tmp"
try_remove_file "${PORT_WINE_TMP_PATH}/settings_list_tmp" try_remove_file "${PORT_WINE_TMP_PATH}/settings_list_tmp"
...@@ -383,8 +383,15 @@ pw_prefix_manager () { ...@@ -383,8 +383,15 @@ pw_prefix_manager () {
try_remove_file "${PORT_WINE_TMP_PATH}/to_winetricks" try_remove_file "${PORT_WINE_TMP_PATH}/to_winetricks"
if [[ ! -z ${SET_FROM_PFX_MANAGER} ]] ; then if [[ ! -z ${SET_FROM_PFX_MANAGER} ]] ; then
${pw_runtime} "${PW_PLUGINS_PATH}/portable/bin/xterm" -e env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ pw_update_pfx_cover_gui "winetricks"
"${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${SET_FROM_PFX_MANAGER} echo "START WINETRICKS..." >> "${PORT_WINE_TMP_PATH}/update_pfx_log"
echo "Try to install DLL in prefix: ${SET_FROM_PFX_MANAGER}" >> "${PORT_WINE_TMP_PATH}/update_pfx_log"
print_info "Try to install DLL in prefix: ${SET_FROM_PFX_MANAGER}"
${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
"${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${SET_FROM_PFX_MANAGER} | tee -a "${PORT_WINE_TMP_PATH}/update_pfx_log"
wait_wineserver
kill_portwine
pw_stop_progress_bar
gui_prefix_manager gui_prefix_manager
else else
print_info "Nothing to do. Restarting PortProton..." print_info "Nothing to do. Restarting PortProton..."
...@@ -396,33 +403,6 @@ pw_prefix_manager () { ...@@ -396,33 +403,6 @@ pw_prefix_manager () {
gui_prefix_manager gui_prefix_manager
} }
pw_winetricks () {
update_winetricks
export PW_USE_TERMINAL=1
start_portwine
pw_stop_progress_bar
echo "WINETRICKS..." > "${PORT_WINE_TMP_PATH}/update_pfx_log"
unset PW_TIMER
while read -r line || [[ ! -z $(pgrep -a yad | grep "yad_v12_3 --text-info --tail --no-buttons --title="WINETRICKS"" | awk '{print $1}') ]] ; do
sleep 0.005
if [[ ! -z "${line}" ]] && [[ -z "$(echo "${line}" | grep -i "gstreamer")" ]] \
&& [[ -z "$(echo "${line}" | grep -i "kerberos")" ]] \
&& [[ -z "$(echo "${line}" | grep -i "ntlm")" ]]
then
echo "# ${line}"
fi
if [[ "${PW_TIMER}" != 1 ]] ; then
sleep 3
PW_TIMER=1
fi
done < "${PORT_WINE_TMP_PATH}/update_pfx_log" | "${pw_yad_v12_3}" --text-info --tail --no-buttons --title="WINETRICKS" \
--auto-close --skip-taskbar --width=$PW_GIF_SIZE_X --height=$PW_GIF_SIZE_Y 2>/dev/null &
${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
"${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${PW_DLL_NEED_INSTALL} &>>"${PORT_WINE_TMP_PATH}/update_pfx_log"
kill -s SIGTERM "$(pgrep -a yad_v12_3 | grep "title=WINETRICKS" | awk '{print $1}')" > /dev/null 2>&1
stop_portwine
}
pw_start_cont_xterm () { pw_start_cont_xterm () {
cd "$HOME" cd "$HOME"
unset PW_SANDBOX_HOME_PATH unset PW_SANDBOX_HOME_PATH
...@@ -474,7 +454,7 @@ pw_create_prefix_backup () { ...@@ -474,7 +454,7 @@ pw_create_prefix_backup () {
yad_info "$PW_PFX_BACKUP_INFO" yad_info "$PW_PFX_BACKUP_INFO"
echo "1" > "${PORT_WINE_TMP_PATH}/pfx_backup_info" echo "1" > "${PORT_WINE_TMP_PATH}/pfx_backup_info"
fi fi
else else
yad_error "$PW_PFX_BACKUP_ERROR $PW_PREFIX_NAME" yad_error "$PW_PFX_BACKUP_ERROR $PW_PREFIX_NAME"
fi fi
...@@ -546,7 +526,7 @@ use: [--reinstall] [--autoinstall] ...@@ -546,7 +526,7 @@ use: [--reinstall] [--autoinstall]
'--autoinstall' ) '--autoinstall' )
export PW_YAD_SET="$2" export PW_YAD_SET="$2"
pw_autoinstall_from_db pw_autoinstall_from_db
exit 0 ;; exit 0 ;;
esac esac
...@@ -561,7 +541,7 @@ export PW_PREFIX_NAME PW_ALL_PREFIXES ...@@ -561,7 +541,7 @@ export PW_PREFIX_NAME PW_ALL_PREFIXES
unset PW_ADD_PREFIXES_TO_GUI unset PW_ADD_PREFIXES_TO_GUI
IFS_OLD=$IFS IFS_OLD=$IFS
IFS=$'\n' IFS=$'\n'
for PAIG in ${PW_ALL_PREFIXES[*]} ; do for PAIG in ${PW_ALL_PREFIXES[*]} ; do
[[ "${PAIG}" != $(echo "${PORTWINE_DB^^}" | sed -e s/[[:blank:]]/_/g) ]] && \ [[ "${PAIG}" != $(echo "${PORTWINE_DB^^}" | sed -e s/[[:blank:]]/_/g) ]] && \
export PW_ADD_PREFIXES_TO_GUI="${PW_ADD_PREFIXES_TO_GUI}!${PAIG}" export PW_ADD_PREFIXES_TO_GUI="${PW_ADD_PREFIXES_TO_GUI}!${PAIG}"
done done
...@@ -617,12 +597,12 @@ else ...@@ -617,12 +597,12 @@ else
else else
export DIST_ADD_TO_GUI=$(echo "${DIST_ADD_TO_GUI}" | sed -e s/"\!${PW_WINE_USE}$//g") export DIST_ADD_TO_GUI=$(echo "${DIST_ADD_TO_GUI}" | sed -e s/"\!${PW_WINE_USE}$//g")
export PW_DEFAULT_WINE_USE="${PW_WINE_USE}!${PW_WINE_LG_VER}!${PW_PROTON_LG_VER}${DIST_ADD_TO_GUI}!GET-OTHER-WINE" export PW_DEFAULT_WINE_USE="${PW_WINE_USE}!${PW_WINE_LG_VER}!${PW_PROTON_LG_VER}${DIST_ADD_TO_GUI}!GET-OTHER-WINE"
fi fi
fi fi
unset PW_GUI_DISABLED_CS unset PW_GUI_DISABLED_CS
fi fi
if [[ -f "${portwine_exe}" ]] ; then if [[ -f "${portwine_exe}" ]] ; then
if [[ "${PW_GUI_DISABLED_CS}" != 1 ]] ; then if [[ "${PW_GUI_DISABLED_CS}" != 1 ]] ; then
pw_create_gui_png pw_create_gui_png
grep -il "${portwine_exe}" "${HOME}/.local/share/applications"/*.desktop grep -il "${portwine_exe}" "${HOME}/.local/share/applications"/*.desktop
if [[ "$?" != "0" ]] ; then if [[ "$?" != "0" ]] ; then
...@@ -751,19 +731,19 @@ else ...@@ -751,19 +731,19 @@ else
export KEY="$RANDOM" export KEY="$RANDOM"
orig_IFS="$IFS" && IFS=$'\n' orig_IFS="$IFS" && IFS=$'\n'
PW_ALL_DF="$(ls ${PORT_WINE_PATH}/ | grep .desktop | grep -vE '(PortProton|readme)')" PW_ALL_DF="$(ls ${PORT_WINE_PATH}/ | grep .desktop | grep -vE '(PortProton|readme)')"
if [[ -z "${PW_ALL_DF}" ]] if [[ -z "${PW_ALL_DF}" ]]
then PW_GUI_SORT_TABS=(1 2 3 4 5) then PW_GUI_SORT_TABS=(1 2 3 4 5)
else PW_GUI_SORT_TABS=(2 3 4 5 1) else PW_GUI_SORT_TABS=(2 3 4 5 1)
fi fi
PW_GENERATE_BUTTONS="--field= $loc_create_shortcut_from_gui!${PW_GUI_ICON_PATH}/find_48.png!:FBTN%@bash -c \"button_click pw_find_exe\"%" PW_GENERATE_BUTTONS="--field= $loc_create_shortcut_from_gui!${PW_GUI_ICON_PATH}/find_48.png!:FBTN%@bash -c \"button_click pw_find_exe\"%"
for PW_DESKTOP_FILES in ${PW_ALL_DF} ; do for PW_DESKTOP_FILES in ${PW_ALL_DF} ; do
PW_NAME_D_ICON="$(cat "${PORT_WINE_PATH}/${PW_DESKTOP_FILES}" | grep Icon | awk -F= '{print $2}')" PW_NAME_D_ICON="$(cat "${PORT_WINE_PATH}/${PW_DESKTOP_FILES}" | grep Icon | awk -F= '{print $2}')"
PW_NAME_D_ICON_48="${PW_NAME_D_ICON//".png"/"_48.png"}" PW_NAME_D_ICON_48="${PW_NAME_D_ICON//".png"/"_48.png"}"
if [[ ! -f "${PW_NAME_D_ICON_48}" ]] && [[ -f "${PW_NAME_D_ICON}" ]] && [[ -x "`command -v "convert" 2>/dev/null`" ]] ; then if [[ ! -f "${PW_NAME_D_ICON_48}" ]] && [[ -f "${PW_NAME_D_ICON}" ]] && [[ -x "`command -v "convert" 2>/dev/null`" ]] ; then
convert "${PW_NAME_D_ICON}" -resize 48x48 "${PW_NAME_D_ICON_48}" convert "${PW_NAME_D_ICON}" -resize 48x48 "${PW_NAME_D_ICON_48}"
fi fi
PW_GENERATE_BUTTONS+="--field= ${PW_DESKTOP_FILES//".desktop"/""}!${PW_NAME_D_ICON_48}!:FBTN%@bash -c \"run_desktop_b_click "${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_FILES//" "}"\"%"
done done
...@@ -931,7 +911,7 @@ if [[ "${PW_DISABLED_CREATE_DB}" != 1 ]] ; then ...@@ -931,7 +911,7 @@ if [[ "${PW_DISABLED_CREATE_DB}" != 1 ]] ; then
export PORTWINE_DB_FILE="${portwine_exe}".ppdb export PORTWINE_DB_FILE="${portwine_exe}".ppdb
fi fi
fi fi
edit_db_from_gui PW_VULKAN_USE PW_WINE_USE PW_PREFIX_NAME edit_db_from_gui PW_VULKAN_USE PW_WINE_USE PW_PREFIX_NAME
fi fi
[ ! -z "$PW_YAD_SET" ] && case "$PW_YAD_SET" in [ ! -z "$PW_YAD_SET" ] && case "$PW_YAD_SET" in
......
#!/usr/bin/env bash #!/usr/bin/env bash
#Author: Castro-Fidel (linux-gaming.ru) #Author: Castro-Fidel (linux-gaming.ru)
#SCRIPTS_NEXT_VERSION=2270 #SCRIPTS_NEXT_VERSION=2271
######################################################################## ########################################################################
export PW_MANGOHUD="0" export PW_MANGOHUD="0"
export DEFAULT_MANGOHUD_CONFIG="arch,cpu_mhz,cpu_temp,engine_version,gamemode,gpu_core_clock,gpu_mem_clock,gpu_name,gpu_temp,ram,resolution,vkbasalt,vram,vulkan_driver,wine" export DEFAULT_MANGOHUD_CONFIG="arch,cpu_mhz,cpu_temp,engine_version,gamemode,gpu_core_clock,gpu_mem_clock,gpu_name,gpu_temp,ram,resolution,vkbasalt,vram,vulkan_driver,wine"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
yad_info () { yad_info () {
print_info "$@" print_info "$@"
if [[ ! -f "${pw_yad_v12_3}" ]] ; then if [[ ! -f "${pw_yad_v12_3}" ]] ; then
local pw_yad_v12_3="yad" local pw_yad_v12_3="yad"
command -v "${pw_yad_v12_3}" &>/dev/null || fatal "yad not found" command -v "${pw_yad_v12_3}" &>/dev/null || fatal "yad not found"
fi fi
"${pw_yad_v12_3}" --no-wrap --text "$@" --width=400 --height=50 --borders=15 --title "INFO" \ "${pw_yad_v12_3}" --no-wrap --text "$@" --width=400 --height=50 --borders=15 --title "INFO" \
...@@ -16,7 +16,7 @@ export -f yad_info ...@@ -16,7 +16,7 @@ export -f yad_info
yad_error () { yad_error () {
print_error "$@" print_error "$@"
if [[ ! -f "${pw_yad_v12_3}" ]] ; then if [[ ! -f "${pw_yad_v12_3}" ]] ; then
local pw_yad_v12_3="yad" local pw_yad_v12_3="yad"
command -v "${pw_yad_v12_3}" &>/dev/null || fatal "yad not found" command -v "${pw_yad_v12_3}" &>/dev/null || fatal "yad not found"
fi fi
"${pw_yad_v12_3}" --no-wrap --text "$@" --width=400 --borders=15 --title "ERROR" \ "${pw_yad_v12_3}" --no-wrap --text "$@" --width=400 --borders=15 --title "ERROR" \
...@@ -27,7 +27,7 @@ export -f yad_error ...@@ -27,7 +27,7 @@ export -f yad_error
yad_error_download () { yad_error_download () {
if [[ ! -f "${pw_yad_v12_3}" ]] ; then if [[ ! -f "${pw_yad_v12_3}" ]] ; then
local pw_yad_v12_3="yad" local pw_yad_v12_3="yad"
command -v "${pw_yad_v12_3}" &>/dev/null || fatal "yad not found" command -v "${pw_yad_v12_3}" &>/dev/null || fatal "yad not found"
fi fi
"${pw_yad_v12_3}" --text "$loc_gui_error_download" --width=400 --borders=15 --title "$loc_gui_error" \ "${pw_yad_v12_3}" --text "$loc_gui_error_download" --width=400 --borders=15 --title "$loc_gui_error" \
...@@ -38,7 +38,7 @@ yad_error_download () { ...@@ -38,7 +38,7 @@ yad_error_download () {
yad_question () { yad_question () {
if [[ ! -f "${pw_yad_v12_3}" ]] ; then if [[ ! -f "${pw_yad_v12_3}" ]] ; then
local pw_yad_v12_3="yad" local pw_yad_v12_3="yad"
command -v "${pw_yad_v12_3}" &>/dev/null || fatal "yad not found" command -v "${pw_yad_v12_3}" &>/dev/null || fatal "yad not found"
fi fi
"${pw_yad_v12_3}" --text "${1}" --width=400 --borders=15 --title "${inst_set}." \ "${pw_yad_v12_3}" --text "${1}" --width=400 --borders=15 --title "${inst_set}." \
...@@ -73,9 +73,21 @@ pw_start_progress_bar_cover_block () { ...@@ -73,9 +73,21 @@ pw_start_progress_bar_cover_block () {
} }
pw_update_pfx_cover_gui () { pw_update_pfx_cover_gui () {
if [[ "$1" == "winetricks" ]] ; then
TAB_PLACE='--tab=TERMINAL --tab=LOGO'
TAB_N1=2
TAB_N2=1
YAD_UNDECORATED=""
else
TAB_PLACE='--tab=LOGO --tab=TERMINAL'
TAB_N1=1
TAB_N2=2
YAD_UNDECORATED="--undecorated --center"
fi
if ! check_start_from_steam && ! pgrep -a yad | grep "yad_v12_3 --notebook --key=$PW_KEY_PROGRESS_BAR_UP" &>/dev/null ; then if ! check_start_from_steam && ! pgrep -a yad | grep "yad_v12_3 --notebook --key=$PW_KEY_PROGRESS_BAR_UP" &>/dev/null ; then
PW_KEY_PROGRESS_BAR_UP=$RANDOM PW_KEY_PROGRESS_BAR_UP=$RANDOM
PW_GIF_FILE="${PW_GUI_ICON_PATH}/covers/update_prefix_${update_loc}.gif" PW_GIF_FILE="${PW_GUI_ICON_PATH}/covers/update_prefix_${update_loc}.gif"
PW_GIF_SIZE_X=`file "${PW_GIF_FILE}" | awk '{print $7 + 40}'` PW_GIF_SIZE_X=`file "${PW_GIF_FILE}" | awk '{print $7 + 40}'`
PW_GIF_SIZE_Y=`file "${PW_GIF_FILE}" | awk '{print $9 + 80}'` PW_GIF_SIZE_Y=`file "${PW_GIF_FILE}" | awk '{print $9 + 80}'`
echo "UPDATE PREFIX..." > "${PORT_WINE_TMP_PATH}/update_pfx_log" echo "UPDATE PREFIX..." > "${PORT_WINE_TMP_PATH}/update_pfx_log"
...@@ -92,11 +104,12 @@ pw_update_pfx_cover_gui () { ...@@ -92,11 +104,12 @@ pw_update_pfx_cover_gui () {
sleep 3 sleep 3
PW_TIMER=1 PW_TIMER=1
fi fi
done < "${PORT_WINE_TMP_PATH}/update_pfx_log" | "${pw_yad_v12_3}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum="2" --text-info --tail 2>/dev/null & done < "${PORT_WINE_TMP_PATH}/update_pfx_log" | "${pw_yad_v12_3}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum=$TAB_N2 --text-info --tail 2>/dev/null &
"${pw_yad_v12_3}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum="1" --picture --filename="${PW_GIF_FILE}" --image-on-top 2>/dev/null & "${pw_yad_v12_3}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum=$TAB_N1 --picture --filename="${PW_GIF_FILE}" --image-on-top 2>/dev/null &
"${pw_yad_v12_3}" --notebook --key="$PW_KEY_PROGRESS_BAR_UP" --tab=LOGO --tab=TERMINAL --no-buttons --undecorated \ "${pw_yad_v12_3}" --notebook --key="$PW_KEY_PROGRESS_BAR_UP" $TAB_PLACE --no-buttons \
--center --auto-close --skip-taskbar --width=$PW_GIF_SIZE_X --height=$PW_GIF_SIZE_Y --tab-pos=bottom 2>/dev/null & --auto-close --skip-taskbar --width=$PW_GIF_SIZE_X --height=$PW_GIF_SIZE_Y $YAD_UNDECORATED \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --title "PortProton" --tab-pos=bottom 2>/dev/null &
export PW_YAD_PID_PFX_COVER_UI="$!" export PW_YAD_PID_PFX_COVER_UI="$!"
return 0 return 0
fi fi
...@@ -105,7 +118,8 @@ pw_update_pfx_cover_gui () { ...@@ -105,7 +118,8 @@ pw_update_pfx_cover_gui () {
pw_start_progress_bar_cs () { pw_start_progress_bar_cs () {
if ! check_start_from_steam ; then if ! check_start_from_steam ; then
"${pw_yad}" --progress --progress-text="$@" --pulsate --close-on-unfocus \ "${pw_yad}" --progress --progress-text="$@" --pulsate --close-on-unfocus \
--no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 &>/dev/null & --no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" &>/dev/null &
export PW_YAD_PID_PROGRESS_BAR_CS="$!" export PW_YAD_PID_PROGRESS_BAR_CS="$!"
return 0 return 0
fi fi
...@@ -114,7 +128,8 @@ pw_start_progress_bar_cs () { ...@@ -114,7 +128,8 @@ pw_start_progress_bar_cs () {
pw_start_progress_bar_block () { pw_start_progress_bar_block () {
if ! check_start_from_steam ; then if ! check_start_from_steam ; then
"${pw_yad}" --progress --progress-text="$@" --pulsate \ "${pw_yad}" --progress --progress-text="$@" --pulsate \
--no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 &>/dev/null & --no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" &>/dev/null &
export PW_YAD_PID_PROGRESS_BAR_BLOCK="$!" export PW_YAD_PID_PROGRESS_BAR_BLOCK="$!"
return 0 return 0
fi fi
...@@ -145,6 +160,7 @@ export -f pw_stop_progress_bar_cover_block ...@@ -145,6 +160,7 @@ export -f pw_stop_progress_bar_cover_block
open_changelog () { open_changelog () {
"${pw_yad}" --title="$loc_gui_changelog" --borders=${YAD_BORDERS} --no-buttons --text-align=center \ "${pw_yad}" --title="$loc_gui_changelog" --borders=${YAD_BORDERS} --no-buttons --text-align=center \
--text-info --show-uri --wrap --width=1200 --height=700 --uri-color=red \ --text-info --show-uri --wrap --width=1200 --height=700 --uri-color=red \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" \
--filename="${PORT_WINE_PATH}/data/${PW_CHANGELOG_FILE}" &>/dev/null --filename="${PORT_WINE_PATH}/data/${PW_CHANGELOG_FILE}" &>/dev/null
} }
export -f open_changelog export -f open_changelog
...@@ -254,7 +270,7 @@ pw_gui_for_edit_db () { ...@@ -254,7 +270,7 @@ pw_gui_for_edit_db () {
--field="${loc_gui_cpu_limit}!${loc_gui_cpu_limit_help} :CB" "${CPU_LIMIT_VAR}!disabled!${GET_LOGICAL_CORE}" \ --field="${loc_gui_cpu_limit}!${loc_gui_cpu_limit_help} :CB" "${CPU_LIMIT_VAR}!disabled!${GET_LOGICAL_CORE}" \
--field="${loc_gui_gpu_select}!${loc_gui_gpu_select_help} :CB" "${GPU_VAR}!disabled!${GET_GPU_NAMES}" \ --field="${loc_gui_gpu_select}!${loc_gui_gpu_select_help} :CB" "${GPU_VAR}!disabled!${GET_GPU_NAMES}" \
--field="${loc_gui_arg_gamescope}!${loc_gui_arg_gamescope_help} :CBE" "\\${GAMESCOPE_ARGS}!-r 60 -F fsr!" 2>/dev/null 1> "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" 2>/dev/null & --field="${loc_gui_arg_gamescope}!${loc_gui_arg_gamescope_help} :CBE" "\\${GAMESCOPE_ARGS}!-r 60 -F fsr!" 2>/dev/null 1> "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" 2>/dev/null &
"${pw_yad_v12_3}" --paned --key="$KEY_EDIT_DB_GUI" --title "EDIT_DB" --text-align=center --height="800" \ "${pw_yad_v12_3}" --paned --key="$KEY_EDIT_DB_GUI" --title "EDIT_DB" --text-align=center --height="800" \
--text "${loc_gui_edit_db} <b>${PORTWINE_DB}</b>\n ${loc_gui_edit_db_help}" --separator=" " --borders=${YAD_BORDERS} \ --text "${loc_gui_edit_db} <b>${PORTWINE_DB}</b>\n ${loc_gui_edit_db_help}" --separator=" " --borders=${YAD_BORDERS} \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" \ --window-icon="$PW_GUI_ICON_PATH/portproton.svg" \
...@@ -265,16 +281,16 @@ pw_gui_for_edit_db () { ...@@ -265,16 +281,16 @@ pw_gui_for_edit_db () {
YAD_STATUS="$?" YAD_STATUS="$?"
export SKIP_CHECK_UPDATES=1 export SKIP_CHECK_UPDATES=1
case "$YAD_STATUS" in case "$YAD_STATUS" in
1) 1)
/usr/bin/env bash -c ${pw_full_command_line[*]} & /usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0 exit 0
;; ;;
2) 2)
try_remove_file "$portwine_exe".ppdb try_remove_file "$portwine_exe".ppdb
/usr/bin/env bash -c ${pw_full_command_line[*]} & /usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0 exit 0
;; ;;
252) 252)
exit 0 exit 0
;; ;;
esac esac
...@@ -317,13 +333,13 @@ pw_gui_for_edit_db () { ...@@ -317,13 +333,13 @@ pw_gui_for_edit_db () {
# PW_AMD_VULKAN_USE # PW_AMD_VULKAN_USE
case "$YAD_STATUS" in case "$YAD_STATUS" in
0) 0)
print_info "Restarting PP after update ppdb file..." print_info "Restarting PP after update ppdb file..."
/usr/bin/env bash -c ${pw_full_command_line[*]} & /usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0 exit 0
;; ;;
150) 150)
xdg-open "${PORTWINE_DB_FILE}" & xdg-open "${PORTWINE_DB_FILE}" &
exit 0 exit 0
;; ;;
esac esac
...@@ -331,7 +347,7 @@ pw_gui_for_edit_db () { ...@@ -331,7 +347,7 @@ pw_gui_for_edit_db () {
gui_proton_downloader () { gui_proton_downloader () {
if [[ "$PW_WINE_USE" == PROTON_LG ]] if [[ "$PW_WINE_USE" == PROTON_LG ]]
then export PW_WINE_USE="${PW_PROTON_LG_VER}" then export PW_WINE_USE="${PW_PROTON_LG_VER}"
elif [[ "$PW_WINE_USE" == WINE_*_LG ]] || [[ "$PW_WINE_USE" == WINE_LG ]] elif [[ "$PW_WINE_USE" == WINE_*_LG ]] || [[ "$PW_WINE_USE" == WINE_LG ]]
then export PW_WINE_USE="${PW_WINE_LG_VER}" then export PW_WINE_USE="${PW_WINE_LG_VER}"
...@@ -595,7 +611,7 @@ gui_MangoHud () { ...@@ -595,7 +611,7 @@ gui_MangoHud () {
time version vkbasalt vram vulkan_driver wine time version vkbasalt vram vulkan_driver wine
) )
# fps_only # fps_only
unset ADD_GUI_MH GUI_MH_RESULT unset ADD_GUI_MH GUI_MH_RESULT
GET_REFRESH_RATE="30!45!60!75!120!144!165!240" GET_REFRESH_RATE="30!45!60!75!120!144!165!240"
...@@ -689,7 +705,7 @@ gui_MangoHud () { ...@@ -689,7 +705,7 @@ gui_MangoHud () {
export GUI_MH_RESULT="fps_only" export GUI_MH_RESULT="fps_only"
print_info "In the MangoHud config fps_only is detected all settings are reseted" print_info "In the MangoHud config fps_only is detected all settings are reseted"
fi fi
export MANGOHUD_CONFIG="${GUI_MH_RESULT}" export MANGOHUD_CONFIG="${GUI_MH_RESULT}"
edit_db_from_gui MANGOHUD_CONFIG PW_MANGOHUD FPS_LIMIT edit_db_from_gui MANGOHUD_CONFIG PW_MANGOHUD FPS_LIMIT
...@@ -803,7 +819,7 @@ portwine_create_shortcut () { ...@@ -803,7 +819,7 @@ portwine_create_shortcut () {
fi fi
unset PW_SKIP_RESTART_STEAM unset PW_SKIP_RESTART_STEAM
fi fi
[[ "$1" != silent ]] && [[ "${PW_SKIP_RESTART_STEAM}" != 1 ]] && "${PORT_WINE_PATH}" 2>1 >/dev/null & [[ "$1" != silent ]] && [[ "${PW_SKIP_RESTART_STEAM}" != 1 ]] && "${PORT_WINE_PATH}" 2>1 >/dev/null &
fi fi
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment