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-
----------------------------------------
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
* 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
......
......@@ -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 мегабайт
* добавлена поддержка игры Horizon Forbidden West (для применения необходимо запустить exe игры и выбрать НАСТРОЙКИ -> СБРОСИТЬ НАСТРОЙКИ)
* исправлена работа WINE от Kron4ek и возвращена возможность его скачивания с помощью GET-OTHER-WINE
......
......@@ -139,7 +139,7 @@ Akai
Haschwalth
haunteduser
Homyakin
horuno2020
horuno2020
Igor14936
Ivan Vlasov
ivboss
......@@ -315,7 +315,7 @@ Akai
Роман Игнатьев
Роман Паженский
Ростислав Кузнецов
Саша
Саша
Семён
Семён Клишин
Семён Сорокин
......@@ -358,7 +358,7 @@ WINE-PROTON: https://github.com/ValveSoftware/Proton
WINE-PROTON-GE: https://github.com/GloriousEggroll/proton-ge-custom/
Kron4ek/Wine: https://github.com/Kron4ek/Wine-Builds
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" \
--notebook --no-buttons --tab-pos=bottom \
--tab="О PORTPROTON" --tab="АВТОРЫ" --tab="ЛИЦЕНЗИЯ" --tab="СПОНСОРЫ" --tab="ПРИСОЕДИНИТЬСЯ" \
......@@ -506,7 +506,7 @@ SOFTWARE." 2>/dev/null &
Haschwalth
haunteduser
Homyakin
horuno2020
horuno2020
Igor14936
Ivan Vlasov
ivboss
......@@ -682,7 +682,7 @@ SOFTWARE." 2>/dev/null &
Роман Игнатьев
Роман Паженский
Ростислав Кузнецов
Саша
Саша
Семён
Семён Клишин
Семён Сорокин
......
......@@ -281,7 +281,7 @@ check_gamescope_session () {
fi
if echo "${DESKTOP_SESSION}" | grep -i "gamescope" &>/dev/null ; then
if command -v konsole &>/dev/null
then export PW_TERM="konsole --hide-menubar --fullscreen -e"
then export PW_TERM="konsole --hide-menubar --fullscreen -e"
else export PW_TERM="xdg-terminal"
fi
export GAMESCOPE_IN_USE=1
......@@ -396,7 +396,7 @@ pw_reinstall_pp () {
echo ""
exit 1
fi
elif ! yad_question "${port_reinstall}"
elif ! yad_question "${port_reinstall}"
then exit 1
fi
pw_clear_pfx
......@@ -468,7 +468,7 @@ init_wine_ver () {
else export PW_WINE_USE=WINE_LG
fi
fi
if [[ "$PW_WINE_USE" == PROTON_LG ]]
if [[ "$PW_WINE_USE" == PROTON_LG ]]
then export PW_WINE_USE="${PW_PROTON_LG_VER}"
elif [[ "$PW_WINE_USE" == WINE_LG ]]
then export PW_WINE_USE="${PW_WINE_LG_VER}"
......@@ -574,7 +574,7 @@ pw_init_runtime () {
export LIBGL_DRIVERS_PATH="/usr/lib/X11/modules/dri:/usr/lib64/X11/modules/dri"
fi
PW_PV_OVERRIDES="/usr/lib/pressure-vessel/overrides/lib"
PW_PV_OVERRIDES="/usr/lib/pressure-vessel/overrides/lib"
export PW_LD_LIBRARY_PATH="\
${WINEDIR}/lib64:${WINEDIR}/lib:\
......@@ -653,7 +653,7 @@ pw_mangohud_check () {
then
export PW_MANGOHUD_SLR='MANGOHUD=1'
MANGOHUD_LIB_NAME="libMangoHud.so"
if [[ "${PW_VULKAN_USE}" = "0" ]] ; then
if [[ "${PW_VULKAN_USE}" = "0" ]] ; then
MANGOHUD_LIB_NAME="libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
fi
if [[ ! -z "${PW_LD_PRELOAD}" ]]
......@@ -720,19 +720,25 @@ wait_wineserver () {
export -f wait_wineserver
kill_portwine () {
wine_pids="`ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}'`"
if [ ! -z "${wine_pids}" ] ; then
if [[ "${PW_WINE_USE}" != "USE_SYSTEM_WINE" ]] ; then
wine_pids="`ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}'`"
for pw_kill_pids in ${wine_pids} ; do
if [ "`ps cax | grep ${pw_kill_pids}`" ] ; then
kill -n 9 ${pw_kill_pids} > /dev/null 2>&1
if ps cax | grep ${pw_kill_pids} ; then
kill -n 9 ${pw_kill_pids} &>/dev/null
fi
done
fi
bwrap_pids="`pgrep -a wrap | grep ${portname} | head -n 1 | awk '{print $1}'`"
if [ ! -z "${bwrap_pids}" ] ; then
bwrap_pids="`pgrep -a wrap | grep ${portname} | head -n 1 | awk '{print $1}'`"
for pw_kill_pids in ${bwrap_pids} ; do
if [ "`ps cax | grep ${pw_kill_pids}`" ] ; then
kill -n 9 ${pw_kill_pids} > /dev/null 2>&1
if ps cax | grep ${pw_kill_pids} ; then
kill -n 9 ${pw_kill_pids} &>/dev/null
fi
done
else
wine_pids="`ls -l /proc/*/exe 2>/dev/null | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}'`"
for pw_kill_pids in ${wine_pids} ; do
if ps cax | grep ${pw_kill_pids} ; then
kill -n 9 ${pw_kill_pids} &>/dev/null
fi
done
fi
......@@ -761,7 +767,7 @@ pw_kill_autostart () {
break
fi
done
if [[ ! -z "`ls "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/drive_c/ | grep -m 1 ".tmp"`" ]] ; then
rm -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/drive_c/*.tmp
fi
......@@ -770,9 +776,9 @@ pw_kill_autostart () {
}
export -f pw_kill_autostart
stop_portwine () {
stop_portwine () {
[[ "$int_xneur" == "1" ]] && xneur &
if [[ "$PW_USE_US_LAYOUT" == "1" ]] \
&& [[ "${XDG_SESSION_TYPE}" != "wayland" ]] \
&& command -v setxkbmap &>/dev/null
......@@ -787,7 +793,7 @@ stop_portwine () {
fi
if [[ "${PW_DISABLE_COMPOSITING}" == "1" ]] \
&& ! check_gamescope_session
&& ! check_gamescope_session
then
if [[ "${DESKTOP_SESSION}" =~ "plasma" ]] ; then
qdbus org.kde.KWin /Compositor resume
......@@ -858,7 +864,7 @@ pw_check_and_download_wine () {
if [[ "${PW_WINE_USE}" == "GET-OTHER-WINE" ]] ; then
gui_proton_downloader
fi
if [[ "$PW_WINE_USE" == PROTON_LG ]]
if [[ "$PW_WINE_USE" == PROTON_LG ]]
then export PW_WINE_USE="${PW_PROTON_LG_VER}"
elif [[ "$PW_WINE_USE" == WINE_*_LG ]] || [[ "$PW_WINE_USE" == WINE_LG ]]
then export PW_WINE_USE="${PW_WINE_LG_VER}"
......@@ -974,8 +980,8 @@ pw_check_and_download_plugins () {
if command -v yad &>/dev/null ; then
if try_download "github.com/Castro-Fidel/wine_builds/releases/download/plugins${PW_PLUGINS_VER}/plugins${PW_PLUGINS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" ; then
if unpack_tar_xz "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}" ; then
try_remove_file "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz"
# TODO: drop clear prefix, and add update prefix from new plugins
try_remove_file "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz"
# TODO: drop clear prefix, and add update prefix from new plugins
pw_clear_pfx
if [ ! -z "`ls ${PORT_WINE_TMP_PATH} | grep plugins_v | grep -v plugins${PW_PLUGINS_VER}`" ] ; then
for RM_PLUGINS in `ls ${PORT_WINE_TMP_PATH} | grep plugins_v | grep -v plugins${PW_PLUGINS_VER}`
......@@ -989,7 +995,7 @@ pw_check_and_download_plugins () {
then pw_check_and_download_plugins
else
export PW_PLUGINS_VER="$(echo _v$(($(echo $PW_PLUGINS_VER | sed 's/_v//') - 1)))"
export PW_PLUGINS_PATH="${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}"
export PW_PLUGINS_PATH="${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}"
fi
fi
else
......@@ -997,17 +1003,17 @@ pw_check_and_download_plugins () {
then pw_check_and_download_plugins
else
export PW_PLUGINS_VER="$(echo _v$(($(echo $PW_PLUGINS_VER | sed 's/_v//') - 1)))"
export PW_PLUGINS_PATH="${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}"
export PW_PLUGINS_PATH="${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}"
fi
fi
else
PW_NOTIFY_TEXT="Please wait for update PortProton"
pw_notify_send -u normal
pw_notify_send -u normal
if try_download_silent "github.com/Castro-Fidel/wine_builds/releases/download/plugins${PW_PLUGINS_VER}/plugins${PW_PLUGINS_VER}.tar.xz" \
"${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" ; then
if unpack_tar_xz "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz" "${PORT_WINE_TMP_PATH}" ; then
try_remove_file "${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}.tar.xz"
# TODO: drop clear prefix, and add update prefix from new plugins
# TODO: drop clear prefix, and add update prefix from new plugins
pw_clear_pfx
if [ ! -z "`ls ${PORT_WINE_TMP_PATH} | grep plugins_v | grep -v plugins${PW_PLUGINS_VER}`" ] ; then
for RM_PLUGINS in `ls ${PORT_WINE_TMP_PATH} | grep plugins_v | grep -v plugins${PW_PLUGINS_VER}`
......@@ -1016,7 +1022,7 @@ pw_check_and_download_plugins () {
fi
else
PW_NOTIFY_TEXT="Failed updating PortProton!"
pw_notify_send -u critical
pw_notify_send -u critical
print_error "Failed updating PortProton!"
fi
fi
......@@ -1039,7 +1045,7 @@ check_dirs_and_files_in_pfx () {
[ ! -d "${WINEPREFIX}/dosdevices/c:" ] && try_force_link_dir "${WINEPREFIX}/drive_c/" "${WINEPREFIX}/dosdevices/c:"
[ ! -d "${WINEPREFIX}/dosdevices/z:" ] && try_force_link_dir "/" "${WINEPREFIX}/dosdevices/z:"
[ ! -d "${WINEPREFIX}/dosdevices/h:" ] && try_force_link_dir "$HOME" "${WINEPREFIX}/dosdevices/h:"
create_new_dir "${WINEPREFIX}/drive_c/windows/Fonts/"
LN_FONTS="arialbd.ttf courbd.ttf georgia.ttf micross.ttf msyh.ttf simsun.ttc arial.ttf cour.ttf malgun.ttf msgothic.ttc nirmala.ttf times.ttf"
for link_font in $LN_FONTS ; do
......@@ -1143,17 +1149,17 @@ pw_init_db () {
fi
if [[ ! -z `echo "${portwine_exe}" | grep "/data/prefixes/"` ]] && \
[[ -z `echo "${portwine_exe}" | grep "/data/prefixes/DEFAULT/"` ]]
then
then
export PW_PREFIX_NAME=`echo "${portwine_exe}" | awk -F"/prefixes/" '{print $2}' | awk -F"/" '{print $1}'`
fi
fi
if [[ -f "${PORTWINE_DB_FILE}" ]] ; then
. "${PORTWINE_DB_FILE}"
init_wine_ver &&
init_wine_ver &&
print_info "Use ${PORTWINE_DB_FILE} db file."
fi
if [[ -z "${PATH_TO_GAME}" ]] || [[ ! -d "${PATH_TO_GAME}" ]]; then
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
fi
if [[ "${PW_WINE_CPU_TOPOLOGY}" == "disabled" ]] && [[ ! -z "${WINE_CPU_TOPOLOGY}" ]] ; then
......@@ -1349,7 +1355,7 @@ pw_create_gui_png () {
-x --output="${PORT_WINE_TMP_PATH}/tmp_img/" -t14 "$(readlink -f "${portwine_exe}")"
fi
cp "$(ls -S -1 "${PORT_WINE_TMP_PATH}/tmp_img/"*".ico" | head -n 1)" "${PORT_WINE_TMP_PATH}/tmp_img/${PORTPROTON_NAME}.ico"
if command -v icotool &>/dev/null ; then
icotool -x --width=${PW_RESIZE_TO} --height=${PW_RESIZE_TO} --output="${PORT_WINE_TMP_PATH}/tmp_img/" \
"${PORT_WINE_TMP_PATH}/tmp_img/${PORTPROTON_NAME}.ico"
......@@ -1358,7 +1364,7 @@ pw_create_gui_png () {
-x --width=${PW_RESIZE_TO} --height=${PW_RESIZE_TO} --output="${PORT_WINE_TMP_PATH}/tmp_img/" \
"${PORT_WINE_TMP_PATH}/tmp_img/${PORTPROTON_NAME}.ico"
fi
if [[ ! -f "$(ls -S -1 "${PORT_WINE_TMP_PATH}/tmp_img/"*".png" | grep "${PW_RESIZE_TO}x${PW_RESIZE_TO}")" ]] ; then
if [[ ! -f "$(ls -S -1 "${PORT_WINE_TMP_PATH}/tmp_img/"*".png" | grep "${PW_RESIZE_TO}x${PW_RESIZE_TO}")" ]] ; then
if command -v icotool &>/dev/null ; then
icotool -x --output="${PORT_WINE_TMP_PATH}/tmp_img/" "${PORT_WINE_TMP_PATH}/tmp_img/${PORTPROTON_NAME}.ico"
else
......@@ -1376,11 +1382,11 @@ pw_create_gui_png () {
&& command -v convert &>/dev/null \
&& [[ -f "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" ]]
then
convert "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" -resize ${PW_RESIZE_TO}x${PW_RESIZE_TO} "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png"
convert "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" -resize ${PW_RESIZE_TO}x${PW_RESIZE_TO} "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png"
fi
if [[ -z "${PW_ICON_FOR_YAD}" ]] ; then
if [[ ! -z "`file "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" | grep "${PW_RESIZE_TO} x ${PW_RESIZE_TO}"`" ]] ; then
export PW_ICON_FOR_YAD="${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png"
export PW_ICON_FOR_YAD="${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png"
else
export PW_ICON_FOR_YAD="${PW_GUI_ICON_PATH}/port_proton.png"
fi
......@@ -1443,7 +1449,7 @@ pw_create_unique_exe () {
elif [[ ! -z "$PORTWINE_CREATE_SHORTCUT_NAME" ]] ; then
ln -sf "$BASENAME_GAME_EXE" "$PORTWINE_CREATE_SHORTCUT_NAME.exe"
export portwine_exe="$BASEDIR_GAME/$PORTWINE_CREATE_SHORTCUT_NAME.exe"
else
else
print_warning "There are no arguments for creating a symbolic link! Skip it..."
fi
popd
......
......@@ -35,7 +35,7 @@ start_portwine () {
yad_error_download && exit 1
fi
fi
DOTPFX_URL="github.com/Castro-Fidel/PortWINE/releases/download/dotpfx${DOTPFX_VER}/dotpfx${DOTPFX_VER}.tar.xz"
if [[ "${PW_PREFIX_NAME}" == "DOTNET" ]] && [[ ! -f "${WINEPREFIX}"/.dotnet${DOTPFX_VER} ]] ; then
print_info "Download and install DOTNET pfx..."
......@@ -47,7 +47,7 @@ start_portwine () {
yad_error_download && exit 1
fi
fi
var_winedlloverride_update "${PW_MUST_WINEDLLOVERRIDES}"
pw_list_install_dll_in_prefix
if [[ "${PW_WINE_USE}" != "USE_SYSTEM_WINE" ]]
......@@ -85,7 +85,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
wait_wineserver
print_info "The prefix has been updated."
}
if [[ ! -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/drive_c/windows ]] \
|| [[ ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/userdef.reg ]] \
|| [[ ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"/system.reg ]] \
......@@ -197,8 +197,8 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
export PW_USE_GAMESCOPE="0"
export PW_RUN_GAMESCOPE=""
fi
enabled_fake_nvidia_videocard ()
enabled_fake_nvidia_videocard ()
{
if [[ "${1}" == old ]] ; then
sed -i /'dxgi.customDeviceDesc =/c # dxgi.customDeviceDesc =' "${DXVK_CONFIG_FILE}"
......@@ -206,7 +206,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
sed -i /'dxgi.customVendorId =/c dxgi.customVendorId = 10de' "${DXVK_CONFIG_FILE}"
sed -i /'dxgi.hideAmdGpu =/c # dxgi.hideAmdGpu =' "${DXVK_CONFIG_FILE}"
sed -i /'dxgi.hideNvidiaGpu =/c # dxgi.hideNvidiaGpu =' "${DXVK_CONFIG_FILE}"
unset WINE_HIDE_NVIDIA_GPU WINE_HIDE_AMD_GPU
unset WINE_HIDE_NVIDIA_GPU WINE_HIDE_AMD_GPU
unset DXVK_NVAPI_DRIVER_VERSION DXVK_NVAPI_ALLOW_OTHER_DRIVERS
elif [[ "${1}" == new ]] ; then
sed -i /'dxgi.customDeviceDesc =/c dxgi.customDeviceDesc = "NVIDIA GeForce RTX 4090"' "${DXVK_CONFIG_FILE}"
......@@ -224,7 +224,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
sed -i /'dxgi.customVendorId =/c # dxgi.customVendorId =' "${DXVK_CONFIG_FILE}"
sed -i /'dxgi.hideAmdGpu =/c # dxgi.hideAmdGpu =' "${DXVK_CONFIG_FILE}"
sed -i /'dxgi.hideNvidiaGpu =/c # dxgi.hideNvidiaGpu =' "${DXVK_CONFIG_FILE}"
unset WINE_HIDE_NVIDIA_GPU WINE_HIDE_AMD_GPU
unset WINE_HIDE_NVIDIA_GPU WINE_HIDE_AMD_GPU
unset DXVK_NVAPI_DRIVER_VERSION DXVK_NVAPI_ALLOW_OTHER_DRIVERS
fi
}
......@@ -264,7 +264,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
else
try_force_link_file "${PW_PLUGINS_PATH}/nvngx/nvngx.dll" "${WINEPREFIX}/drive_c/windows/system32/"
try_force_link_file "${PW_PLUGINS_PATH}/nvngx/_nvngx.dll" "${WINEPREFIX}/drive_c/windows/system32/"
fi
fi
enabled_fake_nvidia_videocard 0
var_winedlloverride_update "nvngx,_nvngx,nvapi,nvapi64=n;nvcuda=b"
else
......@@ -272,7 +272,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
export DXVK_ENABLE_NVAPI=0
var_winedlloverride_update "nvngx,_nvngx="
fi
if [[ "${PW_USE_GALLIUM_ZINK}" == 1 ]]
then export PW_VULKAN_USE=5
fi
......@@ -291,7 +291,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
then export WINE_DO_NOT_CREATE_DXGI_DEVICE_MANAGER="1"
else export WINE_DO_NOT_CREATE_DXGI_DEVICE_MANAGER="0"
fi
[[ "${PW_MANGOHUD_USER_CONF}" == 1 ]] && unset MANGOHUD_CONFIG
[[ "${PW_VKBASALT_USER_CONF}" == 1 ]] && unset PW_VKBASALT_EFFECTS PW_VKBASALT_FFX_CAS
......@@ -373,7 +373,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
print_info "Gamemod is not installed or disabled in vars script or db file: PW_USE_GAMEMODE=$PW_USE_GAMEMODE"
fi
pw_other_fixes
#enabled BattleEye_Runtime and EasyAntiCheat_Runtime
if [[ "${PW_USE_EAC_AND_BE}" == 1 ]] ; then
export PROTON_BATTLEYE_RUNTIME="${PW_PLUGINS_PATH}/BattlEye_Runtime"
......@@ -410,7 +410,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
then
echo "d3dx9" >> "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log"
fi
#try link d3d extras libs
# try link d3d extras libs
PATH_TO_D3DEXTRAS="${PW_PLUGINS_PATH}/d3d_extras"
for d3d_extras_from_plugins in $D3D_EXTRAS_LIBS ; do
try_force_link_file "${PATH_TO_D3DEXTRAS}/x64/${d3d_extras_from_plugins}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
......@@ -427,6 +427,15 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
done
fi
# fix physx
PHYSX_PATH="${WINEPREFIX}/drive_c/Program Files (x86)/NVIDIA Corporation/PhysX/Common"
for physx_dll in PhysXDevice PhysXLoader PhysXUpdateLoader ; do
try_force_link_file "${PHYSX_PATH}/${physx_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_force_link_file "${PHYSX_PATH}/${physx_dll}64.dll" "${WINEPREFIX}/drive_c/windows/system32/"
done
try_force_link_file "${PHYSX_PATH}/cudart32_65.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_force_link_file "${PHYSX_PATH}/cudart64_65.dll" "${WINEPREFIX}/drive_c/windows/system32/"
create_new_dir "${PW_VULKAN_DIR}/opengl"
PATH_TO_DXVK_FILES="${PW_VULKAN_DIR}/opengl"
PATH_TO_VKD3D_FILES="${PW_VULKAN_DIR}/opengl"
......@@ -459,14 +468,14 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
old_IFS=$IFS
IFS=$'\n'
for D3D_MP in $FIND_D3D_MODULE ; do
if [[ ! -z "$D3D_MODULE_PATH" ]]
if [[ ! -z "$D3D_MODULE_PATH" ]]
then export D3D_MODULE_PATH="$D3D_MODULE_PATH:/run/host${D3D_MP}"
else export D3D_MODULE_PATH="/run/host${D3D_MP}"
fi
done
IFS=$old_IFS
print_info "D3D_MODULE_PATH=${D3D_MODULE_PATH}"
else
else
pw_stop_progress_bar
yad_error "d3dadapter9.so.1.0.0 - ${loc_find_d3dadapter9_error}"
stop_portwine
......@@ -480,10 +489,10 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
export WINE_D3D_CONFIG='renderer=vulkan'
else
print_info "Use VKD3D-PROTON, DXVK and D8VK (DirectX 8-12 to vulkan)"
if [[ "${PW_USE_WINE_DXGI}" == 1 ]] ; then
if [[ "${PW_USE_WINE_DXGI}" == 1 ]] ; then
export CP_DXVK_FILES="d3d11 d3d10core d3d9 dxvk_config" # openvr_api_dxvk
var_winedlloverride_update dxgi=b
elif [[ "${USE_ALL_DXVK_DLLS}" == 1 ]] ; then
elif [[ "${USE_ALL_DXVK_DLLS}" == 1 ]] ; then
export CP_DXVK_FILES="d3d11 d3d10core d3d10_1 d3d10 d3d9 dxgi dxvk_config" # openvr_api_dxvk
else
export CP_DXVK_FILES="d3d11 d3d10core d3d9 dxgi dxvk_config" # openvr_api_dxvk
......@@ -516,10 +525,10 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
try_force_link_file "${PW_PLUGINS_PATH}/nvapi/x32/nvapi.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_force_link_file "${PATH_TO_DXVK_FILES}/x64/nvapi64.dll" "${WINEPREFIX}/drive_c/windows/system32/" || \
try_force_link_file "${PW_PLUGINS_PATH}/nvapi/x64/nvapi64.dll" "${WINEPREFIX}/drive_c/windows/system32/"
try_force_link_file "${PW_PLUGINS_PATH}/nvapi/x64/nvapi64.dll" "${WINEPREFIX}/drive_c/windows/system32/"
print_info "Try link native VKD3D files..."
for wine_vkd3d_dll in d3d12 d3d12core libvkd3d-1 libvkd3d-shader-1; do
for wine_vkd3d_dll in d3d12 d3d12core libvkd3d-1 libvkd3d-shader-1; do
if [[ -f "${PATH_TO_VKD3D_FILES}/x64/${wine_vkd3d_dll}.dll" ]] ; then
try_force_link_file "${PATH_TO_VKD3D_FILES}/x86/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_force_link_file "${PATH_TO_VKD3D_FILES}/x64/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
......@@ -538,7 +547,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
try_force_link_file "${WINEDIR}"/lib/wine/i386-windows/vrclient.dll "${WINEPREFIX}/drive_c/vrclient/bin/"
try_force_link_file "${WINEDIR}"/lib64/wine/x86_64-windows/vrclient_x64.dll "${WINEPREFIX}/drive_c/vrclient/bin/"
fi
if [[ "${PW_USE_SHADER_CACHE}" == 1 ]] ; then
create_new_dir "${PATH_TO_DXVK_FILES}/gl_shader_cache"
export __GL_SHADER_DISK_CACHE=1
......@@ -605,7 +614,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
echo "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}" >> "${PORT_WINE_TMP_PATH}/update_pfx_log"
print_info "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}"
${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"
"${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${PW_DLL_NEED_INSTALL} | tee -a "${PORT_WINE_TMP_PATH}/update_pfx_log"
wait_wineserver
kill_portwine
fi
......@@ -624,7 +633,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
echo "Set to win${PW_WINDOWS_VER}"
fi
if [[ "${portwine_exe}" == *-Shipping.exe ]] ; then
if [[ "${portwine_exe}" == *-Shipping.exe ]] ; then
echo "Disable EAC"
[[ -z "${LAUNCH_PARAMETERS}" ]] && export LAUNCH_PARAMETERS+=" -eac-nop-loaded "
fi
......@@ -633,7 +642,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
pw_tray_icon
sleep 0.5
if [[ "${PW_CHECK_AUTOINSTAL}" != "1" ]] ; then
pw_start_progress_bar_cover "${PW_GUI_ICON_PATH}/covers/loading_${update_loc}.gif"
pw_start_progress_bar_cover "${PW_GUI_ICON_PATH}/covers/loading_${update_loc}.gif"
fi
fi
add_in_start_portwine
......@@ -643,7 +652,7 @@ d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d vulkan-1"
fi
if [[ "${PW_DISABLE_COMPOSITING}" == "1" ]] \
&& ! check_gamescope_session
&& ! check_gamescope_session
then
if [[ "${DESKTOP_SESSION}" =~ "plasma" ]] ; then
qdbus org.kde.KWin /Compositor suspend
......@@ -665,7 +674,7 @@ pw_run () {
if [[ ! -z "${PATH_TO_GAME}" ]] && [[ -d "${PATH_TO_GAME}" ]] ; then
cd "${PATH_TO_GAME}"
elif [[ -f "$portwine_exe" ]] ; then
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
cd "${PATH_TO_GAME}"
else
cd "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c"
......@@ -779,7 +788,7 @@ if [[ -z "${LANG}" ]] ; then
export FORCE_ENG_LANG=1
elif [[ "${START_FROM_STEAM}" == 1 ]] ; then
export FORCE_ENG_LANG=1
else
else
unset FORCE_ENG_LANG
fi
......@@ -855,7 +864,7 @@ fi
cd "${PORT_SCRIPTS_PATH}"
. "${PORT_SCRIPTS_PATH}/var"
export STEAM_SCRIPTS="${PORT_WINE_PATH}/steam_scripts"
export PW_PLUGINS_PATH="${PORT_WINE_TMP_PATH}/plugins${PW_PLUGINS_VER}"
export PW_GUI_ICON_PATH="${PORT_WINE_PATH}/data/img/gui"
......@@ -869,7 +878,7 @@ try_remove_dir "${PW_WINELIB}/var"
export install_ver=`cat "${PORT_WINE_TMP_PATH}/${portname}_ver" | head -n 1`
export WINETRICKS_DOWNLOADER="curl"
export USER_CONF="${PORT_WINE_PATH}/data/user.conf"
check_user_conf
check_user_conf
check_variables PW_LOG "0"
try_remove_file "${PORT_WINE_TMP_PATH}/update_pfx_log"
......
......@@ -56,7 +56,7 @@ if [[ -f "${PORT_WINE_TMP_PATH}/tmp_main_gui_size" ]] && [[ ! -z "$(cat ${PORT_W
else
export PW_MAIN_SIZE_W="1100"
export PW_MAIN_SIZE_H="350"
fi
fi
if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then
export PW_ADD_TO_ARGS_IN_RUNTIME="--xterm"
......@@ -134,17 +134,17 @@ portwine_start_debug () {
echo "GLIBC version:" >> "${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"
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"
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"
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"
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"
elif [[ "${PW_VULKAN_USE}" = "4" ]] ; then
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"
fi
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
......@@ -266,7 +266,7 @@ portwine_start_debug () {
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 '/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"
"$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 \
......@@ -368,7 +368,7 @@ pw_prefix_manager () {
if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" ]] ; then
stop_portwine
exit 0
fi
fi
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}/settings_list_tmp"
......@@ -383,8 +383,15 @@ pw_prefix_manager () {
try_remove_file "${PORT_WINE_TMP_PATH}/to_winetricks"
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="" \
"${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${SET_FROM_PFX_MANAGER}
pw_update_pfx_cover_gui "winetricks"
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
else
print_info "Nothing to do. Restarting PortProton..."
......@@ -396,33 +403,6 @@ pw_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 () {
cd "$HOME"
unset PW_SANDBOX_HOME_PATH
......@@ -474,7 +454,7 @@ pw_create_prefix_backup () {
yad_info "$PW_PFX_BACKUP_INFO"
echo "1" > "${PORT_WINE_TMP_PATH}/pfx_backup_info"
fi
else
else
yad_error "$PW_PFX_BACKUP_ERROR $PW_PREFIX_NAME"
fi
......@@ -546,7 +526,7 @@ use: [--reinstall] [--autoinstall]
'--autoinstall' )
export PW_YAD_SET="$2"
pw_autoinstall_from_db
pw_autoinstall_from_db
exit 0 ;;
esac
......@@ -561,7 +541,7 @@ export PW_PREFIX_NAME PW_ALL_PREFIXES
unset PW_ADD_PREFIXES_TO_GUI
IFS_OLD=$IFS
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) ]] && \
export PW_ADD_PREFIXES_TO_GUI="${PW_ADD_PREFIXES_TO_GUI}!${PAIG}"
done
......@@ -617,12 +597,12 @@ else
else
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"
fi
fi
fi
unset PW_GUI_DISABLED_CS
fi
if [[ -f "${portwine_exe}" ]] ; then
if [[ "${PW_GUI_DISABLED_CS}" != 1 ]] ; then
if [[ "${PW_GUI_DISABLED_CS}" != 1 ]] ; then
pw_create_gui_png
grep -il "${portwine_exe}" "${HOME}/.local/share/applications"/*.desktop
if [[ "$?" != "0" ]] ; then
......@@ -751,19 +731,19 @@ else
export KEY="$RANDOM"
orig_IFS="$IFS" && IFS=$'\n'
PW_ALL_DF="$(ls ${PORT_WINE_PATH}/ | grep .desktop | grep -vE '(PortProton|readme)')"
if [[ -z "${PW_ALL_DF}" ]]
then PW_GUI_SORT_TABS=(1 2 3 4 5)
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\"%"
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_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
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
PW_GENERATE_BUTTONS+="--field= ${PW_DESKTOP_FILES//".desktop"/""}!${PW_NAME_D_ICON_48}!:FBTN%@bash -c \"run_desktop_b_click "${PW_DESKTOP_FILES//" "}"\"%"
done
......@@ -931,7 +911,7 @@ if [[ "${PW_DISABLED_CREATE_DB}" != 1 ]] ; then
export PORTWINE_DB_FILE="${portwine_exe}".ppdb
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
[ ! -z "$PW_YAD_SET" ] && case "$PW_YAD_SET" in
......
#!/usr/bin/env bash
#Author: Castro-Fidel (linux-gaming.ru)
#SCRIPTS_NEXT_VERSION=2270
#SCRIPTS_NEXT_VERSION=2271
########################################################################
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"
......
......@@ -4,7 +4,7 @@
yad_info () {
print_info "$@"
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"
fi
"${pw_yad_v12_3}" --no-wrap --text "$@" --width=400 --height=50 --borders=15 --title "INFO" \
......@@ -16,7 +16,7 @@ export -f yad_info
yad_error () {
print_error "$@"
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"
fi
"${pw_yad_v12_3}" --no-wrap --text "$@" --width=400 --borders=15 --title "ERROR" \
......@@ -27,7 +27,7 @@ export -f yad_error
yad_error_download () {
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"
fi
"${pw_yad_v12_3}" --text "$loc_gui_error_download" --width=400 --borders=15 --title "$loc_gui_error" \
......@@ -38,7 +38,7 @@ yad_error_download () {
yad_question () {
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"
fi
"${pw_yad_v12_3}" --text "${1}" --width=400 --borders=15 --title "${inst_set}." \
......@@ -73,9 +73,21 @@ pw_start_progress_bar_cover_block () {
}
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
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_Y=`file "${PW_GIF_FILE}" | awk '{print $9 + 80}'`
echo "UPDATE PREFIX..." > "${PORT_WINE_TMP_PATH}/update_pfx_log"
......@@ -92,11 +104,12 @@ pw_update_pfx_cover_gui () {
sleep 3
PW_TIMER=1
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 &
"${pw_yad_v12_3}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum="1" --picture --filename="${PW_GIF_FILE}" --image-on-top 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=$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 \
--center --auto-close --skip-taskbar --width=$PW_GIF_SIZE_X --height=$PW_GIF_SIZE_Y --tab-pos=bottom 2>/dev/null &
"${pw_yad_v12_3}" --notebook --key="$PW_KEY_PROGRESS_BAR_UP" $TAB_PLACE --no-buttons \
--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="$!"
return 0
fi
......@@ -105,7 +118,8 @@ pw_update_pfx_cover_gui () {
pw_start_progress_bar_cs () {
if ! check_start_from_steam ; then
"${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="$!"
return 0
fi
......@@ -114,7 +128,8 @@ pw_start_progress_bar_cs () {
pw_start_progress_bar_block () {
if ! check_start_from_steam ; then
"${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="$!"
return 0
fi
......@@ -145,6 +160,7 @@ export -f pw_stop_progress_bar_cover_block
open_changelog () {
"${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 \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" \
--filename="${PORT_WINE_PATH}/data/${PW_CHANGELOG_FILE}" &>/dev/null
}
export -f open_changelog
......@@ -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_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 &
"${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} \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" \
......@@ -265,16 +281,16 @@ pw_gui_for_edit_db () {
YAD_STATUS="$?"
export SKIP_CHECK_UPDATES=1
case "$YAD_STATUS" in
1)
1)
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
;;
2)
try_remove_file "$portwine_exe".ppdb
2)
try_remove_file "$portwine_exe".ppdb
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
;;
252)
252)
exit 0
;;
esac
......@@ -317,13 +333,13 @@ pw_gui_for_edit_db () {
# PW_AMD_VULKAN_USE
case "$YAD_STATUS" in
0)
0)
print_info "Restarting PP after update ppdb file..."
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
;;
150)
xdg-open "${PORTWINE_DB_FILE}" &
150)
xdg-open "${PORTWINE_DB_FILE}" &
exit 0
;;
esac
......@@ -331,7 +347,7 @@ pw_gui_for_edit_db () {
gui_proton_downloader () {
if [[ "$PW_WINE_USE" == PROTON_LG ]]
if [[ "$PW_WINE_USE" == PROTON_LG ]]
then export PW_WINE_USE="${PW_PROTON_LG_VER}"
elif [[ "$PW_WINE_USE" == WINE_*_LG ]] || [[ "$PW_WINE_USE" == WINE_LG ]]
then export PW_WINE_USE="${PW_WINE_LG_VER}"
......@@ -595,7 +611,7 @@ gui_MangoHud () {
time version vkbasalt vram vulkan_driver wine
)
# fps_only
unset ADD_GUI_MH GUI_MH_RESULT
GET_REFRESH_RATE="30!45!60!75!120!144!165!240"
......@@ -689,7 +705,7 @@ gui_MangoHud () {
export GUI_MH_RESULT="fps_only"
print_info "In the MangoHud config fps_only is detected all settings are reseted"
fi
export MANGOHUD_CONFIG="${GUI_MH_RESULT}"
edit_db_from_gui MANGOHUD_CONFIG PW_MANGOHUD FPS_LIMIT
......@@ -803,7 +819,7 @@ portwine_create_shortcut () {
fi
unset PW_SKIP_RESTART_STEAM
fi
[[ "$1" != silent ]] && [[ "${PW_SKIP_RESTART_STEAM}" != 1 ]] && "${PORT_WINE_PATH}" 2>1 >/dev/null &
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