Compare commits

...

12 Commits

Author SHA1 Message Date
Mikhail Tergoev
4e960fe086 Scripts version 2407 2025-04-07 21:30:43 +03:00
Mikhail Tergoev
64b6d70e8b Merge branch 'alex2844-findLocalSteamAppId' into devel 2025-04-07 21:18:59 +03:00
Mikhail Tergoev
f20d73b84a Merge branch 'findLocalSteamAppId' of github.com:alex2844/PortWINE into alex2844-findLocalSteamAppId 2025-04-07 21:18:51 +03:00
Mikhail Tergoev
f302b594d6 Merge branch 'Boria138-dash' into devel 2025-04-07 21:17:58 +03:00
Mikhail Tergoev
cfed884fab Merge branch 'dash' of github.com:Boria138/PortWINE into Boria138-dash 2025-04-07 21:17:49 +03:00
Mikhail Tergoev
7d9a134714 Merge branch 'Htylol-drop_eval_translations' into devel 2025-04-07 21:15:47 +03:00
Mikhail Tergoev
ebc76216e8 Merge branch 'drop_eval_translations' of github.com:Htylol/PortWINE into Htylol-drop_eval_translations 2025-04-07 21:15:36 +03:00
Mikhail Tergoev
4322fb838a updated PROTON_LG, DXVK and VKD3D 2025-04-07 21:14:06 +03:00
Htylol
280c548149 Dropped eval_translations, repair gamescope settings 2025-04-07 19:53:03 +05:00
Boris Yumankulov
798a18973f
Use yad tray if using dash shell 2025-04-07 12:43:30 +05:00
Alex Smith
bf9cfadb9b index 2025-03-31 02:23:02 +05:00
Alex Smith
b58d7d8b6a find local SteamAppId 2025-03-31 02:12:06 +05:00
8 changed files with 138 additions and 113 deletions

@ -2,6 +2,15 @@ You can help us in the development of the project on the website: https://linux-
---------------------------------------- ----------------------------------------
Changelog: Changelog:
###Scripts version 2407### / Date: 07.04.2025 / Download update size: 250 megabytes
* PROTON_LG updated to version "9-27"
* updated versions:
- DXVK_GIT "2.6-65" (together with dxvk-nvapi)
- VKD3D_GIT "1.1-4511" (together with vkd3d-shader)
* STEAM_APP_ID from ppdb is used to determine SteamAppId, if it is missing, then steam_appid (and similar) is searched for in the game directory (thanks to alex2844)
* interface translation functions are improved (thanks to Htylol)
* tray operation is fixed for systems using "dash" (thanks to Boria138)
###Scripts version 2406### / stable / Date: 22.03.2025 / Download update size: 4 megabytes ###Scripts version 2406### / stable / Date: 22.03.2025 / Download update size: 4 megabytes
* cumulative update to the stable version of PortProton scripts * cumulative update to the stable version of PortProton scripts

@ -2,6 +2,15 @@
----------------------------------------- -----------------------------------------
История изменений: История изменений:
###Scripts version 2407### / Дата: 07.04.2025 / Размер скачиваемого обновления: 250 мегабайт
* обновлен PROTON_LG до версии "9-27"
* обновлены версии:
- DXVK_GIT "2.6-65" (совместно с dxvk-nvapi)
- VKD3D_GIT "1.1-4511" (совместно vkd3d-shader)
* для определения SteamAppId используется STEAM_APP_ID из ppdb, если отсутствует - то ищется steam_appid (и подобные) в директории с игрой (спасибо alex2844)
* улучшены функции перевода интерфейса (спасибо Htylol)
* исправлена работа трея для систем использующих "dash" (спасибо Boria138)
###Scripts version 2406### / stable / Дата: 22.03.2025 / Размер скачиваемого обновления: 4 мегабайта ###Scripts version 2406### / stable / Дата: 22.03.2025 / Размер скачиваемого обновления: 4 мегабайта
* кумулятивное обновление стабильной версии скриптов PortProton * кумулятивное обновление стабильной версии скриптов PortProton
@ -20,8 +29,8 @@
###Scripts version 2402### / Дата: 13.03.2025 / Размер скачиваемого обновления: 15 мегабайт ###Scripts version 2402### / Дата: 13.03.2025 / Размер скачиваемого обновления: 15 мегабайт
* исправление меню глобальных настроек (user.conf) (спасибо Htylol) * исправление меню глобальных настроек (user.conf) (спасибо Htylol)
* обновлены версии: * обновлены версии:
* DXVK_GIT "2.5.3-299" (совместно с dxvk-nvapi) - DXVK_GIT "2.5.3-299" (совместно с dxvk-nvapi)
* VKD3D_GIT "1.1-4478" (совместно vkd3d-shader) - VKD3D_GIT "1.1-4478" (совместно vkd3d-shader)
###Scripts version 2401### / Дата: 07.03.2025 / Размер скачиваемого обновления: 4 мегабайта ###Scripts version 2401### / Дата: 07.03.2025 / Размер скачиваемого обновления: 4 мегабайта
* HOTFIX: переключения веток DEVEL - STABLE от Htylol * HOTFIX: переключения веток DEVEL - STABLE от Htylol

@ -7,7 +7,7 @@
msgid "" msgid ""
msgstr "Project-Id-Version: PACKAGE VERSION\n" msgstr "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-20 21:49+0300\n" "POT-Creation-Date: 2025-04-07 19:38+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -1300,6 +1300,13 @@ msgstr ""
msgid "Change settings gamescope for" msgid "Change settings gamescope for"
msgstr "" msgstr ""
msgid "Gamescope is not detected on the system, to install it, run the "
"command in the terminal"
msgstr ""
msgid "Can be selected and copied"
msgstr ""
msgid "<b>Gamescope is not detected on the system, please contact the " msgid "<b>Gamescope is not detected on the system, please contact the "
"manufacturer of your distribution\\nor search the Internet for " "manufacturer of your distribution\\nor search the Internet for "
"information on how to install gamescope on your system.</b>" "information on how to install gamescope on your system.</b>"

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-20 21:49+0300\n" "POT-Creation-Date: 2025-04-07 19:32+0500\n"
"PO-Revision-Date: 2024-11-13 08:18+0500\n" "PO-Revision-Date: 2025-04-07 19:35+0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: es_ES\n" "Language: es_ES\n"
@ -1689,6 +1689,16 @@ msgstr ""
msgid "Change settings gamescope for" msgid "Change settings gamescope for"
msgstr "Cambiar ajustes gamescope para" msgstr "Cambiar ajustes gamescope para"
msgid ""
"Gamescope is not detected on the system, to install it, run the command in "
"the terminal"
msgstr ""
"Gamescope no se detecta en el sistema, para instalarlo, ejecute el comando "
"en el terminal"
msgid "Can be selected and copied"
msgstr "Se puede seleccionar y copiar"
msgid "" msgid ""
"<b>Gamescope is not detected on the system, please contact the manufacturer " "<b>Gamescope is not detected on the system, please contact the manufacturer "
"of your distribution\\nor search the Internet for information on how to " "of your distribution\\nor search the Internet for information on how to "
@ -2183,8 +2193,8 @@ msgstr "BIBLIOTECAS DE TERCEROS"
#~ msgid "" #~ msgid ""
#~ "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?" #~ "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?"
#~ msgstr "" #~ msgstr ""
#~ "Para agregar el acceso directo a STEAM, es necesario reiniciar.\\n" #~ "Para agregar el acceso directo a STEAM, es necesario reiniciar."
#~ "\\¿Quieres reiniciar STEAM ahora?" #~ "\\n\\¿Quieres reiniciar STEAM ahora?"
#~ msgid "Restarting STEAM... Please wait." #~ msgid "Restarting STEAM... Please wait."
#~ msgstr "Restarting STEAM... Please wait." #~ msgstr "Restarting STEAM... Please wait."
@ -2192,17 +2202,6 @@ msgstr "BIBLIOTECAS DE TERCEROS"
#~ msgid "Please wait. downloading covers for" #~ msgid "Please wait. downloading covers for"
#~ msgstr "Por favor, espera. Descargando portadas para" #~ msgstr "Por favor, espera. Descargando portadas para"
#~ msgid ""
#~ "<b>Gamescope is not detected on the system, to install it, run the "
#~ "command in the terminal:\\nflatpak install -y runtime/org.freedesktop."
#~ "Platform.VulkanLayer.gamescope/x86_64/$%{GAMESCOPE_VERSION}%\\n(Can be "
#~ "selected and copied)</b>"
#~ msgstr ""
#~ "<b>Gamescope no se detecta en el sistema, para instalarlo, ejecute el "
#~ "comando en el terminal:\\n flatpak install -y runtime/org.freedesktop."
#~ "Platform.VulkanLayer.gamescope/x86_64/$%{GAMESCOPE_VERSION}%\\n (Se puede "
#~ "seleccionar y copiar)</b>"
#, sh-format #, sh-format
#~ msgid "" #~ msgid ""
#~ "PortProton v. ${install_ver}\n" #~ "PortProton v. ${install_ver}\n"

@ -7,17 +7,17 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-20 21:49+0300\n" "POT-Creation-Date: 2025-04-07 19:32+0500\n"
"PO-Revision-Date: 2025-03-20 21:50+0300\n" "PO-Revision-Date: 2025-04-07 19:33+0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: ru_RU\n" "Language: ru_RU\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" "n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"X-Generator: Poedit 3.5\n" "X-Generator: Poedit 3.4.4\n"
msgid "" msgid ""
"A running PortProton session was detected.\\nDo you want to end the previous " "A running PortProton session was detected.\\nDo you want to end the previous "
@ -1677,6 +1677,16 @@ msgstr ""
msgid "Change settings gamescope for" msgid "Change settings gamescope for"
msgstr "Изменить настройки Gamescope для" msgstr "Изменить настройки Gamescope для"
msgid ""
"Gamescope is not detected on the system, to install it, run the command in "
"the terminal"
msgstr ""
"Gamescope не найден в системе, для его установки выполните команду в "
"терминале"
msgid "Can be selected and copied"
msgstr "Можно выделить и скопировать"
msgid "" msgid ""
"<b>Gamescope is not detected on the system, please contact the manufacturer " "<b>Gamescope is not detected on the system, please contact the manufacturer "
"of your distribution\\nor search the Internet for information on how to " "of your distribution\\nor search the Internet for information on how to "
@ -2171,17 +2181,6 @@ msgstr "БИБЛИОТЕКИ"
#~ msgid "Please wait. downloading covers for" #~ msgid "Please wait. downloading covers for"
#~ msgstr "Пожалуйста, подождите. Загрузка обложек для" #~ msgstr "Пожалуйста, подождите. Загрузка обложек для"
#~ msgid ""
#~ "<b>Gamescope is not detected on the system, to install it, run the "
#~ "command in the terminal:\\nflatpak install -y runtime/org.freedesktop."
#~ "Platform.VulkanLayer.gamescope/x86_64/$%{GAMESCOPE_VERSION}%\\n(Can be "
#~ "selected and copied)</b>"
#~ msgstr ""
#~ "<b>Gamescope не найден в системе, для его установки выполните команду в "
#~ "терминале:\\nflatpak install -y runtime/org.freedesktop.Platform."
#~ "VulkanLayer.gamescope/x86_64/$%{GAMESCOPE_VERSION}%\\n(Данный текст можно "
#~ "выделить и скопировать)</b>"
#, sh-format #, sh-format
#~ msgid "" #~ msgid ""
#~ "PortProton v. ${install_ver}\n" #~ "PortProton v. ${install_ver}\n"
@ -2353,9 +2352,6 @@ msgstr "БИБЛИОТЕКИ"
#~ msgid "MIT License" #~ msgid "MIT License"
#~ msgstr "Лицензия Массачусетского технологического института (MIT License)" #~ msgstr "Лицензия Массачусетского технологического института (MIT License)"
#~ msgid "(Can be selected and copied)"
#~ msgstr "(можно выделить и скопировать)"
#~ msgid "Copyright" #~ msgid "Copyright"
#~ msgstr "Авторские права" #~ msgstr "Авторские права"

@ -51,13 +51,7 @@ getAppExe() {
getAppTarget() { getAppTarget() {
exe=$(getAppExe "$1") exe=$(getAppExe "$1")
if [[ -n "${exe}" ]]; then [[ -n "${exe}" ]] && parseSteamTargetExe "${exe}"
if [[ "${exe}" =~ .sh$ ]]; then
parseSteamTargetExe "${exe}"
else
echo "${exe}";
fi
fi
} }
getSteamGameId() { getSteamGameId() {
@ -73,28 +67,46 @@ getSteamId() {
local cache_file="${PORT_WINE_TMP_PATH:-/tmp}/steamid_cache.json" local cache_file="${PORT_WINE_TMP_PATH:-/tmp}/steamid_cache.json"
local applist_cache_file="${PORT_WINE_TMP_PATH:-/tmp}/steamapplist_cache.json" local applist_cache_file="${PORT_WINE_TMP_PATH:-/tmp}/steamapplist_cache.json"
[[ -n "${1:-}" ]] && NOSTAPPNAME="$1" [[ -n "${1:-}" ]] && NOSTAPPNAME="$1"
[[ -z "${NOSTAPPNAME}" ]] && return 1
if [[ -z "${SteamIds:-}" ]] && [[ -f "${cache_file}" ]]; then if [[ -z "${SteamIds:-}" ]] && [[ -f "${cache_file}" ]]; then
SteamIds=$(<"${cache_file}") SteamIds=$(<"${cache_file}")
fi fi
if [[ -n "${SteamIds:-}" ]] && jq -e --arg key "${NOSTAPPNAME}" 'has($key)' <<< "${SteamIds}" > /dev/null; then if [[ -n "${1:-}" ]] && [[ -n "${SteamIds:-}" ]] && jq -e --arg key "${NOSTAPPNAME}" 'has($key)' <<< "${SteamIds}" > /dev/null; then
SteamAppId=$(jq -r --arg key "${NOSTAPPNAME}" '.[$key]' <<< "${SteamIds}") SteamAppId=$(jq -r --arg key "${NOSTAPPNAME}" '.[$key]' <<< "${SteamIds}")
else else
if [[ -n "${1:-}" ]] && [[ "${USE_STEAMGRIDDB:-1}" == "1" ]]; then if [[ -n "${2:-}" ]]; then
getSteamGridDBId "${NOSTAPPNAME}" > /dev/null NOSTAPPPATH="$2"
[[ -f "${NOSTAPPPATH}.ppdb" ]] && source "${NOSTAPPPATH}.ppdb"
fi fi
if [[ ${SteamGridDBTypeSteam} == true ]]; then [[ -n "${STEAM_APP_ID:-}" ]] && SteamAppId="${STEAM_APP_ID}"
SRES=$(curl -Ls --connect-timeout 5 -m 10 -e "https://www.steamgriddb.com/game/${SteamGridDBId}" "https://www.steamgriddb.com/api/public/game/${SteamGridDBId}") if [[ -z "${SteamAppId:-}" ]] && [[ -n "${NOSTAPPPATH:-}" ]]; then
if jq -e ".success == true" <<< "${SRES}" > /dev/null 2>&1; then local paths=("steam_appid.txt" "steam_emu.ini" "steam_api.ini" "steam_api64.ini")
SteamAppId="$(jq -r '.data.platforms.steam.id' <<< "${SRES}")" local conditions=$(printf " -o -name %q" "${paths[@]}")
local file=$(find "$(dirname "${NOSTAPPPATH}")" -type f \( ${conditions# -o} \) -print -quit 2>/dev/null)
if [[ -n "${file}" ]]; then
if [[ "${file}" == *"steam_appid.txt" ]]; then
SteamAppId=$(cat "${file}" | tr -d '\r\n')
else
SteamAppId=$(grep -i "^AppId=" "${file}" | cut -d'=' -f2 | head -1 | tr -d '\r\n')
fi
fi fi
elif [[ "${USE_STEAMGRIDDB:-1}" == "0" ]]; then fi
if [[ ! -f "${applist_cache_file}" ]] || [[ $(find "${applist_cache_file}" -mmin +1440) ]]; then if [[ -z "${SteamAppId:-}" ]]; then
applist_data=$(curl -s --connect-timeout 5 "https://api.steampowered.com/ISteamApps/GetAppList/v2/") [[ "${USE_STEAMGRIDDB:-1}" == "1" ]] && getSteamGridDBId "${NOSTAPPNAME}" > /dev/null
[[ -n "${applist_data}" ]] && echo "${applist_data}" > "${applist_cache_file}" if [[ ${SteamGridDBTypeSteam} == true ]]; then
else SRES=$(curl -Ls --connect-timeout 5 -m 10 -e "https://www.steamgriddb.com/game/${SteamGridDBId}" "https://www.steamgriddb.com/api/public/game/${SteamGridDBId}")
applist_data=$(<"${applist_cache_file}") if jq -e ".success == true" <<< "${SRES}" > /dev/null 2>&1; then
SteamAppId="$(jq -r '.data.platforms.steam.id' <<< "${SRES}")"
fi
elif [[ "${USE_STEAMGRIDDB:-1}" == "0" ]]; then
if [[ ! -f "${applist_cache_file}" ]] || [[ $(find "${applist_cache_file}" -mmin +1440) ]]; then
applist_data=$(curl -s --connect-timeout 5 "https://api.steampowered.com/ISteamApps/GetAppList/v2/")
[[ -n "${applist_data}" ]] && echo "${applist_data}" > "${applist_cache_file}"
else
applist_data=$(<"${applist_cache_file}")
fi
[[ -n "${applist_data}" ]] && SteamAppId=$(jq --arg name "${NOSTAPPNAME,,}" '.applist.apps[] | select(.name == $name) | .appid' <<< "${applist_data,,}")
fi fi
[[ -n "${applist_data}" ]] && SteamAppId=$(jq --arg name "${NOSTAPPNAME,,}" '.applist.apps[] | select(.name == $name) | .appid' <<< "${applist_data,,}")
fi fi
SteamIds=$(jq --arg key "${NOSTAPPNAME}" --arg value "${SteamAppId:-}" '. + {($key): $value}' <<< "${SteamIds:-$(jq -n '{}')}") SteamIds=$(jq --arg key "${NOSTAPPNAME}" --arg value "${SteamAppId:-}" '. + {($key): $value}' <<< "${SteamIds:-$(jq -n '{}')}")
echo "${SteamIds}" > "${cache_file}" echo "${SteamIds}" > "${cache_file}"
@ -178,11 +190,7 @@ getUserPath() {
} }
getSteamPath() { getSteamPath() {
local paths=( local paths=("${HOME}/.steam/steam" "${HOME}/.local/share/Steam" "${HOME}/.var/app/com.valvesoftware.Steam/.steam/steam")
"${HOME}/.steam/steam"
"${HOME}/.local/share/Steam"
"${HOME}/.var/app/com.valvesoftware.Steam/.steam/steam"
)
for path in "${paths[@]}"; do for path in "${paths[@]}"; do
if [[ -d "${path}" ]]; then if [[ -d "${path}" ]]; then
STEAM_BASE_FOLDER="${path}" STEAM_BASE_FOLDER="${path}"
@ -237,7 +245,8 @@ listSteamGames() {
appid="${name}" appid="${name}"
name=$(basename "${exe}" .sh) name=$(basename "${exe}" .sh)
else else
appid="$(getSteamId "${name}")" path="$(parseSteamTargetExe "${exe}")"
appid="$(getSteamId "${name}" "${path}")"
[[ -z "${appid}" ]] && appid="0" [[ -z "${appid}" ]] && appid="0"
fi fi
gid="$(getSteamGameId $id)" gid="$(getSteamGameId $id)"
@ -302,7 +311,9 @@ parseSteamShortcutEntryLaunchOptions() {
} }
parseSteamTargetExe() { parseSteamTargetExe() {
grep -E '^[^# ]*?(flatpak|start\.sh)' "$1" | head -n 1 | sed 's/ "\$@"//' | awk -F'"' '{print $(NF-1)}' if [[ "$1" =~ .sh$ ]]; then
grep -E '^[^# ]*?(flatpak|start\.sh)' "$1" | head -n 1 | sed 's/ "\$@"//' | awk -F'"' '{print $(NF-1)}'
fi
} }
restartSteam() { restartSteam() {
@ -333,9 +344,6 @@ downloadImage() {
} }
downloadImageSteam() { downloadImageSteam() {
if [[ -z "${SteamAppId}" ]]; then
getSteamId > /dev/null
fi
if [[ -n "${SteamAppId}" ]]; then if [[ -n "${SteamAppId}" ]]; then
downloadImage "https://cdn.cloudflare.steamstatic.com/steam/apps/${SteamAppId}/$1" "$2" downloadImage "https://cdn.cloudflare.steamstatic.com/steam/apps/${SteamAppId}/$1" "$2"
else else
@ -363,16 +371,22 @@ downloadImageSteamGridDB() {
} }
addGrids() { addGrids() {
[[ -z "${SteamGridDBId}" ]] && getSteamGridDBId "${name_desktop}" > /dev/null local AppId="${NOSTAPPID:-0}"
if [[ -z "${SteamAppId}" ]] && [[ "${USE_STEAMGRIDDB:-1}" == "0" ]]; then local in=("header.jpg" "library_600x900_2x.jpg" "library_hero.jpg" "logo.png")
local out=("${AppId}.jpg" "${AppId}"p".jpg" "${AppId}"_hero".jpg" "${AppId}"_logo".png")
local gtype=("grids" "grids" "heroes" "logos")
local mimes=("image/jpeg" "image/jpeg" "image/jpeg" "image/png")
local dims=("460x215,920x430" "600x900,660x930" "" "")
if [[ -z "${SteamGridDBId}" ]] && [[ -z "${SteamAppId}" ]]; then
getSteamId > /dev/null getSteamId > /dev/null
fi fi
if [[ -n "${SteamGridDBId}" ]] || [[ -n "${SteamAppId}" ]]; then if [[ -n "${SteamGridDBId}" ]] || [[ -n "${SteamAppId}" ]]; then
create_new_dir "${STCFGPATH}/grid" create_new_dir "${STCFGPATH}/grid"
downloadImageSteamGridDB "grids" "${NOSTAPPID:-0}.jpg" "mimes=image/jpeg" "dimensions=460x215,920x430" || downloadImageSteam "header.jpg" "${NOSTAPPID:-0}.jpg" || echo "Failed to load header.jpg" for i in "${!in[@]}"; do
downloadImageSteamGridDB "grids" "${NOSTAPPID:-0}p.jpg" "mimes=image/jpeg" "dimensions=600x900,660x930" || downloadImageSteam "library_600x900_2x.jpg" "${NOSTAPPID:-0}p.jpg" || echo "Failed to load library_600x900_2x.jpg" downloadImageSteam "${in[${i}]}" "${out[${i}]}" || \
downloadImageSteamGridDB "heroes" "${NOSTAPPID:-0}_hero.jpg" "mimes=image/jpeg" || downloadImageSteam "library_hero.jpg" "${NOSTAPPID:-0}_hero.jpg" || echo "Failed to load library_hero.jpg" downloadImageSteamGridDB "${gtype[${i}]}" "${out[${i}]}" ${mimes[${i}]:+"mimes=${mimes[${i}]}"} ${dims[${i}]:+"dimensions=${dims[${i}]}"} || \
downloadImageSteamGridDB "logos" "${NOSTAPPID:-0}_logo.png" "mimes=image/png" || downloadImageSteam "logo.png" "${NOSTAPPID:-0}_logo.png" || echo "Failed to load logo.png" echo "Failed to load ${in[${i}]}"
done
else else
echo "Game is not found" echo "Game is not found"
fi fi
@ -474,6 +488,7 @@ addNonSteamGame() {
if [[ -n "${SCPATH}" ]]; then if [[ -n "${SCPATH}" ]]; then
[[ -z "${NOSTSHPATH}" ]] && NOSTSHPATH="${STEAM_SCRIPTS}/${name_desktop}.sh" [[ -z "${NOSTSHPATH}" ]] && NOSTSHPATH="${STEAM_SCRIPTS}/${name_desktop}.sh"
NOSTAPPNAME="${name_desktop}" NOSTAPPNAME="${name_desktop}"
NOSTAPPPATH="${portwine_exe}"
NOSTAPPID=$(getAppId "${NOSTSHPATH}") NOSTAPPID=$(getAppId "${NOSTSHPATH}")
if [[ ! -f "${NOSTSHPATH}" ]]; then if [[ ! -f "${NOSTSHPATH}" ]]; then
create_new_dir "${STEAM_SCRIPTS}" create_new_dir "${STEAM_SCRIPTS}"
@ -482,7 +497,7 @@ addNonSteamGame() {
export LD_PRELOAD= export LD_PRELOAD=
export START_FROM_STEAM=1 export START_FROM_STEAM=1
export START_FROM_FLATPAK=$(check_flatpak && echo 1 || echo 0) export START_FROM_FLATPAK=$(check_flatpak && echo 1 || echo 0)
"${PORT_SCRIPTS_PATH}/start.sh" "${portwine_exe}" "\$@" "${PORT_SCRIPTS_PATH}/start.sh" "${NOSTAPPPATH}" "\$@"
EOF EOF
chmod u+x "${NOSTSHPATH}" chmod u+x "${NOSTSHPATH}"
fi fi
@ -498,7 +513,7 @@ addNonSteamGame() {
fi fi
if [[ "${USE_STEAMAPPID_AS_NAME:-0}" == "1" ]]; then if [[ "${USE_STEAMAPPID_AS_NAME:-0}" == "1" ]]; then
SteamAppId=$(getSteamId "${NOSTAPPNAME}") getSteamId > /dev/null
[[ -n "${SteamAppId}" ]] && NOSTAPPNAME="${SteamAppId}" [[ -n "${SteamAppId}" ]] && NOSTAPPNAME="${SteamAppId}"
fi fi

@ -203,8 +203,7 @@ generate_pot () {
local FILES_FOR_GETTEXT i local FILES_FOR_GETTEXT i
FILES_FOR_GETTEXT=(functions_helper start.sh setup.sh add_in_steam.sh) FILES_FOR_GETTEXT=(functions_helper start.sh setup.sh add_in_steam.sh)
for i in "${FILES_FOR_GETTEXT[@]}" ; do for i in "${FILES_FOR_GETTEXT[@]}" ; do
sed -e 's/{translations\[/(gettext \"/g' -e 's/]}/")/g' -e 's/eval_translations/gettext/g' \ sed -e 's/{translations\[/(gettext \"/g' -e 's/]}/")/g' "${PORT_SCRIPTS_PATH}/$i" > "${PORT_SCRIPTS_PATH}/${i}_tmp"
"${PORT_SCRIPTS_PATH}/$i" > "${PORT_SCRIPTS_PATH}/${i}_tmp"
done done
#Когда присходит предупреждение: синтаксис $"..." запрещен по соображениям безопасности; используйте eval_gettext #Когда присходит предупреждение: синтаксис $"..." запрещен по соображениям безопасности; используйте eval_gettext
#и ругается на строку в которой нет перевода, можно использовать sed -i '//d' и убрать эту строку #и ругается на строку в которой нет перевода, можно использовать sed -i '//d' и убрать эту строку
@ -240,15 +239,6 @@ generate_pot () {
} }
export -f generate_pot export -f generate_pot
eval_translations () {
# Для того чтобы раскрывать переменную уже после создания массива
# Вместо {translations[\$TEST text]} нужно (eval_translations "\$%TEST% text" "TEST=test"), перевод должен быть с %% тоже
# В остальных случаях можно использовать {translations[\$TEST text]} ,но переменную нужно обьявлять до создания массива
# до source "${PW_CACHE_LANG_PATH}/$LANGUAGE" или можно использовать команды {translations[\$(cat file.txt) text]}
# но тогда выполнение команды будет происходить во время создания массива всегда, а не там где это требуется
echo "${translations[$1]//\$*"%"/${2//*=/}}"
}
create_translations () { create_translations () {
local po_file msgid msgstr local po_file msgid msgstr
[[ ! -d $PW_CACHE_LANG_PATH ]] && create_new_dir "$PW_CACHE_LANG_PATH" [[ ! -d $PW_CACHE_LANG_PATH ]] && create_new_dir "$PW_CACHE_LANG_PATH"
@ -1941,7 +1931,7 @@ pw_kill_autostart () {
export -f pw_kill_autostart export -f pw_kill_autostart
pw_exit_tray () { pw_exit_tray () {
if [[ "$XDG_SESSION_TYPE" == "tty" ]] ; then if [[ "$XDG_SESSION_TYPE" == "tty" || "$(readlink -f /bin/sh)" == *"/dash" ]] ; then
if [[ -n "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" ]] ; then if [[ -n "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" ]] ; then
kill -s SIGUSR1 "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" kill -s SIGUSR1 "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')"
fi fi
@ -1950,9 +1940,6 @@ pw_exit_tray () {
kill -s SIGUSR1 $(pgrep -a tray_gui_pp) 2>/dev/null kill -s SIGUSR1 $(pgrep -a tray_gui_pp) 2>/dev/null
fi fi
fi fi
if [[ -n "$(pgrep -a yad_gui_pp)" ]] ; then
kill -s SIGUSR1 $(pgrep -a yad_gui_pp) 2>/dev/null
fi
} }
export -f pw_exit_tray export -f pw_exit_tray
@ -4793,7 +4780,7 @@ open_changelog () {
export -f open_changelog export -f open_changelog
pw_tray_icon () { pw_tray_icon () {
if [[ "$XDG_SESSION_TYPE" == "tty" ]] ; then if [[ "$XDG_SESSION_TYPE" == "tty" || "$(readlink -f /bin/sh)" == *"/dash" ]] ; then
if [[ -n "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" ]] ; then if [[ -n "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" ]] ; then
kill -s SIGUSR1 "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')" kill -s SIGUSR1 "$(pgrep -a yad_gui_pp | grep "\--notification" | awk '{print $1}')"
fi fi
@ -4819,7 +4806,7 @@ pw_tray_icon () {
} }
export -f tray_icon_click_exit export -f tray_icon_click_exit
if [[ "$XDG_SESSION_TYPE" == "tty" ]] ; then if [[ "$XDG_SESSION_TYPE" == "tty" || "$(readlink -f /bin/sh)" == *"/dash" ]] ; then
tray_icon_click () { tray_icon_click () {
echo "" echo ""
} }
@ -5881,19 +5868,21 @@ gui_gamescope () {
PW_GS_EXPOSE_WAYLAND PW_GS_REALTIME_SCHEDULING PW_GS_EXPOSE_WAYLAND PW_GS_REALTIME_SCHEDULING
) )
[[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--mangoapp' ]] && add_to_array "PW_GS_LIST" PW_GS_MANGOAPP if [[ $GAMESCOPE_INSTALLED == "1" ]] ; then
[[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--backend' ]] && add_to_array "PW_GS_LIST" PW_GS_BACKEND_SDL [[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--mangoapp' ]] && add_to_array "PW_GS_LIST" PW_GS_MANGOAPP
check_wayland_session && add_to_array "PW_GS_LIST" PW_GS_SDL_VIDEODRIVER_X11 [[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--backend' ]] && add_to_array "PW_GS_LIST" PW_GS_BACKEND_SDL
[[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--cursor-scale-height' ]] && add_to_array "PW_GS_LIST" PW_GS_CURSOR_SCALE_HEIGHT check_wayland_session && add_to_array "PW_GS_LIST" PW_GS_SDL_VIDEODRIVER_X11
[[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--cursor-scale-height' ]] && add_to_array "PW_GS_LIST" PW_GS_CURSOR_SCALE_HEIGHT
#debian bookworm fix #debian bookworm fix
if [[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '-U, --fsr-upscaling' ]] ; then if [[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '-U, --fsr-upscaling' ]] ; then
GS_FILTER_CB="fsr!nis" GS_FILTER_CB="fsr!nis"
export PW_GS_FILTER_MODE_OLD="true" export PW_GS_FILTER_MODE_OLD="true"
rm_from_array "PW_GS_LIST" PW_GS_FORCE_GRAB_CURSOR PW_GS_FORCE_GRAB_KEYBOARD PW_GS_HDR_ENABLE PW_GS_HDR_FORCE_SUPPORT \ rm_from_array "PW_GS_LIST" PW_GS_FORCE_GRAB_CURSOR PW_GS_FORCE_GRAB_KEYBOARD PW_GS_HDR_ENABLE PW_GS_HDR_FORCE_SUPPORT \
PW_GS_HDR_FORCE_OUTPUT PW_GS_HDR_FORCE_OUTPUT
else else
GS_FILTER_CB="linear!nearest!fsr!nis!pixel" GS_FILTER_CB="linear!nearest!fsr!nis!pixel"
fi
fi fi
PW_GS_FULLSCREEN_INFO=${translations[Make the window fullscreen]} PW_GS_FULLSCREEN_INFO=${translations[Make the window fullscreen]}
@ -5917,11 +5906,11 @@ gui_gamescope () {
PW_GS_CURSOR_SCALE_HEIGHT_INFO=${translations[if specified, sets a base output height to linearly scale the cursor against.]} PW_GS_CURSOR_SCALE_HEIGHT_INFO=${translations[if specified, sets a base output height to linearly scale the cursor against.]}
unset ADD_CHK_BOX_GS unset ADD_CHK_BOX_GS
if [[ "${GAMESCOPE_INSTALLED}" == 1 ]] ; then if [[ $GAMESCOPE_INSTALLED == "1" ]] ; then
GAMESCOPE_NEED_INSTALL="${translations[Change settings gamescope for]} <b>$PW_NAME_DESKTOP_PROXY</b>\n ${translations[<b>NOTE:</b> To display help for each item, simply hover your mouse over the text]}" GAMESCOPE_NEED_INSTALL="${translations[Change settings gamescope for]} <b>$PW_NAME_DESKTOP_PROXY</b>\n ${translations[<b>NOTE:</b> To display help for each item, simply hover your mouse over the text]}"
GS_CB="CB" && GS_CBE="CBE" && GS_NUM="NUM" && GS_NUMN="NUMN" GS_CB="CB" && GS_CBE="CBE" && GS_NUM="NUM" && GS_NUMN="NUMN"
for int_to_boole in "${PW_GS_LIST[@]}" ; do for int_to_boole in "${PW_GS_LIST[@]}" ; do
if [[ "${!int_to_boole}" == "1" ]] if [[ ${!int_to_boole} == "1" ]]
then export "$int_to_boole"="TRUE" then export "$int_to_boole"="TRUE"
else export "$int_to_boole"="FALSE" else export "$int_to_boole"="FALSE"
fi fi
@ -5933,7 +5922,8 @@ gui_gamescope () {
else else
if check_flatpak ; then if check_flatpak ; then
GAMESCOPE_VERSION="$(grep 'VERSION_ID=' /etc/os-release)" GAMESCOPE_VERSION="$(grep 'VERSION_ID=' /etc/os-release)"
GAMESCOPE_NEED_INSTALL=$(eval_translations "<b>Gamescope is not detected on the system, to install it, run the command in the terminal:\\nflatpak install -y runtime/org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/\$%{GAMESCOPE_VERSION}%\\n(Can be selected and copied)</b>" "GAMESCOPE_VERSION=${GAMESCOPE_VERSION//VERSION_ID=/}") GAMESCOPE_VERSION="${GAMESCOPE_VERSION//VERSION_ID=/}"
GAMESCOPE_NEED_INSTALL="<b>${translations[Gamescope is not detected on the system, to install it, run the command in the terminal]}:\\nflatpak install -y runtime/org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/$(echo "$GAMESCOPE_VERSION")\\n(${translations[Can be selected and copied]})</b>"
YAD_TEXT_SELECTION="--selectable-labels" YAD_TEXT_SELECTION="--selectable-labels"
else else
GAMESCOPE_NEED_INSTALL="${translations[<b>Gamescope is not detected on the system, please contact the manufacturer of your distribution\\nor search the Internet for information on how to install gamescope on your system.</b>]}" GAMESCOPE_NEED_INSTALL="${translations[<b>Gamescope is not detected on the system, please contact the manufacturer of your distribution\\nor search the Internet for information on how to install gamescope on your system.</b>]}"
@ -7150,7 +7140,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE." "DATE=$(date +%Y)" 2>/dev/null & SOFTWARE." 2>/dev/null &
"${pw_yad}" --plug="${KEY_CREDITS}" --tabnum=3 \ "${pw_yad}" --plug="${KEY_CREDITS}" --tabnum=3 \
--text-info --show-uri --scroll \ --text-info --show-uri --scroll \

@ -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=2406 #SCRIPTS_NEXT_VERSION=2407
#SCRIPTS_STABLE_VERSION=2406 #SCRIPTS_STABLE_VERSION=2406
######################################################################## ########################################################################
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"
@ -48,7 +48,7 @@ export PW_FAKE_DLSS_VER="230506"
export PW_FAKE_DLSS_3_VER="0.9.1-plus" export PW_FAKE_DLSS_3_VER="0.9.1-plus"
export PW_GALLIUM_NINE_VER="0.10" export PW_GALLIUM_NINE_VER="0.10"
###WINE_AND_PROTON_LG### ###WINE_AND_PROTON_LG###
export PW_PROTON_LG_VER="PROTON_LG_9-19" export PW_PROTON_LG_VER="PROTON_LG_9-27"
export PW_WINE_LG_VER="WINE_LG_10-1" export PW_WINE_LG_VER="WINE_LG_10-1"
export PW_WINE_FULLSCREEN_FSR="1" export PW_WINE_FULLSCREEN_FSR="1"
export WINE_FULLSCREEN_FSR_MODE="ultra" export WINE_FULLSCREEN_FSR_MODE="ultra"
@ -57,9 +57,9 @@ export PW_VULKAN_USE="2"
export VKD3D_LIMIT_TESS_FACTORS="64" export VKD3D_LIMIT_TESS_FACTORS="64"
export DXVK_LEGACY_VER="1.6.1" export DXVK_LEGACY_VER="1.6.1"
export DXVK_STABLE_VER="1.10.3-28" export DXVK_STABLE_VER="1.10.3-28"
export DXVK_GIT_VER="2.5.3-299" export DXVK_GIT_VER="2.6-65"
export VKD3D_STABLE_VER="1.1-2602" export VKD3D_STABLE_VER="1.1-2602"
export VKD3D_GIT_VER="1.1-4478" export VKD3D_GIT_VER="1.1-4511"
###VKBASALT### ###VKBASALT###
export PW_VKBASALT_EFFECTS="Curves:cas" export PW_VKBASALT_EFFECTS="Curves:cas"
export PW_VKBASALT_FFX_CAS="0.50" export PW_VKBASALT_FFX_CAS="0.50"