From 6e38d19ea2440b819f670d419d6e1b54b0f17532 Mon Sep 17 00:00:00 2001 From: Mikhail Tergoev Date: Wed, 6 Dec 2023 15:51:04 +0300 Subject: [PATCH] fix PATH_TO_GAME --- data_from_portwine/scripts/functions_helper | 13 +++++-------- data_from_portwine/scripts/runlib | 5 ++++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 95baa87f..06a69b05 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -361,7 +361,7 @@ init_wine_ver () { export WINESERVER="${WINEDIR}/bin/wineserver" export WINEDLLPATH="${WINEDIR}/lib64/wine:${WINEDIR}/lib/wine" - if [[ ! -z "${PATH_TO_GAME}" ]] ; then + if [[ -d "${PATH_TO_GAME}" ]] ; then export WINEDLLPATH+=":${PATH_TO_GAME}" fi @@ -462,10 +462,12 @@ pw_init_runtime () { export pw_runtime="${PW_WINELIB}/pressure-vessel/bin/pressure-vessel-unruntime \ --unshare-home \ --home="${PW_SANDBOX_HOME_PATH}" \ + --remove-game-overlay \ ${PW_ADD_TO_ARGS_IN_RUNTIME} --" else export pw_runtime="${PW_WINELIB}/pressure-vessel/bin/pressure-vessel-unruntime \ --share-home \ + --remove-game-overlay \ ${PW_ADD_TO_ARGS_IN_RUNTIME} --" fi @@ -865,12 +867,7 @@ pw_init_db () { else orig_IFS="$IFS" IFS=$'\n' - if [[ "$START_FROM_STEAM" != 1 ]] ; then - PW_FIND_DB_FILE=`grep -ilw "#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi` - else - # BpeMeHHblu` KocTblJlb =) - PW_FIND_DB_FILE=`grep -ilw "#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi | head -n 1` - fi + PW_FIND_DB_FILE=`grep -ilw "#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi` if [[ `echo "$PW_FIND_DB_FILE" | wc -l` -gt 1 ]] ; then unset ADD_CB_DBFILE for PW_CHECK_DB_FILE in $PW_FIND_DB_FILE ; do @@ -904,7 +901,7 @@ pw_init_db () { init_wine_ver && print_info "Use ${PORTWINE_DB_FILE} db file." fi - if [[ -d "${PATH_TO_GAME}" ]] ; then + if [[ -z "${PATH_TO_GAME}" ]] || [[ ! -d "${PATH_TO_GAME}" ]]; then export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )" fi diff --git a/data_from_portwine/scripts/runlib b/data_from_portwine/scripts/runlib index 77dc1340..289029bf 100755 --- a/data_from_portwine/scripts/runlib +++ b/data_from_portwine/scripts/runlib @@ -639,7 +639,10 @@ start_portwine () { pw_run () { unset GDK_BACKEND - if [[ ! -z "${PATH_TO_GAME}" ]] ; then + if [[ ! -z "${PATH_TO_GAME}" ]] && [[ -d "${PATH_TO_GAME}" ]] ; then + cd "${PATH_TO_GAME}" + elif [[ -f "$portwine_exe" ]] ; then + export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )" cd "${PATH_TO_GAME}" else cd "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c"