From 04aa974f287ef70e2d319e82889f0a3520ac439f Mon Sep 17 00:00:00 2001 From: Mikhail Tergoev Date: Mon, 6 May 2024 21:19:39 +0300 Subject: [PATCH] fix realpath for .exe and generate ppdb file --- data_from_portwine/scripts/functions_helper | 25 +++++++++++++++++++++ data_from_portwine/scripts/start.sh | 23 +++---------------- data_from_portwine/scripts/var | 1 + 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 726dfcb..dd94723 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -1240,7 +1240,32 @@ pw_init_db () { fi done fi + if [[ "${PW_DISABLED_CREATE_DB}" != 1 ]] ; then + if [[ ! -z "${PORTWINE_DB}" ]] \ + && [[ -z "${PORTWINE_DB_FILE}" ]] + then + PORTWINE_DB_FILE=$(grep -il "\#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*) + if [[ -z "${PORTWINE_DB_FILE}" ]] ; then + { + echo "#!/usr/bin/env bash" + echo "#Author: ${USER}" + echo "#${PORTWINE_DB}.exe" + echo "#Rating=1-5" + } > "${portwine_exe}".ppdb + export PORTWINE_DB_FILE="${portwine_exe}".ppdb + fi + if [[ ! -z $(echo "${portwine_exe}" | grep "/data/prefixes/") ]] && \ + [[ -z $(echo "${portwine_exe}" | grep "/data/prefixes/DEFAULT/") ]] + then + PW_PREFIX_NAME=$(echo "${portwine_exe}" | awk -F"/prefixes/" '{print $2}' | awk -F"/" '{print $1}') + fi + # shellcheck source=/dev/null + source "${PORTWINE_DB_FILE}" + fi + edit_db_from_gui PW_VULKAN_USE PW_WINE_USE PW_PREFIX_NAME + fi fi + [[ "${START_FROM_STEAM}" == 1 ]] && export PW_GUI_DISABLED_CS=1 [[ "${START_FROM_PP_GUI}" == 1 ]] && export PW_GUI_DISABLED_CS=0 && unset START_FROM_PP_GUI diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh index dc34d4b..4969da8 100755 --- a/data_from_portwine/scripts/start.sh +++ b/data_from_portwine/scripts/start.sh @@ -28,11 +28,12 @@ export pw_full_command_line=("$0" $*) MISSING_DESKTOP_FILE=0 if [[ -f "$1" ]] ; then - export portwine_exe="$1" + portwine_exe="$(realpath "$1")" elif [[ "$1" == *.exe ]] ; then - export portwine_exe="$1" + portwine_exe="$1" MISSING_DESKTOP_FILE=1 fi +export portwine_exe # HOTFIX - ModernWarships if echo "$portwine_exe" | grep ModernWarships &>/dev/null \ @@ -617,24 +618,6 @@ esac init_wine_ver -if [[ "${PW_DISABLED_CREATE_DB}" != 1 ]] ; then - if [[ ! -z "${PORTWINE_DB}" ]] \ - && [[ -z "${PORTWINE_DB_FILE}" ]] - then - PORTWINE_DB_FILE=$(grep -il "\#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*) - if [[ -z "${PORTWINE_DB_FILE}" ]] ; then - { - echo "#!/usr/bin/env bash" - echo "#Author: ${USER}" - echo "#${PORTWINE_DB}.exe" - echo "#Rating=1-5" - } > "${portwine_exe}".ppdb - export PORTWINE_DB_FILE="${portwine_exe}".ppdb - fi - fi - edit_db_from_gui PW_VULKAN_USE PW_WINE_USE PW_PREFIX_NAME -fi - [[ ! -z "$PW_YAD_SET" ]] && case "$PW_YAD_SET" in 98) portwine_delete_shortcut ;; 100) portwine_create_shortcut ;; diff --git a/data_from_portwine/scripts/var b/data_from_portwine/scripts/var index 8570780..456acf9 100755 --- a/data_from_portwine/scripts/var +++ b/data_from_portwine/scripts/var @@ -49,6 +49,7 @@ export PW_PROTON_LG_VER="PROTON_LG_9-4" export PW_WINE_LG_VER="WINE_LG_9-7" export PW_WINE_FULLSCREEN_FSR="1" ###DXVK_AND_VKD3D### +export PW_VULKAN_USE="2" export VKD3D_LIMIT_TESS_FACTORS="64" export D8VK_VER="1.7.1-2367" export DGV2_VER="2.81.3"