From 56e80195193e681eaa2583ae7e756a2ad6c632c2 Mon Sep 17 00:00:00 2001 From: Mikhail Tergoev Date: Mon, 6 May 2024 23:14:44 +0300 Subject: [PATCH] Scripts version 2294 --- data_from_portwine/changelog_en | 3 ++ data_from_portwine/changelog_ru | 3 ++ data_from_portwine/scripts/functions_helper | 49 +++++++++++---------- data_from_portwine/scripts/start.sh | 3 ++ data_from_portwine/scripts/var | 2 +- 5 files changed, 35 insertions(+), 25 deletions(-) diff --git a/data_from_portwine/changelog_en b/data_from_portwine/changelog_en index 5b8882c..f4cd6e4 100755 --- a/data_from_portwine/changelog_en +++ b/data_from_portwine/changelog_en @@ -2,6 +2,9 @@ You can help us in the development of the project on the website: https://linux- ---------------------------------------- Changelog: +###Scripts version 2294### Date: 06.05.2024 / Download update size: 3 megabytes +* HOTFIX - definitions of the settings file used + ###Scripts version 2293### Date: 06.05.2024 / Download update size: 3 megabytes * multiple FPS limits have been added to MANGOHUD settings (thanks to Boria138) * improved creation of a settings file for .exe files on first launch diff --git a/data_from_portwine/changelog_ru b/data_from_portwine/changelog_ru index b094ee1..d7be02f 100755 --- a/data_from_portwine/changelog_ru +++ b/data_from_portwine/changelog_ru @@ -2,6 +2,9 @@ ----------------------------------------- История изменений: +###Scripts version 2294### Дата: 06.05.2024 / Размер скачиваемого обновления: 3 мегабайта +* HOTFIX - определения используемого файла настроек + ###Scripts version 2293### Дата: 06.05.2024 / Размер скачиваемого обновления: 3 мегабайта * в настройки MANGOHUD добавлен выбор нескольких ограничений FPS (спасибо Boria138) * улучшено создание файла настроек для .exe файлов при первом запуске diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index dd94723..4e078a5 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -1204,12 +1204,37 @@ pw_init_db () { PW_PREFIX_NAME=$(echo "${portwine_exe}" | awk -F"/prefixes/" '{print $2}' | awk -F"/" '{print $1}') fi fi + if [[ -f "${PORTWINE_DB_FILE}" ]] ; then # shellcheck source=/dev/null source "${PORTWINE_DB_FILE}" init_wine_ver && print_info "Use $PORTWINE_DB_FILE db file." + else + if [[ "${PW_DISABLED_CREATE_DB}" != 1 ]] ; then + if [[ ! -z "${PORTWINE_DB}" ]] ; then + export 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 + if [[ -z "${PATH_TO_GAME}" ]] || [[ ! -d "${PATH_TO_GAME}" ]]; then PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )" export PATH_TO_GAME @@ -1240,30 +1265,6 @@ 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 diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh index 4969da8..917d968 100755 --- a/data_from_portwine/scripts/start.sh +++ b/data_from_portwine/scripts/start.sh @@ -617,6 +617,9 @@ case "${VULKAN_MOD}" in esac init_wine_ver +if [[ -f "${PORTWINE_DB_FILE}" ]] ; then + 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 ;; diff --git a/data_from_portwine/scripts/var b/data_from_portwine/scripts/var index 1f1527d..bf7f8ba 100755 --- a/data_from_portwine/scripts/var +++ b/data_from_portwine/scripts/var @@ -1,6 +1,6 @@ #!/usr/bin/env bash #Author: Castro-Fidel (linux-gaming.ru) -#SCRIPTS_NEXT_VERSION=2293 +#SCRIPTS_NEXT_VERSION=2294 ######################################################################## export LANGUAGES_LIST="ru" export PW_MANGOHUD="0"