From f91d0bc1b927412e47d5905e600014d3c13b1452 Mon Sep 17 00:00:00 2001
From: Mikhail Tergoev <fidel@altlinux.org>
Date: Thu, 28 Dec 2023 18:24:43 +0300
Subject: [PATCH] Scripts version 2240

---
 README-RU.md                                  | 42 +++++++----
 README.md                                     | 70 ++++++++++---------
 data_from_portwine/changelog_eng              |  7 ++
 data_from_portwine/changelog_rus              |  6 +-
 .../scripts/pw_autoinstall/PW_WOSB            |  2 +-
 data_from_portwine/scripts/start.sh           | 10 +--
 data_from_portwine/scripts/var                |  2 +-
 7 files changed, 82 insertions(+), 57 deletions(-)

diff --git a/README-RU.md b/README-RU.md
index 0b4ade0b..ce67a092 100755
--- a/README-RU.md
+++ b/README-RU.md
@@ -30,12 +30,40 @@
 
 ## Установка с помощью пакетов
 
+
+* **Alt Linux**
+
+`apt-get` :
+```sh
+su -
+
+apt-get update && apt-get dist-upgrade -y
+
+apt-get install portproton i586-{libvulkan1,libd3d,libGL,libgio,libnm,libnsl1,libnss,glibc-nss,glibc-pthread,libunwind,xorg-dri-swrast}
+
+exit
+```
+
+`Вариант установки с помощью eepm`:
+```sh
+su -
+
+epm full-upgrade
+
+epm play portproton
+
+exit
+```
+
 * **Ubuntu 20.04** (Kubuntu, Xubuntu, Lubuntu, и т.д.), **Linux Mint 20.x** :
 [portproton_1.0-2_amd64.deb](https://github.com/Castro-Fidel/PortProton_dpkg/releases/download/portproton_1.0-2_amd64/portproton_1.0-2_amd64.deb)
+
 * **Arch Linux** и производные (Manjaro, Garuda, и т.д.) :
 [AUR](https://aur.archlinux.org/packages/portproton)
+
 * **OpenSuse**:
 [OBS](https://software.opensuse.org/download/package?package=portproton&project=home%3ABoria138%3APortProton)
+
 * **ROSA Linux** устанавливается с помощью этой команды:
 
 ```sh
@@ -50,20 +78,6 @@ sudo dnf copr enable boria138/portproton
 sudo dnf install portproton
 ```
 
-* **Alt Linux** устанавливается с помощью этой команды:
-
-```sh
-su -
-
-epm ei
-
-epm full-upgrade
-
-epm play portproton
-
-exit
-```
-
 ## Универсальный (ручной) метод установки
 
 **ВНИМАНИЕ** : при универсальном способе установки PortProton зависимости должны быть установлены вручную!
diff --git a/README.md b/README.md
index 94236eb8..9d00f83e 100755
--- a/README.md
+++ b/README.md
@@ -30,18 +30,45 @@ Includes a set of scripts combined with wine-proton itself, a Steam Runtime Snip
 
 ## Installation using packages
 
-* **Ubuntu 20.04** (Kubuntu, Xubuntu, Lubuntu, etc.), **Linux Mint 20.x** :
-[portproton_1.0-2_amd64.deb](https://github.com/Castro-Fidel/PortProton_dpkg/releases/download/portproton_1.0-2_amd64/portproton_1.0-2_amd64.deb)
-* **Arch Linux** and derivatives (Manjaro, Garuda, etc.) :
-[AUR](https://aur.archlinux.org/packages/portproton)
-* **OpenSuse**:
-[OBS](https://software.opensuse.org/download/package?package=portproton&project=home%3ABoria138%3APortProton)
+* **Alt Linux** (package in the official repository) is installed with the command:
+
+`apt-get`:
+```sh
+su -
+
+apt-get update && apt-get dist-upgrade -y
+
+apt-get install portproton i586-{libvulkan1,libd3d,libGL,libgio,libnm,libnsl1,libnss,glibc-nss,glibc-pthread,libunwind,xorg-dri-swrast}
+
+exit
+```
+
+`epm`:
+```sh
+su -
+
+epm full-upgrade
+
+epm play portproton
+
+exit
+```
+
 * **ROSA Linux** (package in the official repository) is installed with the command:
 
 ```sh
 sudo urpmi portproton
 ```
 
+* **Ubuntu 20.04** (Kubuntu, Xubuntu, Lubuntu, etc.), **Linux Mint 20.x** :
+[portproton_1.0-2_amd64.deb](https://github.com/Castro-Fidel/PortProton_dpkg/releases/download/portproton_1.0-2_amd64/portproton_1.0-2_amd64.deb)
+
+* **Arch Linux** and derivatives (Manjaro, Garuda, etc.) :
+[AUR](https://aur.archlinux.org/packages/portproton)
+
+* **OpenSuse**:
+[OBS](https://software.opensuse.org/download/package?package=portproton&project=home%3ABoria138%3APortProton)
+
 * **Fedora 37+** and **Nobara**:
 
 ```sh
@@ -50,29 +77,6 @@ sudo dnf copr enable boria138/portproton
 sudo dnf install portproton
 ```
 
-* **Alt Linux** (package in the official repository) is installed with the command:
-
-`apt-get`:
-```sh
-sudo apt-get update
-
-sudo apt-get dist-upgrade -y
-
-sudo apt-get install bubblewrap cabextract curl gamemode icoutils i586-libvulkan1 libvulkan1 steam vulkan-tools wget zenity zstd
-```
-
-`epm`:
-```sh
-su -
-
-epm ei
-
-epm full-upgrade
-
-epm play portproton
-
-exit
-```
 
 ## Universal (manual) installation
 
@@ -173,11 +177,13 @@ sudo dnf install curl gamemode gamemode.i686 icoutils wget zenity bubblewrap zst
 * **Alt Linux**
 
 ```sh
-sudo apt-get update
+su -
 
-sudo apt-get dist-upgrade -y
+apt-get update && apt-get dist-upgrade -y
 
-sudo apt-get install bubblewrap cabextract curl gamemode icoutils i586-libvulkan1 libvulkan1 portproton steam vulkan-tools wget zenity zstd
+apt-get install bubblewrap cabextract wget zstd gawk tar xz pciutils bc coreutils file curl icoutils wmctrl zenity xdg-utils desktop-file-utils libvulkan1 vulkan-tools libd3d libGL gamemode fontconfig xrdb libcurl libgio libnm libnsl1 libnss glibc-nss glibc-pthread i586-{libvulkan1,libd3d,libGL,libgio,libnm,libnsl1,libnss,glibc-nss,glibc-pthread,libunwind,xorg-dri-swrast}
+
+exit
 ```
 
 * **ROSA DESKTOP FRESH R12**
diff --git a/data_from_portwine/changelog_eng b/data_from_portwine/changelog_eng
index 63d98b95..d142930f 100755
--- a/data_from_portwine/changelog_eng
+++ b/data_from_portwine/changelog_eng
@@ -2,6 +2,13 @@ You can help us in the development of the project on the website: https://linux-
 ----------------------------------------
 Changelog:
 
+###Scripts version 2240### Date: 28.12.2023 / Download update size: 8 megabytes
+* the variable "DX12_DISABLE" has been removed from EDIT_DB (deprecated function)
+* Vulkan driver verification has been transferred to the log creation mode
+* updated the version check of the World Of Sea Battle game before installation
+* The Wayland warning has been removed
+* added the variable "PW_RESTORE_RESOLUTION" to EDIT_BD (thanks to Boria138)
+
 ###Scripts version 2239### Date: 17.12.2023 / Download update size: 8 megabytes
 * fixed the launch of League of Legends (to fix it, run the auto-installation)
 * added correct verification of the vulkan driver, without installing vulkan-tools into the system
diff --git a/data_from_portwine/changelog_rus b/data_from_portwine/changelog_rus
index 7ad747c7..de12fe4e 100755
--- a/data_from_portwine/changelog_rus
+++ b/data_from_portwine/changelog_rus
@@ -2,8 +2,12 @@
 -----------------------------------------
 История изменений:
 
+###Scripts version 2240### Дата: 28.12.2023 / Размер скачиваемого обновления: 8 мегабайт
 * удалена переменная "DX12_DISABLE" из EDIT_DB (устаревшая функция)
-* произведен перенос проверки драйвера Vulkan в режим зоздания лога
+* произведен перенос проверки драйвера Vulkan в режим создания лога
+* обновлена проверка версии игры World Of Sea Battle перед установкой
+* удалено предупреждение о Wayland
+* добавлена переменная "PW_RESTORE_RESOLUTION" в EDIT_BD (спасибо Boria138)
 
 ###Scripts version 2239### Дата: 17.12.2023 / Размер скачиваемого обновления: 8 мегабайт
 * исправлен запуск League of Legends (для исправления запустите автоустановку)
diff --git a/data_from_portwine/scripts/pw_autoinstall/PW_WOSB b/data_from_portwine/scripts/pw_autoinstall/PW_WOSB
index 2c76151c..42e445b3 100755
--- a/data_from_portwine/scripts/pw_autoinstall/PW_WOSB
+++ b/data_from_portwine/scripts/pw_autoinstall/PW_WOSB
@@ -7,7 +7,7 @@ export LAUNCH_PARAMETERS=("/S")
 export PW_DLL_INSTALL="faudio dotnet48"
 export PW_VULKAN_USE=1
 
-WOSB_VERSION="$(curl -s --list-only --connect-timeout 3 https://www.worldofseabattle.com/download2 2>/dev/null | grep '/web_installer.exe' | awk -F'xsolla-launcher-update/' '{print $2}' | awk -F'/' '{print $1}')"
+WOSB_VERSION="$(curl -s --list-only --connect-timeout 3 https://www.worldofseabattle.com/download2 2>/dev/null | grep 'installer.exe' | awk -F'xsolla-launcher-update/' '{print $2}' | awk -F'/' '{print $1}')"
 [[ ! -z "$WOSB_VERSION" ]] && print_info "Found version: $WOSB_VERSION" || zenity_error "Error while get version of WOSB INSTALLER."
 
 start_portwine
diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh
index bdb60030..1fb26f17 100755
--- a/data_from_portwine/scripts/start.sh
+++ b/data_from_portwine/scripts/start.sh
@@ -461,13 +461,7 @@ pw_create_prefix_backup () {
 }
 
 pw_edit_db () {
-    pw_gui_for_edit_db \
-    PW_MANGOHUD PW_MANGOHUD_USER_CONF ENABLE_VKBASALT PW_NO_ESYNC PW_NO_FSYNC PW_USE_RAY_TRACING \
-    PW_USE_NVAPI_AND_DLSS PW_USE_FAKE_DLSS PW_WINE_FULLSCREEN_FSR PW_HIDE_NVIDIA_GPU PW_VIRTUAL_DESKTOP PW_USE_TERMINAL \
-    PW_GUI_DISABLED_CS PW_USE_GAMEMODE PW_USE_D3D_EXTRAS PW_FIX_VIDEO_IN_GAME  \
-    PW_REDUCE_PULSE_LATENCY PW_USE_US_LAYOUT PW_USE_GSTREAMER PW_FORCE_LARGE_ADDRESS_AWARE PW_USE_SHADER_CACHE \
-    PW_USE_WINE_DXGI PW_USE_EAC_AND_BE PW_USE_SYSTEM_VK_LAYERS PW_USE_OBS_VKCAPTURE PW_USE_GALLIUM_ZINK PW_USE_GAMESCOPE
-    if [[ "${XDG_SESSION_TYPE}" = "wayland" ]] ; then
+    if [[ "${XDG_SESSION_TYPE}" == "wayland" ]] ; then
         pw_gui_for_edit_db \
         PW_MANGOHUD PW_MANGOHUD_USER_CONF ENABLE_VKBASALT PW_NO_ESYNC PW_NO_FSYNC PW_USE_RAY_TRACING \
         PW_USE_NVAPI_AND_DLSS PW_USE_FAKE_DLSS PW_WINE_FULLSCREEN_FSR PW_HIDE_NVIDIA_GPU PW_VIRTUAL_DESKTOP PW_USE_TERMINAL \
@@ -482,7 +476,7 @@ pw_edit_db () {
         PW_REDUCE_PULSE_LATENCY PW_USE_US_LAYOUT PW_RESTORE_RESOLUTION PW_USE_GSTREAMER PW_FORCE_LARGE_ADDRESS_AWARE PW_USE_SHADER_CACHE \
         PW_USE_WINE_DXGI PW_USE_EAC_AND_BE PW_USE_SYSTEM_VK_LAYERS PW_USE_OBS_VKCAPTURE PW_USE_GALLIUM_ZINK PW_USE_GAMESCOPE
     fi
-    if [ "$?" == 0 ] ; then
+    if [[ "$?" == 0 ]] ; then
         print_info "Restarting PP after update ppdb file..."
         /usr/bin/env bash -c ${pw_full_command_line[*]} &
         exit 0
diff --git a/data_from_portwine/scripts/var b/data_from_portwine/scripts/var
index 691fb43c..794e3da7 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=2239
+#SCRIPTS_NEXT_VERSION=2240
 ########################################################################
 export PW_MANGOHUD=0
 export MANGOHUD_CONFIG=cpu_stats,cpu_temp,cpu_mhz,cpu_color=2e97cb,cpu_text=CPU,gpu_stats,gpu_temp,gpu_core_clock,gpu_mem_clock,vulkan_driver,gpu_name,gpu_color=2e9762,gpu_text=GPU,vram,vram_color=ad64c1,ram,ram_color=c26693,io_color=a491d3,frame_timing=1,frametime_color=00ff00,time,arch,wine,wine_color=eb5b5b,engine_color=eb5b5b,background_alpha=0.2,font_size=24,background_color=020202,text_color=ffffff,toggle_hud=Shift_R+F12,resolution,vkbasalt