From 3c9288843f496924ae271a6be0fcef4d77d8cb64 Mon Sep 17 00:00:00 2001 From: castro-fidel Date: Wed, 17 Nov 2021 09:49:03 +0300 Subject: [PATCH] ###Scripts version 2051### --- data_from_portwine/changelog | 3 +++ .../scripts/portwine_db/League of Legends | 17 ++++++++++++++++ .../scripts/pw_autoinstall/PW_LOL | 20 +++++++++---------- data_from_portwine/scripts/var | 2 +- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/data_from_portwine/changelog b/data_from_portwine/changelog index c4f427f..cc64d45 100755 --- a/data_from_portwine/changelog +++ b/data_from_portwine/changelog @@ -5,6 +5,9 @@ * добавить проверку количества db файлов на один exe * заниматься только развитием проекта за счет вашей подписки на https://boosty.to/portwine-linux.ru ----------------------------------------- +###Scripts version 2051### +* Добавлена проверка и скачивание актуальной версии WINE для League of Legends перед запуском игры + ###Scripts version 2050### * HOTFIX - отображение версий WINE при создании db файла diff --git a/data_from_portwine/scripts/portwine_db/League of Legends b/data_from_portwine/scripts/portwine_db/League of Legends index 316bf21..a040d27 100755 --- a/data_from_portwine/scripts/portwine_db/League of Legends +++ b/data_from_portwine/scripts/portwine_db/League of Legends @@ -41,6 +41,23 @@ export PW_NO_ESYNC=1 # Do not use eventfd-based in-pr ##export PW_USE_TERMINAL=1 # Force run in terminal ##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI +check_download_wine_ver_for_lol () { + if [ ! -d "${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}" ] ; then + if try_download "https://github.com/Castro-Fidel/wine_builds/releases/download/${PW_WINE_USE}/${PW_WINE_USE}.tar.xz" \ + "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" ; then + if unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" "${PORT_WINE_PATH}/data/dist/" ; then + try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" + UNPACK_STATUS=0 + else + try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" + try_remove_dir "${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}" + fi + fi + [[ "${UNPACK_STATUS}" != 0 ]] && exit 1 + fi +} +check_download_wine_ver_for_lol + check_port_for_lol () { pw_start_progress_bar_block "Loading and start League of Legends. Please wait. It can take a long time!" process=LeagueClientUx.exe diff --git a/data_from_portwine/scripts/pw_autoinstall/PW_LOL b/data_from_portwine/scripts/pw_autoinstall/PW_LOL index 13ba9a6..916343a 100644 --- a/data_from_portwine/scripts/pw_autoinstall/PW_LOL +++ b/data_from_portwine/scripts/pw_autoinstall/PW_LOL @@ -4,23 +4,23 @@ export LAUNCH_PARAMETERS=("/q" ) export PW_AUTOINSTALL_EXE="${WINEPREFIX}/drive_c/live.na.exe" export LAUNCH_PARAMETERS=("--launch-product=league_of_legends" "--launch-patchline=live") -export VERSION_WINE_FOR_LOL="WINE_LOL_GE_6.16-3" export PW_MUST_HAVE_DLL="" -if [ ! -d "${PORT_WINE_PATH}/data/dist/${VERSION_WINE_FOR_LOL}" ] ; then - if try_download "https://github.com/Castro-Fidel/wine_builds/releases/download/${VERSION_WINE_FOR_LOL}/${VERSION_WINE_FOR_LOL}.tar.xz" \ - "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_FOR_LOL}.tar.xz" ; then - if unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_FOR_LOL}.tar.xz" "${PORT_WINE_PATH}/data/dist/" ; then - try_remove_file "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_FOR_LOL}.tar.xz" +export PW_VULKAN_USE=1 +export PW_WINE_USE=WINE_LOL_GE_6.16-3 + +if [ ! -d "${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}" ] ; then + if try_download "https://github.com/Castro-Fidel/wine_builds/releases/download/${PW_WINE_USE}/${PW_WINE_USE}.tar.xz" \ + "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" ; then + if unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" "${PORT_WINE_PATH}/data/dist/" ; then + try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" UNPACK_STATUS=0 else - try_remove_file "${PORT_WINE_PATH}/data/tmp/${VERSION_WINE_FOR_LOL}.tar.xz" - try_remove_dir "${PORT_WINE_PATH}/data/dist/${VERSION_WINE_FOR_LOL}" + try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" + try_remove_dir "${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}" fi fi [[ "${UNPACK_STATUS}" != 0 ]] && exit 1 fi -export PW_WINE_USE=WINE_LOL_GE_6.16-3 -export PW_VULKAN_USE=1 start_portwine if try_download "https://lol.secure.dyn.riotcdn.net/channels/public/x/installer/current/live.na.exe" "${PW_AUTOINSTALL_EXE}" then diff --git a/data_from_portwine/scripts/var b/data_from_portwine/scripts/var index d169787..b2f57a0 100755 --- a/data_from_portwine/scripts/var +++ b/data_from_portwine/scripts/var @@ -1,6 +1,6 @@ #!/bin/bash #Author: Castro-Fidel (PortWINE-Linux.ru) -#SCRIPTS_NEXT_VERSION=2050 +#SCRIPTS_NEXT_VERSION=2051 #PORT_NEXT_VERSION=97 ######################################################################## export PW_MANGOHUD=1