From dd61c72a3a58c7d9f74adb20d8fe0fbc509f1de0 Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Wed, 27 May 2026 19:15:44 +0500 Subject: [PATCH] fix: copy ppdb templates and fix runtime game path Signed-off-by: Boris Yumankulov --- .../share/portproton/scripts/functions_helper | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/build-aux/share/portproton/scripts/functions_helper b/build-aux/share/portproton/scripts/functions_helper index 13dc061c..9a810e36 100755 --- a/build-aux/share/portproton/scripts/functions_helper +++ b/build-aux/share/portproton/scripts/functions_helper @@ -1981,7 +1981,11 @@ pw_init_db () { export PORTWINE_DB_FILE use_exiftool "$PW_EXE_FILE" grep -q "Sony" "${PW_TMPFS_PATH}/exiftool.tmp" && PW_WINE_USE="WINE_LG" - if [[ -z "${PORTWINE_DB_FILE}" ]] ; then + if [[ -n "${PORTWINE_DB_FILE}" ]] ; then + try_copy_file "${PORTWINE_DB_FILE}" "${PW_EXE_FILE}".ppdb + export PORTWINE_DB_FILE="${PW_EXE_FILE}".ppdb + fi + if [[ ! -f "${PORTWINE_DB_FILE}" ]] ; then { echo "#!/usr/bin/env bash" echo "#Author: ${USER}" @@ -2018,7 +2022,10 @@ pw_init_db () { fi fi - if [[ -z "${PATH_TO_GAME}" ]] || [[ ! -d "$(realpath "${PATH_TO_GAME}")" ]] ; then + if [[ -z "${PATH_TO_GAME}" ]] \ + || [[ "${PATH_TO_GAME}" == "." ]] \ + || [[ ! -d "$(realpath "${PATH_TO_GAME}")" ]] + then if [[ -f "${PW_EXE_FILE}" ]] ; then PATH_TO_GAME="$(dirname "$(realpath "${PW_EXE_FILE}")")" export PATH_TO_GAME @@ -3710,7 +3717,10 @@ pw_run () { return $? fi - if [[ -n "${PATH_TO_GAME}" ]] \ + if [[ "${PATH_TO_GAME}" == "." ]] + then + PATH_TO_GAME="$( cd "$( dirname "${PW_EXE_FILE}" )" >/dev/null 2>&1 && pwd )" + elif [[ -n "${PATH_TO_GAME}" ]] \ && [[ -d "${PATH_TO_GAME}" ]] then : -- 2.54.0