Skip to content

Commit

Permalink
boost restart PP and update covers
Browse files Browse the repository at this point in the history
  • Loading branch information
Castro-Fidel committed Feb 11, 2024
1 parent f7803d8 commit 2668d0e
Show file tree
Hide file tree
Showing 15 changed files with 129 additions and 94 deletions.
2 changes: 2 additions & 0 deletions data_from_portwine/changelog_rus
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
-----------------------------------------
История изменений:

* добавлен приоритет использования системного gamemode если он установлен (спасибо Boria138)

###Scripts version 2253### Дата: 10.02.2024 / Размер скачиваемого обновления: 8 мегабайт
* небольшие улучшения для SteamOS

Expand Down
Binary file added data_from_portwine/img/gui/covers/loading_ENG.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data_from_portwine/img/gui/covers/loading_RUS.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data_from_portwine/img/gui/covers/lol_cover.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 19 additions & 7 deletions data_from_portwine/scripts/functions_helper
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ var_vk_istance_layers_config_update () {
return 0
}

var_ld_library_path_update() {
var_ld_library_path_update () {
if [ ! -z "$LD_LIBRARY_PATH" ]
then export LD_LIBRARY_PATH="$1:$LD_LIBRARY_PATH"
else export LD_LIBRARY_PATH="$1"
Expand All @@ -245,10 +245,17 @@ pw_notify_send () {
fi
}

check_start_from_steam () {
if [[ "${START_FROM_STEAM}" == 1 ]]
then return 0
else return 1
fi
}

unpack_tar_zst () {
set -o pipefail
unset PW_ZSTD_PORT
pw_start_progress_bar_cover_block "${PW_GUI_ICON_PATH}/covers/pw_loading_cover.gif"
pw_start_progress_bar_cover_block "${PW_GUI_ICON_PATH}/covers/unpacking_${update_loc}.gif"
if [[ `command -v zstd` ]] &>/dev/null ; then
tar -I zstd -xhvf "$1" -C "$2"
pw_stop_progress_bar_cover_block
Expand All @@ -265,7 +272,7 @@ unpack_tar_xz () {
tar -Jxhvf "$1" -C "$2" && return 0 || return 1
else
set -o pipefail
pw_start_progress_bar_cover_block "${PW_GUI_ICON_PATH}/covers/pw_loading_cover.gif"
pw_start_progress_bar_cover_block "${PW_GUI_ICON_PATH}/covers/unpacking_${update_loc}.gif"
tar -Jxhvf "$1" -C "$2"
pw_stop_progress_bar_cover_block
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
Expand All @@ -274,15 +281,15 @@ unpack_tar_xz () {

unpack_tar_gz () {
set -o pipefail
pw_start_progress_bar_cover_block "${PW_GUI_ICON_PATH}/covers/pw_loading_cover.gif"
pw_start_progress_bar_cover_block "${PW_GUI_ICON_PATH}/covers/unpacking_${update_loc}.gif"
tar -xhzvf "$1" -C "$2"
pw_stop_progress_bar_cover_block
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
}

unpack_tar () {
set -o pipefail
pw_start_progress_bar_cover_block "${PW_GUI_ICON_PATH}/covers/pw_loading_cover.gif"
pw_start_progress_bar_cover_block "${PW_GUI_ICON_PATH}/covers/unpacking_${update_loc}.gif"
tar -xhvf "$1" -C "$2"
pw_stop_progress_bar_cover_block
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File $1 unpacking error." && return 1 || return 0
Expand Down Expand Up @@ -347,6 +354,7 @@ pw_reinstall_pp () {
try_remove_file "${PORT_WINE_TMP_PATH}/scripts_ver"
echo
print_info "Restarting PP for reinstall files..."
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
}
Expand Down Expand Up @@ -429,7 +437,7 @@ init_wine_ver () {
if check_symlink "${WINEDIR}/share/wine/${mono_gecko_chk}" ; then
print_info "${WINEDIR}/share/wine/${mono_gecko_chk} is symlink. OK."
elif [[ -d "${WINEDIR}/share/wine/${mono_gecko_chk}" ]] ; then
pw_start_progress_bar_cover_block "${PW_GUI_ICON_PATH}/covers/pw_loading_cover.gif"
pw_start_progress_bar_cover_block "${PW_GUI_ICON_PATH}/covers/loading_${update_loc}.gif"
try_copy_dir "${WINEDIR}/share/wine/${mono_gecko_chk}" "${PORT_WINE_TMP_PATH}"
try_remove_dir "${WINEDIR}/share/wine/${mono_gecko_chk}"
try_force_link_dir "${PORT_WINE_TMP_PATH}/${mono_gecko_chk}" "${WINEDIR}"/share/wine/
Expand Down Expand Up @@ -1056,7 +1064,9 @@ pw_port_update () {
try_remove_file "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
try_remove_dir "${PORT_WINE_TMP_PATH}/PortWINE-master/"
echo "${scripts_current_ver}" > "${PORT_WINE_TMP_PATH}/scripts_ver"
[ "$?" == 0 ] && echo "Restarting PP after update..." && /usr/bin/env bash -c ${pw_full_command_line[*]} &
echo "Restarting PP after update..."
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
fi
else
Expand Down Expand Up @@ -1193,6 +1203,7 @@ pw_find_exe () {
print_var YAD_STATUS
if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" ]] ; then
if [[ -z "${PW_SET_FIND_EXE}" ]] ; then
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c ${pw_full_command_line[*]} &
print_info "Restarting..."
fi
Expand All @@ -1203,6 +1214,7 @@ pw_find_exe () {
if [[ ! -z "${PW_SET_FIND_EXE}" ]] ; then
portwine_exe="${PW_PATH_FOR_FIND}$(echo "${PW_SET_FIND_EXE}" | awk -F'|' '{print $1}')"
portwine_create_shortcut silent
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
fi
Expand Down
72 changes: 32 additions & 40 deletions data_from_portwine/scripts/runlib
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ start_portwine () {
fi
else
export GAMEMODERUN=0
export PW_GAMEMODERUN_SLR=""
print_info "Gamemod is not installed or disabled in vars script or db file: PW_USE_GAMEMODE=$PW_USE_GAMEMODE"
fi
pw_other_fixes
Expand Down Expand Up @@ -696,10 +697,12 @@ start_portwine () {
[[ -z "${LAUNCH_PARAMETERS}" ]] && export LAUNCH_PARAMETERS+=" -eac-nop-loaded "
fi
pw_stop_progress_bar &&
[[ "${START_FROM_STEAM}" != 1 ]] && pw_tray_icon
sleep 0.5
if [[ "${PW_CHECK_AUTOINSTAL}" != "1" ]] ; then
pw_start_progress_bar_cover "${PW_GUI_ICON_PATH}/covers/pw_loading_cover.gif"
if ! check_start_from_steam ; then
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"
fi
fi
add_in_start_portwine

Expand Down Expand Up @@ -731,28 +734,16 @@ pw_run () {
echo "Log WINE:" >> "${PW_LOG_TO_FILE}"
echo ""
print_debug "Log from RUNTIME and WINE:"
if [[ ! -z "$PW_GAMEMODERUN_SLR" ]] ; then
${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}" \
VK_INSTANCE_LAYERS=${PW_VK_INSTANCE_LAYERS} \
${PW_GAMEMODERUN_SLR} \
${PW_MANGOHUD_SLR} \
"${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
else
${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}" \
VK_INSTANCE_LAYERS=${PW_VK_INSTANCE_LAYERS} \
${PW_MANGOHUD_SLR} \
"${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
fi
${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}" \
VK_INSTANCE_LAYERS=${PW_VK_INSTANCE_LAYERS} \
${PW_GAMEMODERUN_SLR} \
${PW_MANGOHUD_SLR} \
"${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
else
if [[ "${PW_USE_TERMINAL}" == "1" ]] ; then
export PW_ADD_TO_ARGS_IN_RUNTIME="--xterm"
Expand All @@ -761,19 +752,17 @@ pw_run () {
echo ""
echo "Log WINE:" > "${PW_LOG_TO_FILE}"
print_debug "Log from RUNTIME and WINE:"
if [[ ! -z "$PW_GAMEMODERUN_SLR" ]] ; then
${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}" \
VK_INSTANCE_LAYERS="${PW_VK_INSTANCE_LAYERS}" \
${PW_GAMEMODERUN_SLR} \
${PW_MANGOHUD_SLR} \
"${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
cat "${PW_LOG_TO_FILE}"
fi
${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}" \
VK_INSTANCE_LAYERS="${PW_VK_INSTANCE_LAYERS}" \
${PW_GAMEMODERUN_SLR} \
${PW_MANGOHUD_SLR} \
"${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
cat "${PW_LOG_TO_FILE}"
fi
}
export -f pw_run
Expand Down Expand Up @@ -883,7 +872,10 @@ check_user_conf

if [[ -z "${INSTALLING_PORT}" ]] ; then
. "${USER_CONF}"
pw_port_update
if ! check_start_from_steam && [[ "${SKIP_CHECK_UPDATES}" != 1 ]]; then
pw_port_update
fi
unset SKIP_CHECK_UPDATES
pw_check_and_download_plugins
pw_download_libs
export PW_VULKANINFO_PORTABLE="$PW_WINELIB/pressure-vessel/libexec/steam-runtime-tools-0/x86_64-linux-gnu-vulkaninfo"
Expand Down
1 change: 1 addition & 0 deletions data_from_portwine/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ if [ "${PW_SILENT_INSTALL}" = "1" ] ; then
try_remove_file "${HOME}/.local/share/applications/PortProton.desktop"
fi
echo "Restarting PP after installing..."
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c "${PORT_WINE_PATH}/data/scripts/start.sh" $@ &
exit 0
else
Expand Down
7 changes: 7 additions & 0 deletions data_from_portwine/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ killall -15 yad_v12_3 2>/dev/null
kill -TERM `pgrep -a yad | grep ${portname} | head -n 1 | awk '{print $1}'` 2>/dev/null

if [[ -f "/usr/bin/portproton" ]] && [[ -f "${HOME}/.local/share/applications/PortProton.desktop" ]] ; then
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash "/usr/bin/portproton" "$@" &
exit 0
fi
Expand Down Expand Up @@ -490,6 +491,7 @@ pw_edit_db () {
fi
if [[ "$?" == 0 ]] ; then
print_info "Restarting PP after update ppdb file..."
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
fi
Expand Down Expand Up @@ -675,6 +677,7 @@ else

print_info "Restarting PP after choose desktop file..."
# stop_portwine
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c "${PW_EXEC_FROM_DESKTOP}" &
exit 0
}
Expand All @@ -684,6 +687,7 @@ else
if gui_question "${port_clear_pfx}" ; then
pw_clear_pfx
print_info "Restarting PP after clearing prefix..."
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
fi
Expand All @@ -705,13 +709,15 @@ else
gui_pw_update () {
try_remove_file "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
print_info "Restarting PP for check update..."
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
}

change_loc () {
try_remove_file "${PORT_WINE_TMP_PATH}/${portname}_loc"
print_info "Restarting PP for change language..."
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
}
Expand All @@ -736,6 +742,7 @@ else
unpack_tar_gz "$PW_SCRIPT_FROM_BACKUP" "${PORT_WINE_PATH}/data/"
echo "0" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
print_info "Restarting PP after backup..."
export SKIP_CHECK_UPDATES=1
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
}
Expand Down
Loading

0 comments on commit 2668d0e

Please sign in to comment.