Commit 4a42eabf authored by Mikhail Tergoev's avatar Mikhail Tergoev

updated yad and fix GUI

parent 8bccab02
......@@ -213,7 +213,7 @@ Special thanks:
* the faudio component has been added to the DEFAULT prefix (required for games running on the Creation Engine, example The Elder Scrolls)
* the plugins_v14 library package has been updated:
transferred from the libs package: d3d_extras, reshade and default_pfx
portable versions have been added: $PW_YAD_BIN, perl, exiftool (thanks to Boria138)
portable versions have been added: yad_gui_pp, perl, exiftool (thanks to Boria138)
* the libs_v47 library package has been updated:
pressure-vessel 0.20240306.0
sniper 0.20240307.80401
......
......@@ -3,7 +3,7 @@
История изменений:
* обновлен пакет plugins до v16:
* обновлена версия yad 13.0.3 добавлено множество патчей улучшающих интерфейс (спасибо Htylol)
* обновлена версия yad - добавлено множество патчей улучшающих интерфейс (спасибо Htylol)
* исправлена информация о проекте при наведении курсора на иконку в трее (спасибо Htylol)
* обновлен интерфейс запуска exe и ярыков, добавлена вкладка с настройками (спасибо Htylol)
* ускорено создание новых префиксов (в 1.5 и более раз в зависимости от характеристик ПК)
......@@ -238,7 +238,7 @@
* в префикс DEFAULT добавлен компонент faudio (необходим для игр на движке Creation Engine, пример The Elder Scrolls)
* обновлен пакет библиотек plugins_v14:
перенесены из пакета libs: d3d_extras, reshade и default_pfx
добавлены портативные версии: $PW_YAD_BIN, perl, exiftool (спасибо Boria138)
добавлены портативные версии: yad_gui_pp, perl, exiftool (спасибо Boria138)
* обновлен пакет библиотек libs_v47:
pressure-vessel 0.20240306.0
sniper 0.20240307.80401
......
......@@ -560,15 +560,6 @@ init_wine_ver () {
}
pw_init_runtime () {
if [ ! -z ${PATH_TMP} ]
then export PATH="${PATH_TMP}"
else export PATH_TMP="${PATH}"
fi
if [ ! -z "${PATH}" ]
then export PATH="${PATH}:${PW_PLUGINS_PATH}/portable/bin"
else export PATH="${PW_PLUGINS_PATH}/portable/bin"
fi
check_flatpak && export PW_USE_RUNTIME="0"
if [[ "$PW_USE_RUNTIME" != "1" ]] \
......@@ -608,19 +599,26 @@ ${PW_PV_OVERRIDES}/i386-linux-gnu/aliases:\
/overrides/lib/x86_64-linux-gnu:\
/overrides/lib/i386-linux-gnu"
if [ ! -z "${PATH}" ]
then export PW_PATH="${PATH}:${PW_PLUGINS_PATH}/portable/bin"
else export PW_PATH="${PW_PLUGINS_PATH}/portable/bin"
fi
if [[ ! -z "${PW_SANDBOX_HOME_PATH}" && -d "${PW_SANDBOX_HOME_PATH}" ]] ; then
export pw_runtime="${PW_WINELIB}/pressure-vessel/bin/pressure-vessel-unruntime \
--unshare-home \
--home="${PW_SANDBOX_HOME_PATH}" \
--home=${PW_SANDBOX_HOME_PATH} \
--remove-game-overlay \
--share-pid \
${PW_ADD_TO_ARGS_IN_RUNTIME} --"
${PW_ADD_TO_ARGS_IN_RUNTIME} -- \
env PATH=$PW_PATH "
else
export pw_runtime="${PW_WINELIB}/pressure-vessel/bin/pressure-vessel-unruntime \
--share-home \
--remove-game-overlay \
--share-pid \
${PW_ADD_TO_ARGS_IN_RUNTIME} --"
${PW_ADD_TO_ARGS_IN_RUNTIME} -- \
env PATH=$PW_PATH "
fi
if [[ "$PW_USE_SYSTEM_VK_LAYERS" == "1" ]] ; then
......@@ -840,8 +838,8 @@ stop_portwine () {
kill_portwine &&
try_remove_dir "${PW_WINELIB}/var"
find "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/" -maxdepth 1 -type f -name "*.tmp" -delete
if [[ ! -z "$(pgrep -a $PW_YAD_BIN | grep "\--notification" | awk '{print $1}')" ]] ; then
kill -s SIGUSR1 "$(pgrep -a $PW_YAD_BIN | grep "\--notification" | awk '{print $1}')" 2>/dev/null
if [[ ! -z "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" ]] ; then
kill -s SIGUSR1 "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" 2>/dev/null
fi
add_in_stop_portwine
unset SKIP_CHECK_UPDATES
......@@ -1300,8 +1298,8 @@ pw_port_update () {
print_info "Scripts version in git = ${scripts_current_ver}"
print_info "Scripts version local = ${scripts_install_ver}"
if [[ ! -z "${scripts_current_ver}" ]] && [[ "${scripts_current_ver}" -gt "${scripts_install_ver}" ]] ; then
if [[ -f "${PW_PLUGINS_PATH}/portable/bin/$PW_YAD_BIN" ]]
then export pw_yad="${PW_PLUGINS_PATH}/portable/bin/$PW_YAD_BIN"
if [[ -f "$PW_GUI_THEMES_PATH/gui/yad_gui_pp" ]]
then export pw_yad="$PW_GUI_THEMES_PATH/gui/yad_gui_pp"
elif command -v yad &>/dev/null
then local pw_yad="yad"
else local pw_yad="not_found"
......@@ -1413,18 +1411,22 @@ edit_db_field_read () {
edit_db_from_gui () {
print_info "edit_db_from_gui PORTWINE_DB_FILE=$PORTWINE_DB_FILE"
for mod_db in $@ ; do
if ! grep "export ${mod_db}=" "${PORTWINE_DB_FILE}" &>/dev/null
then echo "export ${mod_db}=\"${!mod_db}\"" >> "${PORTWINE_DB_FILE}"
elif grep "export ${mod_db}=" "${PORTWINE_DB_FILE}" | grep -v "#" &>/dev/null
then
if [[ "$(grep "export ${mod_db}=" "${PORTWINE_DB_FILE}" | grep -v "#")" != "export ${mod_db}=\"${!mod_db}\"" ]]
then sed -ri "s|^export ${mod_db}=.*|export ${mod_db}=\"${!mod_db}\"|" "${PORTWINE_DB_FILE}"
if [[ ! -z "$PORTWINE_DB_FILE" ]] \
&& [[ -f "$PORTWINE_DB_FILE" ]]
then
for mod_db in $@ ; do
if ! grep "export ${mod_db}=" "${PORTWINE_DB_FILE}" &>/dev/null
then echo "export ${mod_db}=\"${!mod_db}\"" >> "${PORTWINE_DB_FILE}"
elif grep "export ${mod_db}=" "${PORTWINE_DB_FILE}" | grep -v "#" &>/dev/null
then
if [[ "$(grep "export ${mod_db}=" "${PORTWINE_DB_FILE}" | grep -v "#")" != "export ${mod_db}=\"${!mod_db}\"" ]]
then sed -ri "s|^export ${mod_db}=.*|export ${mod_db}=\"${!mod_db}\"|" "${PORTWINE_DB_FILE}"
fi
elif [[ "$(grep "export ${mod_db}=" "${PORTWINE_DB_FILE}")" != "export ${mod_db}=${!mod_db}" ]]
then sed -ri "s|.*export ${mod_db}=.*|export ${mod_db}=\"${!mod_db}\"|g" "${PORTWINE_DB_FILE}"
fi
elif [[ "$(grep "export ${mod_db}=" "${PORTWINE_DB_FILE}")" != "export ${mod_db}=${!mod_db}" ]]
then sed -ri "s|.*export ${mod_db}=.*|export ${mod_db}=\"${!mod_db}\"|g" "${PORTWINE_DB_FILE}"
fi
done
done
fi
return 0
}
......@@ -1449,7 +1451,12 @@ pw_create_gui_png () {
if [[ ! -z "${PORTWINE_CREATE_SHORTCUT_NAME}" ]] ; then
PORTPROTON_NAME="${PORTWINE_CREATE_SHORTCUT_NAME}"
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')
if command -v exiftool &>/dev/null ; then
PW_PRODUCTNAME=$(exiftool -ProductName "${portwine_exe}" 2>/dev/null | sed -n 's/^Product Name\s*:\s*//p')
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')
fi
if [[ "$PW_PRODUCTNAME" =~ "Launcher" ]] \
|| [[ "$PW_PRODUCTNAME" =~ "RU" ]]
then
......@@ -1481,7 +1488,7 @@ pw_create_gui_png () {
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_WINELIB}/runtime/files/bin/python3.9" \
"${PW_PLUGINS_PATH}/portable/bin/exe-thumbnailer" -s "${PW_RESIZE_TO}" \
"$(readlink -f "${portwine_exe}")" "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png"
fi
......@@ -2312,7 +2319,7 @@ start_portwine () {
echo "START WINETRICKS..." >> "${PORT_WINE_TMP_PATH}/update_pfx_log"
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="" \
${pw_runtime} 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} | tee -a "${PORT_WINE_TMP_PATH}/update_pfx_log"
wait_wineserver
kill_portwine
......@@ -2327,7 +2334,7 @@ start_portwine () {
then
export PW_WINDOWS_VER="xp64"
fi
${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
${pw_runtime} LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
"${WINELOADER}" winecfg -v $(echo "win${PW_WINDOWS_VER}" | sed 's/.*/\L&/')
wait_wineserver
kill_portwine
......@@ -2354,10 +2361,10 @@ start_portwine () {
fi
else
print_info "Added DisableHidraw = 0 to reg file"
${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
${pw_runtime} LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
"${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "DisableHidraw" /t REG_DWORD /d 0 /f
print_info "Added Enable SDL = 0 to reg file"
${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
${pw_runtime} LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
"${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "Enable SDL" /t REG_DWORD /d 0 /f
fi
else
......@@ -2375,10 +2382,10 @@ start_portwine () {
fi
else
print_info "Added DisableHidraw = 1 to reg file"
${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
${pw_runtime} LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
"${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "DisableHidraw" /t REG_DWORD /d 1 /f
print_info "Added Enable SDL = 1 to reg file"
${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
${pw_runtime} LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
"${WINELOADER}" reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus" /v "Enable SDL" /t REG_DWORD /d 1 /f
fi
fi
......@@ -2449,7 +2456,6 @@ pw_run () {
print_info "Log from RUNTIME and WINE:"
${PW_RUN_GAMESCOPE} \
${pw_runtime} \
env PATH="${PATH}" \
LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \
LD_PRELOAD="${PW_LD_PRELOAD}" \
VK_LAYER_PATH="${PW_VK_LAYER_PATH}" \
......@@ -2468,7 +2474,6 @@ pw_run () {
echo "Log WINE:" > "${PW_LOG_TO_FILE}"
${PW_RUN_GAMESCOPE} \
${pw_runtime} \
env PATH="${PATH}" \
LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \
LD_PRELOAD="${PW_LD_PRELOAD}" \
VK_LAYER_PATH="${PW_VK_LAYER_PATH}" \
......@@ -2592,7 +2597,6 @@ pw_start_cont_xterm () {
unset PW_SANDBOX_HOME_PATH
pw_init_runtime
${pw_runtime} \
env PATH="${PATH}" \
LD_PRELOAD="${PW_LD_PRELOAD}" \
VK_LAYER_PATH="${PW_VK_LAYER_PATH}" \
VK_INSTANCE_LAYERS="${PW_VK_INSTANCE_LAYERS}" \
......@@ -2609,7 +2613,7 @@ yad_info () {
fi
"${pw_yad}" --no-wrap --text "$@" --width=400 --height=50 --borders=15 --title "INFO" \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --image="$PW_GUI_ICON_PATH/info.svg" \
--center --text-align=center \
--center --text-align=center --fixed \
--button="$(eval_gettext "OK")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png" 2>/dev/null
}
export -f yad_info
......@@ -2622,7 +2626,7 @@ yad_error () {
fi
"${pw_yad}" --no-wrap --text "$@" --width=400 --borders=15 --title "ERROR" \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --image="$PW_GUI_ICON_PATH/error.svg" \
--center --text-align=center \
--center --text-align=center --fixed \
--button="$(eval_gettext "EXIT")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png" 2>/dev/null
}
export -f yad_error
......@@ -2648,7 +2652,7 @@ yad_question () {
fi
"${pw_yad}" --text "${1}" --width=400 --borders=15 --title "$(eval_gettext "Choices")" \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --image="$PW_GUI_ICON_PATH/question.svg" \
--no-wrap --center --text-align=center \
--no-wrap --center --text-align=center --fixed \
--button="$(eval_gettext "CANCEL")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":1 \
--button="$(eval_gettext "OK")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":0 2>/dev/null
[[ "$?" != 0 ]] && return 1 || return 0
......@@ -2692,14 +2696,16 @@ pw_update_pfx_cover_gui () {
YAD_UNDECORATED="--undecorated --center"
fi
if ! check_start_from_steam && ! pgrep -a yad | grep "$PW_YAD_BIN --notebook --key=$PW_KEY_PROGRESS_BAR_UP" &>/dev/null ; then
if ! check_start_from_steam \
&& ! pgrep -a yad | grep "yad_gui_pp --notebook --key=$PW_KEY_PROGRESS_BAR_UP" &>/dev/null
then
PW_KEY_PROGRESS_BAR_UP=$RANDOM
PW_GIF_FILE="${COVERS_PATH}/update_prefix_${LANGUAGE}.gif"
PW_GIF_SIZE_X=$(file "${PW_GIF_FILE}" | awk '{print $7 + 20}')
PW_GIF_SIZE_Y=$(file "${PW_GIF_FILE}" | awk '{print $9 + 65}')
echo "UPDATE PREFIX..." > "${PORT_WINE_TMP_PATH}/update_pfx_log"
export PW_TIMER=0
while read -r line || [[ ! -z $(pgrep -a yad | grep "$PW_YAD_BIN --notebook --key=$PW_KEY_PROGRESS_BAR_UP" | awk '{print $1}') ]] ; do
while read -r line || [[ ! -z $(pgrep -a yad | grep "yad_gui_pp --notebook --key=$PW_KEY_PROGRESS_BAR_UP" | awk '{print $1}') ]] ; do
sleep 0.005
if [[ ! -z "${line}" ]] && [[ -z "$(echo "${line}" | grep -i "gstreamer")" ]] \
&& [[ -z "$(echo "${line}" | grep -i "kerberos")" ]] \
......@@ -2795,8 +2801,8 @@ open_changelog () {
export -f open_changelog
pw_tray_icon () {
if [ ! -z "$(pgrep -a $PW_YAD_BIN | grep "\--notification" | awk '{print $1}')" ] ; then
kill -s SIGUSR1 "$(pgrep -a $PW_YAD_BIN | grep "\--notification" | awk '{print $1}')"
if [ ! -z "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" ] ; then
kill -s SIGUSR1 "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')"
fi
tray_icon_click () {
......@@ -2848,8 +2854,6 @@ pw_gui_for_edit_db () {
GPU_VAR="disabled"
fi
GET_GPU_NAMES=$("$PW_VULKANINFO_PORTABLE" 2>/dev/null | awk -F '=' '/deviceName/{print $2}' | sed '/llvm/d'| sort -u | sed 's/^ //' | paste -sd '!')
logical_cores=$(grep -c "^processor" /proc/cpuinfo)
if [[ "${logical_cores}" -le "4" ]] ; then
GET_LOGICAL_CORE="1!$(seq -s! 1 $((${logical_cores} - 1)))"
......@@ -3653,7 +3657,6 @@ gui_MangoHud () {
pw_init_runtime
pw_mangohud_check
${pw_runtime} \
env PATH="${PATH}" \
LD_PRELOAD="${PW_LD_PRELOAD}" \
VK_LAYER_PATH="${PW_VK_LAYER_PATH}" \
VK_INSTANCE_LAYERS="${PW_VK_INSTANCE_LAYERS}" \
......@@ -3749,13 +3752,14 @@ gui_dgVoodoo2 () {
# GUI CREATE SHORTCUT
portwine_create_shortcut () {
export GDK_BACKEND="x11"
pw_stop_progress_bar
[[ ! -e ${portwine_exe} ]] && return 1
pw_create_gui_png
if [[ "$1" == "block_name" ]] ; then
export name_desktop="${PORTPROTON_NAME}"
OUTPUT=$("${pw_yad}" --title="$(eval_gettext "Choices")" --form \
OUTPUT=$("${pw_yad}" --title="$(eval_gettext "Choices")" --form --gui-type=start \
--window-icon "$PW_GUI_ICON_PATH/portproton.svg" \
--image "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" \
--field="$(eval_gettext "The shortcut will be created in the PortProton directory.")":LBL "" \
......@@ -3767,7 +3771,7 @@ portwine_create_shortcut () {
PW_YAD_OUT=$?
else
export name_desktop="${PORTPROTON_NAME}"
OUTPUT=$("${pw_yad}" --title="$(eval_gettext "Choices")" --form \
OUTPUT=$("${pw_yad}" --title="$(eval_gettext "Choices")" --form --gui-type=start \
--window-icon "$PW_GUI_ICON_PATH/portproton.svg" \
--image "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" \
--field="$(eval_gettext "The shortcut will be created in the PortProton directory.")":LBL "" \
......@@ -3785,14 +3789,15 @@ portwine_create_shortcut () {
else name_desktop=$(echo "$OUTPUT" | awk -F'|' '{print $2}')
fi
name_desktop="$(echo "${name_desktop}" | sed "s/\`//g" | sed "s/\"//g" | sed "s/'//g")"
name_desktop_png="${name_desktop// /_}"
create_menu_desktop_shortcut=$(echo "$OUTPUT" | awk -F'|' '{print $3}')
create_desktop_desktop_shortcut=$(echo "$OUTPUT" | awk -F'|' '{print $4}')
create_menu_steam_shortcut=$(echo "$OUTPUT" | awk -F'|' '{print $5}')
try_remove_file "${PORT_WINE_PATH}/${name_desktop}.desktop"
if [[ "${PORTPROTON_NAME}" != "${name_desktop}" ]]
then mv -f "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" "${PORT_WINE_PATH}/data/img/${name_desktop}.png"
if [[ "${PORTPROTON_NAME}" != "${name_desktop_png}" ]]
then mv -f "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" "${PORT_WINE_PATH}/data/img/${name_desktop_png}.png"
fi
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
......@@ -3806,7 +3811,7 @@ portwine_create_shortcut () {
echo "Categories=Game"
echo "StartupNotify=true"
echo "Path=${PORT_SCRIPTS_PATH}/"
echo "Icon=${PORT_WINE_PATH}/data/img/${name_desktop}.png"
echo "Icon=${PORT_WINE_PATH}/data/img/${name_desktop_png}.png"
} >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
......@@ -3880,9 +3885,9 @@ portwine_delete_shortcut () {
portwine_missing_shortcut () {
"${pw_yad}" --title="$(eval_gettext "Error")" --form \
--window-icon "$PW_GUI_ICON_PATH/portproton.svg" \
--window-icon "$PW_GUI_ICON_PATH/portproton.svg" --fixed \
--image "$PW_GUI_ICON_PATH/error.svg" \
--text "\n$(eval_gettext "Could not find the file:")\n${portwine_exe}\n\n$(eval_gettext "ATTENTION:\nIf you forgot to mount the disk with the running application, click CANCEL!")" \
--text "\n$(eval_gettext "Could not find the file:")\n${portwine_exe}\n\n$(eval_gettext "ATTENTION:\nIf you forgot to mount the disk with the running application, click CANCEL!")\n" \
--button="$(eval_gettext "DELETE SHORTCUT")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":0 \
--button="$(eval_gettext "CANCEL")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":1
if [ $? -eq "0" ] ; then
......@@ -3987,7 +3992,7 @@ pw_prefix_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="" \
${pw_runtime} 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
......@@ -4151,7 +4156,7 @@ portwine_start_debug () {
sleep 3
pw_stop_progress_bar_cover
unset PW_TIMER
while read -r line || [[ ! -z $(pgrep -a yad | grep "$PW_YAD_BIN --text-info --tail --button="STOP"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":0 --title="DEBUG"" | awk '{print $1}') ]] ; do
while read -r line || [[ ! -z $(pgrep -a yad | grep "yad_gui_pp --text-info --tail --button="STOP"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":0 --title="DEBUG"" | awk '{print $1}') ]] ; do
sleep 0.005
if [[ ! -z "${line}" ]] && [[ -z "$(echo "${line}" | grep -i "kerberos")" ]] \
&& [[ -z "$(echo "${line}" | grep -i "ntlm")" ]]
......@@ -4197,7 +4202,7 @@ pw_create_prefix_backup () {
pw_init_runtime
if check_flatpak
then TMP_ALL_PATH=""
else TMP_ALL_PATH="env PATH=\"${PATH}\" LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\""
else TMP_ALL_PATH="LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\""
fi
chmod -R u+w "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"
cat << EOF > "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh
......@@ -4223,14 +4228,12 @@ EOF
}
pw_edit_db () {
PW_EDIT_DB_LIST="PW_MANGOHUD PW_MANGOHUD_USER_CONF PW_VKBASALT PW_VKBASALT_USER_CONF PW_DGVOODOO2 PW_NO_ESYNC PW_NO_FSYNC
PW_USE_RAY_TRACING PW_USE_NVAPI_AND_DLSS PW_USE_FAKE_DLSS PW_WINE_FULLSCREEN_FSR PW_HIDE_NVIDIA_GPU
PW_EDIT_DB_LIST="PW_MANGOHUD PW_MANGOHUD_USER_CONF PW_VKBASALT PW_VKBASALT_USER_CONF PW_DGVOODOO2 PW_USE_GAMESCOPE
PW_NO_ESYNC PW_NO_FSYNC PW_USE_RAY_TRACING PW_USE_NVAPI_AND_DLSS PW_USE_FAKE_DLSS PW_WINE_FULLSCREEN_FSR PW_HIDE_NVIDIA_GPU
PW_VIRTUAL_DESKTOP PW_USE_TERMINAL PW_GUI_DISABLED_CS PW_USE_GAMEMODE PW_USE_D3D_EXTRAS PW_FIX_VIDEO_IN_GAME
PW_REDUCE_PULSE_LATENCY PW_USE_US_LAYOUT PW_USE_GSTREAMER PW_FORCE_LARGE_ADDRESS_AWARE PW_USE_SHADER_CACHE
PW_USE_WINE_DXGI PW_USE_EAC_AND_BE PW_USE_SYSTEM_VK_LAYERS PW_USE_OBS_VKCAPTURE PW_USE_GAMESCOPE PW_DISABLE_COMPOSITING
PW_USE_RUNTIME PW_DINPUT_PROTOCOL
"
PW_USE_WINE_DXGI PW_USE_EAC_AND_BE PW_USE_SYSTEM_VK_LAYERS PW_USE_OBS_VKCAPTURE PW_DISABLE_COMPOSITING
PW_USE_RUNTIME PW_DINPUT_PROTOCOL"
if check_wayland_session ; then
rm_from_var PW_EDIT_DB_LIST "PW_USE_US_LAYOUT"
......@@ -4269,7 +4272,7 @@ export -f gui_credits
button_click () {
[[ ! -z "$1" ]] && echo "$1" > "${PORT_WINE_TMP_PATH}/tmp_yad_form"
if [[ ! -z $(pidof -s yad) ]] || [[ ! -z $(pidof -s $PW_YAD_BIN) ]] ; then
if [[ ! -z $(pidof -s yad) ]] || [[ ! -z $(pidof -s yad_gui_pp) ]] ; then
kill -s SIGUSR1 $(pgrep -a yad | grep "\--key=${KEY} \--notebook" | awk '{print $1}') > /dev/null 2>&1
fi
}
......@@ -4277,7 +4280,7 @@ export -f button_click
button_click_start () {
[[ ! -z "$1" ]] && echo "$1" > "${PORT_WINE_TMP_PATH}/tmp_yad_form"
if [[ ! -z $(pidof -s yad) ]] || [[ ! -z $(pidof -s $PW_YAD_BIN) ]] ; then
if [[ ! -z $(pidof -s yad) ]] || [[ ! -z $(pidof -s yad_gui_pp) ]] ; then
kill -s SIGUSR1 $(pgrep -a yad | grep "\--key=${KEY_START} \--notebook" | awk '{print $1}') > /dev/null 2>&1 \
|| kill -s SIGUSR1 $(pgrep -a yad | grep "\--key=${KEY_START} \--paned" | awk '{print $1}') > /dev/null 2>&1
fi
......@@ -4286,7 +4289,7 @@ export -f button_click_start
run_desktop_b_click () {
[[ ! -z "$1" ]] && echo "$1" > "${PORT_WINE_TMP_PATH}/tmp_yad_form"
if [[ ! -z $(pidof -s yad) ]] || [[ ! -z $(pidof -s $PW_YAD_BIN) ]] ; then
if [[ ! -z $(pidof -s yad) ]] || [[ ! -z $(pidof -s yad_gui_pp) ]] ; then
kill -s SIGUSR1 $(pgrep -a yad | grep "\--key=${KEY} \--notebook" | awk '{print $1}') > /dev/null 2>&1
fi
......
......@@ -72,7 +72,7 @@ fi
unset MANGOHUD MANGOHUD_DLSYM PW_NO_ESYNC PW_NO_FSYNC PW_VULKAN_USE WINEDLLOVERRIDES PW_NO_WRITE_WATCH PW_YAD_SET PW_ICON_FOR_YAD
unset PW_CHECK_AUTOINSTAL PW_VKBASALT_EFFECTS PW_VKBASALT_FFX_CAS PORTWINE_DB PORTWINE_DB_FILE PW_DISABLED_CREATE_DB RADV_PERFTEST
unset CHK_SYMLINK_FILE PW_MESA_GL_VERSION_OVERRIDE PW_VKD3D_FEATURE_LEVEL PATH_TO_GAME PW_START_DEBUG PORTPROTON_NAME
unset CHK_SYMLINK_FILE PW_MESA_GL_VERSION_OVERRIDE PW_VKD3D_FEATURE_LEVEL PATH_TO_GAME PW_START_DEBUG PORTPROTON_NAME PW_PATH
unset PW_PREFIX_NAME WINEPREFIX VULKAN_MOD PW_WINE_VER PW_ADD_TO_ARGS_IN_RUNTIME PW_GAMEMODERUN_SLR AMD_VULKAN_ICD PW_WINE_CPU_TOPOLOGY
unset PW_NAME_D_NAME PW_NAME_D_ICON PW_NAME_D_EXEC PW_EXEC_FROM_DESKTOP PW_ALL_DF PW_GENERATE_BUTTONS PW_NAME_D_ICON PW_NAME_D_ICON_48
unset MANGOHUD_CONFIG FPS_LIMIT PW_WINE_USE WINEDLLPATH WINE WINEDIR WINELOADER WINESERVER PW_USE_RUNTIME PORTWINE_CREATE_SHORTCUT_NAME MIRROR
......@@ -119,12 +119,12 @@ cd "${PORT_SCRIPTS_PATH}" || fatal
# shellcheck source=./var
source "${PORT_SCRIPTS_PATH}/var"
export pw_yad="${PORT_WINE_PATH}/data/scripts/yad_portable/$PW_YAD_BIN"
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"
export PW_GUI_THEMES_PATH="${PORT_WINE_PATH}/data/themes"
export pw_yad="$PW_GUI_THEMES_PATH/gui/yad_gui_pp"
change_locale
......@@ -183,16 +183,18 @@ case "$PW_GUI_START" in
;;
esac
export PW_VULKANINFO_PORTABLE="$PW_PLUGINS_PATH/portable/bin/x86_64-linux-gnu-vulkaninfo"
# check skip update
if [[ "${SKIP_CHECK_UPDATES}" != 1 ]] \
&& [[ ! -f "/tmp/portproton.lock" ]]
then
pw_port_update
pw_check_and_download_plugins
export PW_VULKANINFO_PORTABLE="$PW_PLUGINS_PATH/portable/bin/x86_64-linux-gnu-vulkaninfo"
VULKAN_DRIVER_NAME="$("$PW_VULKANINFO_PORTABLE" 2>/dev/null | grep driverName | awk '{print$3}' | head -1)"
GET_GPU_NAMES=$("$PW_VULKANINFO_PORTABLE" 2>/dev/null | awk -F '=' '/deviceName/{print $2}' | sed '/llvm/d'| sort -u | sed 's/^ //' | paste -sd '!')
LSPCI_VGA="$(lspci -k 2>/dev/null | grep -E 'VGA|3D' | tr -d '\n')"
export LSPCI_VGA VULKAN_DRIVER_NAME
export LSPCI_VGA VULKAN_DRIVER_NAME GET_GPU_NAMES
if command -v xrandr &>/dev/null ; then
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_screen_configuration"
......@@ -243,7 +245,7 @@ source "${USER_CONF}"
if [[ "${SKIP_CHECK_UPDATES}" != 1 ]] ; then
kill_portwine
killall -15 $PW_YAD_BIN 2>/dev/null
killall -15 yad_gui_pp 2>/dev/null
kill -TERM "$(pgrep -a yad | grep PortProton | head -n 1 | awk '{print $1}')" 2>/dev/null
if [[ -f "/usr/bin/portproton" ]] \
......@@ -267,7 +269,7 @@ if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then
pw_init_runtime
if check_flatpak
then TMP_ALL_PATH=""
else TMP_ALL_PATH="env PATH=\"${PATH}\" LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\""
else TMP_ALL_PATH="LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\""
fi
PW_PREFIX_NAME=$(basename "$1" | awk -F'.' '{print $1}')
cat << EOF > "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
......@@ -427,14 +429,14 @@ if [[ -f "${portwine_exe}" ]] ; then
export KEY_START="$RANDOM"
if [[ "${PW_GUI_START}" = NOTEBOOK ]] ; then
"${pw_yad}" --plug=$KEY_START --tabnum=1 --form --separator=";" \
"${pw_yad}" --plug=$KEY_START --tabnum=1 --form --separator=";" --gui-type=start-old \
--image="${PW_ICON_FOR_YAD}" --text-align="center" --text "$PW_COMMENT_DB" \
--field="3D API : :CB" "${PW_DEFAULT_VULKAN_USE}" \
--field=" WINE : :CB" "${PW_DEFAULT_WINE_USE}" \
--field="PREFIX : :CBE" "${PW_ADD_PREFIXES_TO_GUI}" \
1> "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" 2>/dev/null &
"${pw_yad}" --plug=$KEY_START --tabnum=2 --form --columns=2 --align-buttons --homogeneous-row --homogeneous-column \
"${pw_yad}" --plug=$KEY_START --tabnum=2 --form --columns=3 --align-buttons --homogeneous-row --homogeneous-column \
--field=" $(eval_gettext "Base settings")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(eval_gettext "Edit database file for") ${PORTWINE_DB}":"FBTN" '@bash -c "button_click_start 118"' \
--field=" vkBasalt"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(eval_gettext "Enable vkBasalt by default to improve graphics in games running on Vulkan. (The HOME hotkey disables vkbasalt)")":"FBTN" '@bash -c "button_click_start 120"' \
--field=" MangoHud"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(eval_gettext "Enable Mangohud by default (R_SHIFT + F12 keyboard shortcuts disable Mangohud)")":"FBTN" '@bash -c "button_click_start 122"' \
......@@ -471,14 +473,15 @@ if [[ -f "${portwine_exe}" ]] ; then
pw_yad_form_vulkan
elif [[ "${PW_GUI_START}" = PANED ]] ; then
"${pw_yad}" --plug=$KEY_START --tabnum=1 --form --separator=";" \
"${pw_yad}" --plug=$KEY_START --tabnum=1 --form --separator=";" --gui-type=start-old \
--image="${PW_ICON_FOR_YAD}" --text-align="center" --text "$PW_COMMENT_DB" \
--field=" 3D API : :CB" "${PW_DEFAULT_VULKAN_USE}" \
--field=" WINE : :CB" "${PW_DEFAULT_WINE_USE}" \
--field=" PREFIX : :CBE" "${PW_ADD_PREFIXES_TO_GUI}" \
1> "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" 2>/dev/null &
"${pw_yad}" --plug=$KEY_START --tabnum=2 --form --columns=2 --align-buttons --homogeneous-row --homogeneous-column \
"${pw_yad}" --plug=$KEY_START --tabnum=2 --form --columns=3 \
--align-buttons --homogeneous-row --homogeneous-column \
--field=" $(eval_gettext "Base settings")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(eval_gettext "Edit database file for") ${PORTWINE_DB}":"FBTN" '@bash -c "button_click_start 118"' \
--field=" vkBasalt"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(eval_gettext "Enable vkBasalt by default to improve graphics in games running on Vulkan. (The HOME hotkey disables vkbasalt)")":"FBTN" '@bash -c "button_click_start 120"' \
--field=" MangoHud"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(eval_gettext "Enable Mangohud by default (R_SHIFT + F12 keyboard shortcuts disable Mangohud)")":"FBTN" '@bash -c "button_click_start 122"' \
......@@ -486,8 +489,8 @@ if [[ -f "${portwine_exe}" ]] ; then
--field=" GameScope"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(eval_gettext "Enable GameScope by default (Wayland micro compositor)")":"FBTN" '@bash -c "button_click_start 126"' \
2>/dev/null &
"${pw_yad}" --key=$KEY_START --paned --center \
--width="${PW_START_SIZE_W}" --height="${PW_START_SIZE_H}" --tab-pos="${PW_TAB_POSITON}" \
"${pw_yad}" --key=$KEY_START --paned --center --fixed \
--width="${PW_START_SIZE_W}" --tab-pos="${PW_TAB_POSITON}" \
--title "PortProton-${install_ver} (${scripts_install_ver})" --buttons-layout=expand \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" \
--button="${PW_SHORTCUT}" \
......
......@@ -37,7 +37,6 @@ export PW_GPU_USE="disabled"
export PW_LOCALE_SELECT="disabled"
export PW_USE_GAMESCOPE="0"
export PW_DINPUT_PROTOCOL="0"
export PW_YAD_BIN="yad_v13_0_4"
###GTK_CONFIG###
# export GTK_DATA_PREFIX=
# export GTK_THEME="Adwaita:dark"
......
......@@ -6,3 +6,7 @@ box>box>grid>switch>slider {min-height: 0px; min-width: 22px}
scale>contents>trough>slider {min-height: 24px; min-width: 24px}
box>box>grid>label {margin: 0px 10px 0px 0px}
separator {margin-bottom:0px; background-size:0px}
window>box>box>image {margin: 5px 5px 0px 5px}
check {padding: 3px}
box>grid>entry {margin: 0px 10px 0px 0px}
checkbutton {margin: 0px 10px 0px 0px}
......@@ -6,3 +6,7 @@ box>box>grid>switch>slider {min-height: 0px; min-width: 22px}
scale>contents>trough>slider {min-height: 24px; min-width: 24px}
box>box>grid>label {margin: 0px 10px 0px 0px}
separator {margin-bottom:0px; background-size:0px}
window>box>box>image {margin: 5px 5px 0px 5px}
check {padding: 3px}
box>grid>entry {margin: 0px 10px 0px 0px}
checkbutton {margin: 0px 10px 0px 0px}
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