expanding integration with PPQT (alpha)

This commit is contained in:
Mikhail Tergoev
2025-07-04 11:38:06 +03:00
parent c991b865d5
commit 295179debc
3 changed files with 38 additions and 19 deletions

View File

@ -2,21 +2,29 @@
# Author: Castro-Fidel (linux-gaming.ru) # Author: Castro-Fidel (linux-gaming.ru)
# shellcheck disable=SC2034 # shellcheck disable=SC2034
######################################################################## ########################################################################
$PW_DEBUG $PW_DEBUG
print_error () { printf "\E[31m%s Error: $@ %s\e[0m\n" ;}
process_log () {
if [[ $PROCESS_LOG == "1" ]] ; then
local filter_word="mono|gecko"
echo "$@" | sed -r "/$filter_word/Id" >> "$PW_TMPFS_PATH/process.log"
fi
}
export -f process_log
print_error () { printf "\E[31m%s Error: $@ %s\e[0m\n" ; process_log "$@" ;}
export -f print_error export -f print_error
print_warning () { printf "\E[33m%s Warning: $@ %s\e[0m\n" ;} print_warning () { printf "\E[33m%s Warning: $@ %s\e[0m\n" ; process_log "$@" ;}
export -f print_warning export -f print_warning
print_info () { printf "\E[36m%s Info: $@ %s\e[0m\n" ;} print_info () { printf "\E[36m%s Info: $@ %s\e[0m\n" ; process_log "$@" ;}
export -f print_info export -f print_info
print_ok () { printf "\E[35m%s OK: $@ %s\e[0m\n" ;} print_ok () { printf "\E[35m%s OK: $@ %s\e[0m\n" ; process_log "$@" ;}
export -f print_ok export -f print_ok
print_var () { for vp in $@ ; do print_info "${vp}=${!vp}" ; done ;} print_var () { for vp in $@ ; do echo "${vp}=${!vp}" ; done ;}
export -f print_var export -f print_var
print_wrapped () { print_wrapped () {
@ -620,6 +628,10 @@ try_download () {
if [[ "$silent" == "true" ]] ; then if [[ "$silent" == "true" ]] ; then
curl -f -# -A 'Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)' -H 'Cache-Control: no-cache, no-store' \ curl -f -# -A 'Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)' -H 'Cache-Control: no-cache, no-store' \
-H 'Pragma: no-cache' -L "${FIRST_URL[@]}" -o "$dest" 2>&1 -H 'Pragma: no-cache' -L "${FIRST_URL[@]}" -o "$dest" 2>&1
elif [[ $PROCESS_LOG == "1" ]] ; then
curl -f -# -A 'Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)' -H 'Cache-Control: no-cache, no-store' \
-H 'Pragma: no-cache' -L "${FIRST_URL[@]}" -o "$dest" 2>&1 \
| tr '\r' '\n' | sed -ur 's|[# ]+||g;s|100||g;s|0-||g;s|.*=.*||g' >> "$PW_TMPFS_PATH/process.log"
else else
curl -f -# -A 'Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)' -H 'Cache-Control: no-cache, no-store' \ curl -f -# -A 'Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)' -H 'Cache-Control: no-cache, no-store' \
-H 'Pragma: no-cache' -L "${FIRST_URL[@]}" -o "$dest" 2>&1 | \ -H 'Pragma: no-cache' -L "${FIRST_URL[@]}" -o "$dest" 2>&1 | \
@ -861,7 +873,7 @@ background_pid () {
arg2=$2 # Название команды arg2=$2 # Название команды
arg3=$3 # Номер процесса (1,2,3..) arg3=$3 # Номер процесса (1,2,3..)
if [[ "$START_FROM_STEAM" == 1 ]] \ if check_start_from_steam \
|| [[ "$PW_GUI_DISABLED_CS" == 1 ]] \ || [[ "$PW_GUI_DISABLED_CS" == 1 ]] \
|| [[ -n "$PW_DEBUG" ]] ; then || [[ -n "$PW_DEBUG" ]] ; then
case $arg1 in case $arg1 in
@ -4437,9 +4449,15 @@ pw_run () {
PW_LOG_TO_FILE="${PORT_WINE_PATH}/PortProton.log" PW_LOG_TO_FILE="${PORT_WINE_PATH}/PortProton.log"
PW_LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" PW_LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}"
print_var "WINEDIR" "WINEPREFIX" "WINEDLLOVERRIDES" "PATH_TO_GAME" "PW_WINE_USE" "PW_VULKAN_USE" "VULKAN_DRIVER_NAME"
print_var "WINELOADER" "VKD3D_CONFIG" "PW_LD_LIBRARY_PATH" "PATH" "WINEESYNC" "WINEFSYNC" "WINEFSYNC_FUTEX2" echo "##### Current variables #####" > "$PW_TMPFS_PATH/var.log"
print_var "WINEDLLPATH" "WINE_CPU_TOPOLOGY" "PW_RUN_GAMESCOPE" "LD_LIBRARY_PATH" "PW_VK_ICD_FILENAMES" "PW_TASKSET_SLR" for var in "WINEDIR" "WINEPREFIX" "WINEDLLOVERRIDES" "PATH_TO_GAME" "PW_WINE_USE" "PW_VULKAN_USE" "VULKAN_DRIVER_NAME" \
"WINELOADER" "VKD3D_CONFIG" "PW_LD_LIBRARY_PATH" "PATH" "WINEESYNC" "WINEFSYNC" "WINEFSYNC_FUTEX2" \
"WINEDLLPATH" "WINE_CPU_TOPOLOGY" "PW_RUN_GAMESCOPE" "LD_LIBRARY_PATH" "PW_VK_ICD_FILENAMES" "PW_TASKSET_SLR"
do
print_var "$var" | tee -a "$PW_TMPFS_PATH/var.log"
done
proxy_launch_parameters=${LAUNCH_PARAMETERS//\\\\/\\} proxy_launch_parameters=${LAUNCH_PARAMETERS//\\\\/\\}
if [[ "$PW_USE_RUNTIME" == 1 ]] \ if [[ "$PW_USE_RUNTIME" == 1 ]] \
&& [[ "$PW_WINE_USE" != "USE_SYSTEM_WINE" ]] && [[ "$PW_WINE_USE" != "USE_SYSTEM_WINE" ]]

View File

@ -315,18 +315,19 @@ fi
if ! check_flatpak ; then if ! check_flatpak ; then
if [[ -f "${PW_TMPFS_PATH}/portproton.lock" ]] ; then if [[ -f "${PW_TMPFS_PATH}/portproton.lock" ]] ; then
print_warning "Found lock file: ${PW_TMPFS_PATH}/portproton.lock" print_warning "Found lock file: ${PW_TMPFS_PATH}/portproton.lock"
if [[ $START_FROM_STEAM != "1" ]] if ! check_start_from_steam
then yad_question "${translations[A running PortProton session was detected.\\nDo you want to end the previous session?]}" || exit 0 then yad_question "${translations[A running PortProton session was detected.\\nDo you want to end the previous session?]}" || exit 0
fi fi
fi fi
touch "${PW_TMPFS_PATH}/portproton.lock" touch "${PW_TMPFS_PATH}/portproton.lock"
rm_lock_file () {
echo "Removing the lock file..."
rm -fv "${PW_TMPFS_PATH}/portproton.lock" && echo "OK"
}
trap "rm_lock_file" EXIT
fi fi
rm_log_lock () {
rm -fv "${PW_TMPFS_PATH}"/*.log
rm -fv "${PW_TMPFS_PATH}/portproton.lock"
}
trap "rm_log_lock" EXIT
if check_flatpak ; then if check_flatpak ; then
try_remove_dir "${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}" try_remove_dir "${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}"
else pw_download_libs else pw_download_libs
@ -413,13 +414,13 @@ EOF
while read -r line while read -r line
do do
export portwine_exe="$PORT_WINE_PATH/data/prefixes/$PW_PREFIX_NAME/$line" export portwine_exe="$PORT_WINE_PATH/data/prefixes/$PW_PREFIX_NAME/$line"
if [[ $START_FROM_STEAM == "1" ]] if check_start_from_steam
then portwine_output_yad_shortcut --silent then portwine_output_yad_shortcut --silent
else portwine_create_shortcut else portwine_create_shortcut
fi fi
done < "$PORT_WINE_PATH/data/prefixes/$PW_PREFIX_NAME/.create_shortcut" done < "$PORT_WINE_PATH/data/prefixes/$PW_PREFIX_NAME/.create_shortcut"
fi fi
if [[ $START_FROM_STEAM != "1" ]] if ! check_start_from_steam
then yad_info "${translations[Unpack is DONE for prefix:]} <b>\"${PW_PREFIX_NAME}\"</b>." then yad_info "${translations[Unpack is DONE for prefix:]} <b>\"${PW_PREFIX_NAME}\"</b>."
fi fi
exit 0 exit 0

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#Author: Castro-Fidel (linux-gaming.ru) #Author: Castro-Fidel (linux-gaming.ru)
#SCRIPTS_NEXT_VERSION=2425 #SCRIPTS_NEXT_VERSION=2426
#SCRIPTS_STABLE_VERSION=2425 #SCRIPTS_STABLE_VERSION=2425
######################################################################## ########################################################################
export AI_TOP_GAMES="PW_LGC PW_VKPLAY PW_EPIC PW_BATTLE_NET PW_WORLD_OF_SEA_BATTLE PW_RUSSIAN_FISHING PW_HO_YO_PLAY PW_FARLIGHT84 PW_WARFRAME PW_WGC PW_UBISOFT" export AI_TOP_GAMES="PW_LGC PW_VKPLAY PW_EPIC PW_BATTLE_NET PW_WORLD_OF_SEA_BATTLE PW_RUSSIAN_FISHING PW_HO_YO_PLAY PW_FARLIGHT84 PW_WARFRAME PW_WGC PW_UBISOFT"