Commit 52958992 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Merge branch 'Boria138-mangohud-basic-gui'

parents 31575b17 d6f35c00
...@@ -30,12 +30,40 @@ ...@@ -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** : * **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) [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, и т.д.) : * **Arch Linux** и производные (Manjaro, Garuda, и т.д.) :
[AUR](https://aur.archlinux.org/packages/portproton) [AUR](https://aur.archlinux.org/packages/portproton)
* **OpenSuse**: * **OpenSuse**:
[OBS](https://software.opensuse.org/download/package?package=portproton&project=home%3ABoria138%3APortProton) [OBS](https://software.opensuse.org/download/package?package=portproton&project=home%3ABoria138%3APortProton)
* **ROSA Linux** устанавливается с помощью этой команды: * **ROSA Linux** устанавливается с помощью этой команды:
```sh ```sh
...@@ -50,20 +78,6 @@ sudo dnf copr enable boria138/portproton ...@@ -50,20 +78,6 @@ sudo dnf copr enable boria138/portproton
sudo dnf install portproton sudo dnf install portproton
``` ```
* **Alt Linux** устанавливается с помощью этой команды:
```sh
su -
epm ei
epm full-upgrade
epm play portproton
exit
```
## Универсальный (ручной) метод установки ## Универсальный (ручной) метод установки
**ВНИМАНИЕ** : при универсальном способе установки PortProton зависимости должны быть установлены вручную! **ВНИМАНИЕ** : при универсальном способе установки PortProton зависимости должны быть установлены вручную!
......
...@@ -30,33 +30,23 @@ Includes a set of scripts combined with wine-proton itself, a Steam Runtime Snip ...@@ -30,33 +30,23 @@ Includes a set of scripts combined with wine-proton itself, a Steam Runtime Snip
## Installation using packages ## Installation using packages
* **Ubuntu 20.04** (Kubuntu, Xubuntu, Lubuntu, etc.), **Linux Mint 20.x** : * **Alt Linux** (package in the official repository) is installed with the command:
[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)
* **ROSA Linux** (package in the official repository) is installed with the command:
`apt-get`:
```sh ```sh
sudo urpmi portproton su -
```
* **Fedora 37+** and **Nobara**: apt-get update && apt-get dist-upgrade -y
```sh apt-get install portproton i586-{libvulkan1,libd3d,libGL,libgio,libnm,libnsl1,libnss,glibc-nss,glibc-pthread,libunwind,xorg-dri-swrast}
sudo dnf copr enable boria138/portproton
sudo dnf install portproton exit
``` ```
* **Alt Linux** (package in the official repository) is installed with the command: `epm`:
```sh ```sh
su - su -
epm ei
epm full-upgrade epm full-upgrade
epm play portproton epm play portproton
...@@ -64,6 +54,30 @@ epm play portproton ...@@ -64,6 +54,30 @@ epm play portproton
exit 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
sudo dnf copr enable boria138/portproton
sudo dnf install portproton
```
## Universal (manual) installation ## Universal (manual) installation
**ATTENTION** : with the universal method of installing PortProton, dependencies must be installed manually! **ATTENTION** : with the universal method of installing PortProton, dependencies must be installed manually!
...@@ -163,11 +177,13 @@ sudo dnf install curl gamemode gamemode.i686 icoutils wget zenity bubblewrap zst ...@@ -163,11 +177,13 @@ sudo dnf install curl gamemode gamemode.i686 icoutils wget zenity bubblewrap zst
* **Alt Linux** * **Alt Linux**
```sh ```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 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** * **ROSA DESKTOP FRESH R12**
......
...@@ -2,6 +2,16 @@ You can help us in the development of the project on the website: https://linux- ...@@ -2,6 +2,16 @@ You can help us in the development of the project on the website: https://linux-
---------------------------------------- ----------------------------------------
Changelog: Changelog:
###Scripts version 2241### Date: 28.12.2023 / Download update size: 8 megabytes
* HOTFIX - VKD3D
###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 ###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) * 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 * added correct verification of the vulkan driver, without installing vulkan-tools into the system
......
...@@ -2,8 +2,15 @@ ...@@ -2,8 +2,15 @@
----------------------------------------- -----------------------------------------
История изменений: История изменений:
###Scripts version 2241### Дата: 28.12.2023 / Размер скачиваемого обновления: 8 мегабайт
* HOTFIX - VKD3D (определение DX12 в некоторых играх)
###Scripts version 2240### Дата: 28.12.2023 / Размер скачиваемого обновления: 8 мегабайт
* удалена переменная "DX12_DISABLE" из EDIT_DB (устаревшая функция) * удалена переменная "DX12_DISABLE" из EDIT_DB (устаревшая функция)
* произведен перенос проверки драйвера Vulkan в режим зоздания лога * произведен перенос проверки драйвера Vulkan в режим создания лога
* обновлена проверка версии игры World Of Sea Battle перед установкой
* удалено предупреждение о Wayland
* добавлена переменная "PW_RESTORE_RESOLUTION" в EDIT_BD (спасибо Boria138)
###Scripts version 2239### Дата: 17.12.2023 / Размер скачиваемого обновления: 8 мегабайт ###Scripts version 2239### Дата: 17.12.2023 / Размер скачиваемого обновления: 8 мегабайт
* исправлен запуск League of Legends (для исправления запустите автоустановку) * исправлен запуск League of Legends (для исправления запустите автоустановку)
......
...@@ -631,9 +631,14 @@ stop_portwine () { ...@@ -631,9 +631,14 @@ stop_portwine () {
if [[ "$int_xneur" == "1" ]] ; then if [[ "$int_xneur" == "1" ]] ; then
xneur & xneur &
fi fi
if [[ "$PW_USE_US_LAYOUT" == "1" ]] ; then if [[ "$PW_USE_US_LAYOUT" == "1" ]] && [[ "${XDG_SESSION_TYPE}" != "wayland" ]] && command -v setxkbmap &>/dev/null ; then
setxkbmap setxkbmap
fi fi
if [[ "${PW_RESTORE_RESOLUTION}" == "1" ]] && [[ "${XDG_SESSION_TYPE}" != "wayland" ]] && command -v xrandr &>/dev/null ; then
RESOLUTION=$(sed -n '1p' "${PORT_WINE_TMP_PATH}/tmp_screen_configuration")
OUTPUT_SCREEN=$(sed -n '2p' "${PORT_WINE_TMP_PATH}/tmp_screen_configuration")
xrandr --output "$OUTPUT_SCREEN" --mode "$RESOLUTION"
fi
pw_stop_progress_bar pw_stop_progress_bar
try_remove_file "${PORT_SCRIPTS_PATH}/0" try_remove_file "${PORT_SCRIPTS_PATH}/0"
try_remove_file "${PORT_SCRIPTS_PATH}/1" try_remove_file "${PORT_SCRIPTS_PATH}/1"
......
...@@ -147,7 +147,8 @@ if [[ "${update_loc}" == "RUS" ]] ; then ...@@ -147,7 +147,8 @@ if [[ "${update_loc}" == "RUS" ]] ; then
export PW_USE_FAKE_DLSS_INFO='Включить транслятор DLSS в FSR 2 в играх DirectX 12 (проект CyberFSR2)' export PW_USE_FAKE_DLSS_INFO='Включить транслятор DLSS в FSR 2 в играх DirectX 12 (проект CyberFSR2)'
export PW_USE_EAC_AND_BE_INFO='Включить Easy Anti-Cheat and BattlEye Anti-Cheat (требуется если игра использует какой-то из этих античитов)' export PW_USE_EAC_AND_BE_INFO='Включить Easy Anti-Cheat and BattlEye Anti-Cheat (требуется если игра использует какой-то из этих античитов)'
export PW_REDUCE_PULSE_LATENCY_INFO='Уменьшить задержку pulseaudio для исправления прерывистого звука' export PW_REDUCE_PULSE_LATENCY_INFO='Уменьшить задержку pulseaudio для исправления прерывистого звука'
export PW_USE_US_LAYOUT_INFO='Работает только под x11. Принудительное использование английской раскладки (полезно для игр в которых управление верно работает исключительно на английской раскладке)' export PW_USE_US_LAYOUT_INFO='Принудительное использование английской раскладки (полезно для игр в которых управление верно работает исключительно на английской раскладке)'
export PW_RESTORE_RESOLUTION_INFO='Запомнить разрешение экрана при запуске игры и вернуть при закрытие (полезно для игр которые при закрытие меняют разрешение экрана)'
export PW_USE_SYSTEM_VK_LAYERS_INFO='Использовать системные mangohud, vkBasalt, obs-vkcapture и прочие приложения использующие vulkan layers' export PW_USE_SYSTEM_VK_LAYERS_INFO='Использовать системные mangohud, vkBasalt, obs-vkcapture и прочие приложения использующие vulkan layers'
export PW_USE_OBS_VKCAPTURE_INFO='Включить возможность записи в OBS Studio с помощью obs-vkcapture (ВНИМАНИЕ: будет включено принудительное использование системных mangohud, vkBasalt, obs-vkcapture и прочих приложений использующих vulkan layers)' export PW_USE_OBS_VKCAPTURE_INFO='Включить возможность записи в OBS Studio с помощью obs-vkcapture (ВНИМАНИЕ: будет включено принудительное использование системных mangohud, vkBasalt, obs-vkcapture и прочих приложений использующих vulkan layers)'
export PW_USE_GALLIUM_ZINK_INFO='Использовать драйвер zink (OpenGL поверх Vulkan), позволяет использовать vkBasalt в играх на OpenGL (ВНИМАНИЕ: необходима поддержка vulkan, используется wined3d (opengl) вместо dxvk, подходит для игр на OpenGL и старых версий DirectX, на более новых версиях DirectX возможны артефакты)' export PW_USE_GALLIUM_ZINK_INFO='Использовать драйвер zink (OpenGL поверх Vulkan), позволяет использовать vkBasalt в играх на OpenGL (ВНИМАНИЕ: необходима поддержка vulkan, используется wined3d (opengl) вместо dxvk, подходит для игр на OpenGL и старых версий DirectX, на более новых версиях DirectX возможны артефакты)'
...@@ -208,7 +209,61 @@ if [[ "${update_loc}" == "RUS" ]] ; then ...@@ -208,7 +209,61 @@ if [[ "${update_loc}" == "RUS" ]] ; then
export PW_StageDepth_INFO='Позволяет добавлять новые элементы в 3d-пространство внутри игры и применять пользовательские текстуры' export PW_StageDepth_INFO='Позволяет добавлять новые элементы в 3d-пространство внутри игры и применять пользовательские текстуры'
export PW_PPFX_Bloom_INFO='Добавляет Bloom эффект' export PW_PPFX_Bloom_INFO='Добавляет Bloom эффект'
export PW_WAYLAND_INFO="Внимание! Вы запускаете ${portname} в сессии Wayland, некоторые функции могут быть недоступны!\nРекомендуется перезапустить сессию в X11!" export ENABLE_MANGOHUD_INFO='Включите MangoHud по умолчанию (горячие клавиши R_SHIFT + F12 отключают MangoHud).'
export PW_MH_arch_INFO='Показывает, является ли приложение 32-разрядным или 64-разрядным'
export PW_MH_battery_INFO='Display current battery percent and energy consumption'
export PW_MH_battery_icon_INFO='Отображение текущего процента заряда батареи и энергопотребления'
export PW_MH_battery_time_INFO='Отображение оставшегося времени работы от аккумулятора'
export PW_MH_battery_watt_INFO='Отображать мощность для опции батареи'
export PW_MH_core_bars_INFO='Измените отображение core_load с цифр на вертикальные полосы'
export PW_MH_core_load_INFO='Отображать нагрузку и частоту на ядро'
export PW_MH_cpu_mhz_INFO='Показывает текущую частоту процессора в МГц'
export PW_MH_cpu_power_INFO='Отображать потребляемую процессором мощность в ваттах'
export PW_MH_cpu_temp_INFO='Отображение текущей температуры процессора'
export PW_MH_device_battery_icon_INFO='Отобразите значок батареи беспроводного устройства.'
export PW_MH_engine_short_names_INFO='Отобразите краткую версию используемого движка (например, OGL вместо OpenGL).'
export PW_MH_engine_version_INFO='Отображать версию OpenGL или vulkan и движков рендеринга на основе vulkan'
export PW_MH_exec_name_INFO='Отображать текущее имя исполняемого файла'
export PW_MH_fcat_INFO='Позволяет анализировать захват кадра'
export PW_MH_fps_metrics_INFO='Принимает список десятичных значений или значение avg, например avg,0,001'
export PW_MH_fps_only_INFO='Показывать только FPS. <b>Не предназначен для использования с другими параметрами</b>'
export PW_MH_frame_count_INFO='Показывать FPS'
export PW_MH_full_INFO='Включите большинство переключаемых параметров (в настоящее время исключается гистограмма)'
export PW_MH_gamemode_INFO='Отображает активность gamemode'
export PW_MH_gpu_core_clock_INFO='Отображение частоты ядра графического процессора'
export PW_MH_gpu_fan_INFO='Скорость врашение кулеров графического процессора'
export PW_MH_gpu_junction_temp_INFO='Отображение текущей температуры графического процессора'
export PW_MH_gpu_mem_clock_INFO='Отображение частоты памяти графического процессора'
export PW_MH_gpu_mem_temp_INFO='Отображение текущей температуры графического процессора'
export PW_MH_gpu_name_INFO='Отобразить имя графического процессора из pci.ids'
export PW_MH_gpu_power_INFO='Отображение потребляемой мощности графического процессора в ваттах'
export PW_MH_gpu_temp_INFO='Отображение текущей температуры графического процессора'
export PW_MH_gpu_voltage_INFO='Отображение напряжения на графическом процессоре (работает только на графических процессорах AMD'
export PW_MH_histogram_INFO='Измените график FPS на гистограмму'
export PW_MH_horizontal_INFO='Отображение Mangohud в горизонтальном положении'
export PW_MH_horizontal_stretch_INFO='Растягивает фон до ширины экрана в горизонтальном режиме'
export PW_MH_hud_compact_INFO='Отображать компактную версию MangoHud'
export PW_MH_hud_no_margin_INFO='Удалите отступы вокруг MangoHud'
export PW_MH_io_read_INFO='Показать некэшированное чтение IO, в МБ/с'
export PW_MH_io_write_INFO='Показать некэшированные записи, в МБ/с'
export PW_MH_no_display_INFO='Скрыть MangoHud по умолчанию'
export PW_MH_no_small_font_INFO='Используйте основной размер шрифта для мелкого текста, например, единиц измерения'
export PW_MH_procmem_INFO='Отображает использование памяти процесса: resident, а также включает другие, если они отключены'
export PW_MH_procmem_shared_INFO='Отображает использование памяти процесса: shared'
export PW_MH_procmem_virt_INFO='Отображает использование памяти процесса: virtual'
export PW_MH_ram_INFO='Отображение использования оперативной памяти системы'
export PW_MH_resolution_INFO='Отображение текущего разрешения экрана'
export PW_MH_show_fps_limit_INFO='Отображение текущего ограничения FPS'
export PW_MH_swap_INFO='Отображение использования пространства для свопа рядом с использованием системной оперативной памяти'
export PW_MH_temp_fahrenheit_INFO='Показывать температуру в градусах Фаренгейта'
export PW_MH_throttling_status_INFO='Показывает, сбрасывает ли GPU мощность, ток, температуру или "другое" (показывает только, если сбрасывание происходит в данный момент). В настоящее время отключено по умолчанию для Nvidia, так как вызывает задержки на 3000-й серии.'
export PW_MH_throttling_status_graph_INFO='То же, что и throttling_status, но отображает throttling на графике времени кадра и только throttling мощности и температуры.'
export PW_MH_time_INFO='Отоброжение времени'
export PW_MH_version_INFO='Показать текущую версию MangoHud'
export PW_MH_vkbasalt_INFO='Показать включён ли vkBasalt'
export PW_MH_vram_INFO='Отображение использования VRAM'
export PW_MH_vulkan_driver_INFO='Отображает используемый драйвер vulkan (radv/amdgpu-pro/amdvlk)'
export PW_MH_wine_INFO='Показать используемую версию Wine или Proton'
export PW_PFX_BACKUP_INFO="Внимание! Не передавайте резевную копию третьим лицам, есть риск потери аккаунтов" export PW_PFX_BACKUP_INFO="Внимание! Не передавайте резевную копию третьим лицам, есть риск потери аккаунтов"
export PW_PFX_BACKUP_SUCCESS="Резервная копия префикса: \"${PW_PREFIX_NAME}\" успешно создана" export PW_PFX_BACKUP_SUCCESS="Резервная копия префикса: \"${PW_PREFIX_NAME}\" успешно создана"
...@@ -310,6 +365,10 @@ if [[ "${update_loc}" == "RUS" ]] ; then ...@@ -310,6 +365,10 @@ if [[ "${update_loc}" == "RUS" ]] ; then
export loc_gui_disabled_vkbas_help="Выключить vkBasalt и перейти в предыдущее меню." export loc_gui_disabled_vkbas_help="Выключить vkBasalt и перейти в предыдущее меню."
export loc_gui_vkbasalt_top="Настройки vkBasalt для добавления эффектов в играх работающих под Vulkan. (Клавиша <b>HOME</b> отключает vkbasalt)\n<b>ПРИМЕЧАНИЕ:</b> Для вывода справки по каждому пункту, просто наведите курсор мыши на текст.\n" export loc_gui_vkbasalt_top="Настройки vkBasalt для добавления эффектов в играх работающих под Vulkan. (Клавиша <b>HOME</b> отключает vkbasalt)\n<b>ПРИМЕЧАНИЕ:</b> Для вывода справки по каждому пункту, просто наведите курсор мыши на текст.\n"
export loc_gui_disabled_mh="ВЫКЛЮЧИТЬ MANGOHUD"
export loc_gui_disabled_mh_help="Выключить MangoHud и перейти в предыдущее меню."
export loc_gui_mh_top="Настройки MangoHud (Клавишы <b>R_SHIFT + F12</b> отключают MangoHud)\n<b>ПРИМЕЧАНИЕ:</b> Для вывода справки по каждому пункту, просто наведите курсор мыши на текст.\n"
export loc_gui_no="НЕТ" export loc_gui_no="НЕТ"
export loc_gui_yes="ДА" export loc_gui_yes="ДА"
...@@ -320,6 +379,8 @@ if [[ "${update_loc}" == "RUS" ]] ; then ...@@ -320,6 +379,8 @@ if [[ "${update_loc}" == "RUS" ]] ; then
export loc_gui_debug="СОЗДАТЬ ЛОГ" export loc_gui_debug="СОЗДАТЬ ЛОГ"
export loc_gui_edit_db_start="НАСТРОИТЬ" export loc_gui_edit_db_start="НАСТРОИТЬ"
export loc_gui_vkbasalt_start="VKBASALT" export loc_gui_vkbasalt_start="VKBASALT"
export loc_gui_mh_start="MANGOHUD"
export loc_gui_db_comments="Найден файл настроек ${portname} для" export loc_gui_db_comments="Найден файл настроек ${portname} для"
export loc_gui_vulkan_stable="Стабильные DXVK ${DXVK_STABLE_VER} и VKD3D ${VKD3D_STABLE_VER}" export loc_gui_vulkan_stable="Стабильные DXVK ${DXVK_STABLE_VER} и VKD3D ${VKD3D_STABLE_VER}"
...@@ -476,7 +537,8 @@ elif [[ "${update_loc}" == "ENG" ]] ; then ...@@ -476,7 +537,8 @@ elif [[ "${update_loc}" == "ENG" ]] ; then
export PW_USE_FAKE_DLSS_INFO='Enable DLSS translator in FSR 2 in DirectX 12 games (CyberFSR2)' export PW_USE_FAKE_DLSS_INFO='Enable DLSS translator in FSR 2 in DirectX 12 games (CyberFSR2)'
export PW_USE_EAC_AND_BE_INFO='Enable Easy Anti-Cheat and BattlEye Anti-Cheat runtimes (required if game used this anti-cheats)' export PW_USE_EAC_AND_BE_INFO='Enable Easy Anti-Cheat and BattlEye Anti-Cheat runtimes (required if game used this anti-cheats)'
export PW_REDUCE_PULSE_LATENCY_INFO='Reduce pulseaudio latency to fix intermittent sound' export PW_REDUCE_PULSE_LATENCY_INFO='Reduce pulseaudio latency to fix intermittent sound'
export PW_USE_US_LAYOUT_INFO='Works only x11. Forced use of the us layout (useful for games in which the control works correctly only on the us layout)' export PW_USE_US_LAYOUT_INFO='Forced use of the us layout (useful for games in which the control works correctly only on the us layout)'
export PW_RESTORE_RESOLUTION_INFO='Remember the screen resolution when starting the game and return it when closing (useful for games that change the screen resolution when closing)'
export PW_USE_SYSTEM_VK_LAYERS_INFO='Use system mangohud, vkBasalt, obs-vkcapture and other applications using vulkan layers' export PW_USE_SYSTEM_VK_LAYERS_INFO='Use system mangohud, vkBasalt, obs-vkcapture and other applications using vulkan layers'
export PW_USE_OBS_VKCAPTURE_INFO='Enable the ability to write to OBS Studio using obs-vkcapture (ATTENTION: the forced use of system mangohud, vkBasalt, obs-vkcapture and other applications using vulkan layers will be enabled)' export PW_USE_OBS_VKCAPTURE_INFO='Enable the ability to write to OBS Studio using obs-vkcapture (ATTENTION: the forced use of system mangohud, vkBasalt, obs-vkcapture and other applications using vulkan layers will be enabled)'
export PW_USE_GALLIUM_ZINK_INFO='Use the zink driver (OpenGL on top of Vulkan), allows you to use vkBasalt in OpenGL games (ATTENTION: vulkan support is required, wined3d (opengl) is used instead of dxvk, suitable for games on OpenGL and older versions of DirectX, artifacts are possible on newer versions of DirectX)' export PW_USE_GALLIUM_ZINK_INFO='Use the zink driver (OpenGL on top of Vulkan), allows you to use vkBasalt in OpenGL games (ATTENTION: vulkan support is required, wined3d (opengl) is used instead of dxvk, suitable for games on OpenGL and older versions of DirectX, artifacts are possible on newer versions of DirectX)'
...@@ -536,7 +598,61 @@ elif [[ "${update_loc}" == "ENG" ]] ; then ...@@ -536,7 +598,61 @@ elif [[ "${update_loc}" == "ENG" ]] ; then
export PW_StageDepth_INFO='Allows you to add new elements to the 3d space inside the game and apply custom textures' export PW_StageDepth_INFO='Allows you to add new elements to the 3d space inside the game and apply custom textures'
export PW_PPFX_Bloom_INFO='Adds a Bloom effect' export PW_PPFX_Bloom_INFO='Adds a Bloom effect'
export PW_WAYLAND_INFO="Attention! You are running $portname in a Wayland session, some features may not be available!\nRestarting your session in X11 is recommended!" export ENABLE_MANGOHUD_INFO='Включите MangoHud по умолчанию (горячие клавиши R_SHIFT + F12 отключают MangoHud)'
export PW_MH_arch_INFO='Show if the application is 32- or 64-bit'
export PW_MH_battery_INFO='Display current battery percent and energy consumption'
export PW_MH_battery_icon_INFO='Display battery icon instead of percent'
export PW_MH_battery_time_INFO='Display remaining time for battery option'
export PW_MH_battery_watt_INFO='Display wattage for the battery option'
export PW_MH_core_bars_INFO='Change the display of core_load from numbers to vertical bars'
export PW_MH_core_load_INFO='Display load & frequency per core'
export PW_MH_cpu_mhz_INFO='Show the CPUs current MHz'
export PW_MH_cpu_power_INFO='Display CPU draw in watts'
export PW_MH_cpu_temp_INFO='Display current CPU temperature'
export PW_MH_device_battery_icon_INFO='Display wirless device battery icon.'
export PW_MH_engine_short_names_INFO='Display a short version of the used engine (e.g. OGL instead of OpenGL)'
export PW_MH_engine_version_INFO='Display OpenGL or vulkan and vulkan-based render engines version'
export PW_MH_exec_name_INFO='Display current exec name'
export PW_MH_fcat_INFO='Enables frame capture analysis'
export PW_MH_fps_metrics_INFO='Takes a list of decimal values or the value avg, e.g avg,0.001'
export PW_MH_fps_only_INFO='Show FPS only. <b>Not meant to be used with other display params</b>'
export PW_MH_frame_count_INFO='Display frame count'
export PW_MH_full_INFO='Enable most of the toggleable parameters (currently excludes histogram)'
export PW_MH_gamemode_INFO='Show if GameMode is on'
export PW_MH_gpu_core_clock_INFO='Display GPU core frequency'
export PW_MH_gpu_fan_INFO='GPU fan in rpm on AMD, FAN in percent on NVIDIA'
export PW_MH_gpu_junction_temp_INFO='Display current GPU temperature'
export PW_MH_gpu_mem_clock_INFO='Display GPU memory frequency'
export PW_MH_gpu_mem_temp_INFO='Display current GPU temperature'
export PW_MH_gpu_name_INFO='Display GPU name from pci.ids'
export PW_MH_gpu_power_INFO='Display GPU draw in watts'
export PW_MH_gpu_temp_INFO='Display current GPU temperature'
export PW_MH_gpu_voltage_INFO='Display GPU voltage (only works on AMD GPUs)'
export PW_MH_histogram_INFO='Change FPS graph to histogram'
export PW_MH_horizontal_INFO='Display Mangohud in a horizontal position'
export PW_MH_horizontal_stretch_INFO='Stretches the background to the screens width in horizontal mode'
export PW_MH_hud_compact_INFO='Display compact version of MangoHud'
export PW_MH_hud_no_margin_INFO='Remove margins around MangoHud'
export PW_MH_io_read_INFO='Show non-cached IO read, in MiB/s'
export PW_MH_io_write_INFO='Show non-cached IO write, in MiB/s'
export PW_MH_no_display_INFO='Hide the HUD by default'
export PW_MH_no_small_font_INFO='Use primary font size for smaller text like units'
export PW_MH_procmem_INFO='Displays process memory usage: resident procmem (resident) also toggles others off if disabled'
export PW_MH_procmem_shared_INFO='Displays process memory usage: shared'
export PW_MH_procmem_virt_INFO='Displays process memory usage: virtual'
export PW_MH_ram_INFO='Display system RAM usage'
export PW_MH_resolution_INFO='Display the current resolution'
export PW_MH_show_fps_limit_INFO='Display the current FPS limit'
export PW_MH_swap_INFO='Display swap space usage next to system RAM usage'
export PW_MH_temp_fahrenheit_INFO='Show temperature in Fahrenheit'
export PW_MH_throttling_status_INFO='Show if GPU is throttling based on Power, current, temp or "other" (Only shows if throttling is currently happening). Currently disabled by default for Nvidia as it causes lag on 3000 series'
export PW_MH_throttling_status_graph_INFO='Same as throttling_status but displays throttling in the frametime graph and only power and temp throttling'
export PW_MH_time_INFO='Display local time'
export PW_MH_version_INFO='Show current MangoHud version'
export PW_MH_vkbasalt_INFO='Show if vkBasalt is on'
export PW_MH_vram_INFO='Display system VRAM usage'
export PW_MH_vulkan_driver_INFO='Display used Vulkan driver (radv/amdgpu-pro/amdvlk)'
export PW_MH_wine_INFO='Show current Wine or Proton version in use'
export PW_PFX_BACKUP_INFO="Attention! Do not pass the resev copy to third parties, there is a risk of losing accounts" export PW_PFX_BACKUP_INFO="Attention! Do not pass the resev copy to third parties, there is a risk of losing accounts"
export PW_PFX_BACKUP_SUCCESS="Prefix backup: \"${PW_PREFIX_NAME}\" has been successfully created" export PW_PFX_BACKUP_SUCCESS="Prefix backup: \"${PW_PREFIX_NAME}\" has been successfully created"
...@@ -637,6 +753,10 @@ A brief instruction: ...@@ -637,6 +753,10 @@ A brief instruction:
export loc_gui_disabled_vkbas="DISABLE VKBASALT" export loc_gui_disabled_vkbas="DISABLE VKBASALT"
export loc_gui_disabled_vkbas_help="Disable vkBasalt and go to the previous menu." export loc_gui_disabled_vkbas_help="Disable vkBasalt and go to the previous menu."
export loc_gui_disabled_mh="DISABLE MANGOHUD"
export loc_gui_disabled_mh_help="Disable MangoHud and go to the previous menu."
export loc_gui_mh_top="MangoHud settings (Keys <b>R_SHIFT + F12</b> disable MangoHud)\n<b>note:</b> To display help for each item, just hover the mouse cursor over the text.\n"
export loc_gui_no="NO" export loc_gui_no="NO"
export loc_gui_yes="YES" export loc_gui_yes="YES"
...@@ -647,6 +767,8 @@ A brief instruction: ...@@ -647,6 +767,8 @@ A brief instruction:
export loc_gui_debug="DEBUG" export loc_gui_debug="DEBUG"
export loc_gui_edit_db_start="EDIT DB" export loc_gui_edit_db_start="EDIT DB"
export loc_gui_vkbasalt_start="VKBASALT" export loc_gui_vkbasalt_start="VKBASALT"
export loc_gui_mh_start="MangoHud"
export loc_gui_vkbasalt_top="vkBasalt settings for adding effects to games running under Vulkan. (The <b>HOME</b> key disables vkbasalt)\n<b>NOTE:</b> To display help for each item, simply hover over the text\n" export loc_gui_vkbasalt_top="vkBasalt settings for adding effects to games running under Vulkan. (The <b>HOME</b> key disables vkbasalt)\n<b>NOTE:</b> To display help for each item, simply hover over the text\n"
export loc_gui_db_comments="${portname} database file was found for" export loc_gui_db_comments="${portname} database file was found for"
......
...@@ -7,7 +7,7 @@ export LAUNCH_PARAMETERS=("/S") ...@@ -7,7 +7,7 @@ export LAUNCH_PARAMETERS=("/S")
export PW_DLL_INSTALL="faudio dotnet48" export PW_DLL_INSTALL="faudio dotnet48"
export PW_VULKAN_USE=1 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." [[ ! -z "$WOSB_VERSION" ]] && print_info "Found version: $WOSB_VERSION" || zenity_error "Error while get version of WOSB INSTALLER."
start_portwine start_portwine
......
...@@ -389,11 +389,17 @@ start_portwine () { ...@@ -389,11 +389,17 @@ start_portwine () {
if [[ "${PW_REDUCE_PULSE_LATENCY}" == 1 ]] ; then if [[ "${PW_REDUCE_PULSE_LATENCY}" == 1 ]] ; then
export PULSE_LATENCY_MSEC=60 export PULSE_LATENCY_MSEC=60
# export PIPEWIRE_LATENCY=128/48000
else else
unset PULSE_LATENCY_MSEC unset PULSE_LATENCY_MSEC
fi fi
if [[ "${PW_USE_US_LAYOUT}" == "1" ]] && ! grep 1 "${PORT_WINE_TMP_PATH}/check_wayland" &>/dev/null ; then if [[ "${PW_RESTORE_RESOLUTION}" == "1" ]] && [[ "${XDG_SESSION_TYPE}" != "wayland" ]] && command -v xrandr &>/dev/null ; then
xrandr | grep -oP 'current\s+\K[0-9]+ x [0-9]+' | tr -d ' ' > "${PORT_WINE_TMP_PATH}/tmp_screen_configuration"
xrandr | grep " connected" | awk '{print $1}' >> "${PORT_WINE_TMP_PATH}/tmp_screen_configuration"
fi
if [[ "$PW_USE_US_LAYOUT" == "1" ]] && [[ "${XDG_SESSION_TYPE}" != "wayland" ]] && command -v setxkbmap &>/dev/null ; then
setxkbmap -model pc101 us -print | xkbcomp - $DISPLAY &>/dev/null setxkbmap -model pc101 us -print | xkbcomp - $DISPLAY &>/dev/null
else else
export PW_USE_US_LAYOUT="0" export PW_USE_US_LAYOUT="0"
...@@ -424,25 +430,14 @@ start_portwine () { ...@@ -424,25 +430,14 @@ start_portwine () {
fi fi
done done
fi fi
print_info "Try link wine DXGI by default..." print_info "Try link wine d3d files by default..."
if ! try_force_link_file "${WINEDIR}"/lib/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/syswow64/dxgi.dll" for rm_vulkan_dll in libvkd3d-1 libvkd3d-shader-1 dxvk_config nvapi nvapi64 d3d12core d3d12 d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d ; do
then try_force_link_file "${WINEDIR}"/lib/wine/i386-windows/dxgi.dll "${WINEPREFIX}/drive_c/windows/syswow64/dxgi.dll" try_remove_file "${WINEPREFIX}/drive_c/windows/system32/${rm_vulkan_dll}.dll"
fi try_remove_file "${WINEPREFIX}/drive_c/windows/syswow64/${rm_vulkan_dll}.dll"
if ! try_force_link_file "${WINEDIR}"/lib64/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/system32/dxgi.dll"
then try_force_link_file "${WINEDIR}"/lib64/wine/x86_64-windows/dxgi.dll "${WINEPREFIX}/drive_c/windows/system32/dxgi.dll"
fi
print_info "Try link wine d3d filese by default..."
for rm_vulkan_dll in libvkd3d-1 libvkd3d-shader-1 dxvk_config nvapi nvapi64 ; do
try_remove_file "${WINEPREFIX}/drive_c/windows/system32/${wine_build_dll}.dll"
try_remove_file "${WINEPREFIX}/drive_c/windows/syswow64/${wine_build_dll}.dll"
done done
for wine_build_dll in d3d12core d3d12 d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d ; do for wine_build_dll in d3d12core d3d12 d3d11 d3d10 d3d10core d3d10_1 d3d9 d3d8 dxgi wined3d ; do
if ! try_force_link_file "${WINEDIR}/lib/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/${wine_build_dll}.dll" try_force_link_file "${WINEDIR}/lib/wine/i386-windows/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/${wine_build_dll}.dll"
then try_force_link_file "${WINEDIR}/lib/wine/i386-windows/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/${wine_build_dll}.dll" try_force_link_file "${WINEDIR}/lib64/wine/x86_64-windows/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/${wine_build_dll}.dll"
fi
if ! try_force_link_file "${WINEDIR}/lib64/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/${wine_build_dll}.dll"
then try_force_link_file "${WINEDIR}/lib64/wine/x86_64-windows/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/${wine_build_dll}.dll"
fi
done done
create_new_dir "${PW_VULKAN_DIR}/opengl" create_new_dir "${PW_VULKAN_DIR}/opengl"
...@@ -521,9 +516,11 @@ start_portwine () { ...@@ -521,9 +516,11 @@ start_portwine () {
print_info "Try link native DXVK files..." print_info "Try link native DXVK files..."
for wine_dxvk_dll in ${CP_DXVK_FILES} ; do for wine_dxvk_dll in ${CP_DXVK_FILES} ; do
if [[ -f "${PATH_TO_DXVK_FILES}/x64/${wine_dxvk_dll}.dll" ]] ; then
try_force_link_file "${PATH_TO_DXVK_FILES}/x32/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/${wine_dxvk_dll}.dll" try_force_link_file "${PATH_TO_DXVK_FILES}/x32/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/${wine_dxvk_dll}.dll"
try_force_link_file "${PATH_TO_DXVK_FILES}/x64/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/${wine_dxvk_dll}.dll" try_force_link_file "${PATH_TO_DXVK_FILES}/x64/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/${wine_dxvk_dll}.dll"
[[ "$?" == 0 ]] && var_winedlloverride_update "${wine_dxvk_dll}=n" var_winedlloverride_update "${wine_dxvk_dll}=n"
fi
done done
try_force_link_file "${PATH_TO_DXVK_FILES}/x32/nvapi.dll" "${WINEPREFIX}/drive_c/windows/syswow64/" || \ try_force_link_file "${PATH_TO_DXVK_FILES}/x32/nvapi.dll" "${WINEPREFIX}/drive_c/windows/syswow64/" || \
...@@ -539,6 +536,7 @@ start_portwine () { ...@@ -539,6 +536,7 @@ start_portwine () {
if [[ -f "${PATH_TO_VKD3D_FILES}/x64/${wine_vkd3d_dll}.dll" ]] ; then if [[ -f "${PATH_TO_VKD3D_FILES}/x64/${wine_vkd3d_dll}.dll" ]] ; then
try_force_link_file "${PATH_TO_VKD3D_FILES}/x86/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/${wine_vkd3d_dll}.dll" try_force_link_file "${PATH_TO_VKD3D_FILES}/x86/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/${wine_vkd3d_dll}.dll"
try_force_link_file "${PATH_TO_VKD3D_FILES}/x64/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/${wine_vkd3d_dll}.dll" try_force_link_file "${PATH_TO_VKD3D_FILES}/x64/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/${wine_vkd3d_dll}.dll"
var_winedlloverride_update "${wine_vkd3d_dll}=n"
fi fi
done done
......
...@@ -23,11 +23,6 @@ fi ...@@ -23,11 +23,6 @@ fi
[[ "$MISSING_DESKTOP_FILE" == 1 ]] && portwine_missing_shortcut [[ "$MISSING_DESKTOP_FILE" == 1 ]] && portwine_missing_shortcut
if [[ "${XDG_SESSION_TYPE}" = "wayland" ]] && [[ ! -f "${PORT_WINE_TMP_PATH}/check_wayland" ]]; then
zenity_info "$PW_WAYLAND_INFO"
echo "1" > "${PORT_WINE_TMP_PATH}/check_wayland"
fi
if [[ -f "${PORT_WINE_TMP_PATH}/tmp_main_gui_size" ]] && [[ ! -z "$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size)" ]] ; then if [[ -f "${PORT_WINE_TMP_PATH}/tmp_main_gui_size" ]] && [[ ! -z "$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size)" ]] ; then
export PW_MAIN_SIZE_W="$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size | awk '{print $1}')" export PW_MAIN_SIZE_W="$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size | awk '{print $1}')"
export PW_MAIN_SIZE_H="$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size | awk '{print $2}')" export PW_MAIN_SIZE_H="$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size | awk '{print $2}')"
...@@ -466,13 +461,22 @@ pw_create_prefix_backup () { ...@@ -466,13 +461,22 @@ pw_create_prefix_backup () {
} }
pw_edit_db () { pw_edit_db () {
if [[ "${XDG_SESSION_TYPE}" == "wayland" ]] ; then
pw_gui_for_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_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_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_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_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 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 [ "$?" == 0 ] ; then else
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_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
print_info "Restarting PP after update ppdb file..." print_info "Restarting PP after update ppdb file..."
/usr/bin/env bash -c ${pw_full_command_line[*]} & /usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0 exit 0
...@@ -624,6 +628,7 @@ if [[ -f "${portwine_exe}" ]] ; then ...@@ -624,6 +628,7 @@ if [[ -f "${portwine_exe}" ]] ; then
--field="PREFIX : :CBE" "${PW_ADD_PREFIXES_TO_GUI}" \ --field="PREFIX : :CBE" "${PW_ADD_PREFIXES_TO_GUI}" \
--field=":LBL" "" \ --field=":LBL" "" \
--button="${loc_gui_vkbasalt_start}"!"$PW_GUI_ICON_PATH/separator.png"!"${ENABLE_VKBASALT_INFO}":120 \ --button="${loc_gui_vkbasalt_start}"!"$PW_GUI_ICON_PATH/separator.png"!"${ENABLE_VKBASALT_INFO}":120 \
--button="${loc_gui_mh_start}"!"$PW_GUI_ICON_PATH/separator.png"!"${ENABLE_MANGOHUD_INFO}":119 \
--button="${loc_gui_edit_db_start}"!"$PW_GUI_ICON_PATH/separator.png"!"${loc_edit_db} ${PORTWINE_DB}":118 \ --button="${loc_gui_edit_db_start}"!"$PW_GUI_ICON_PATH/separator.png"!"${loc_edit_db} ${PORTWINE_DB}":118 \
--button="${PW_SHORTCUT}" \ --button="${PW_SHORTCUT}" \
--button="${loc_gui_debug}"!"$PW_GUI_ICON_PATH/separator.png"!"${loc_debug}":102 \ --button="${loc_gui_debug}"!"$PW_GUI_ICON_PATH/separator.png"!"${loc_debug}":102 \
...@@ -930,6 +935,7 @@ fi ...@@ -930,6 +935,7 @@ fi
open_changelog) open_changelog ;; open_changelog) open_changelog ;;
change_loc) change_loc ;; change_loc) change_loc ;;
120) gui_vkBasalt ;; 120) gui_vkBasalt ;;
119) gui_MangoHud ;;
pw_create_prefix_backup) pw_create_prefix_backup ;; pw_create_prefix_backup) pw_create_prefix_backup ;;
gui_credits) gui_credits ;; gui_credits) gui_credits ;;
pw_start_cont_xterm) pw_start_cont_xterm ;; pw_start_cont_xterm) pw_start_cont_xterm ;;
......
#!/usr/bin/env bash #!/usr/bin/env bash
#Author: Castro-Fidel (linux-gaming.ru) #Author: Castro-Fidel (linux-gaming.ru)
#SCRIPTS_NEXT_VERSION=2239 #SCRIPTS_NEXT_VERSION=2241
######################################################################## ########################################################################
export PW_MANGOHUD=0 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 export DEFAULT_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,gamemode
#export PW_XKBD_RU_HACK=1 #export PW_XKBD_RU_HACK=1
export PW_RT_MOUNT_RO=("") export PW_RT_MOUNT_RO=("")
export PW_RT_MOUNT_RW=("/media" "/mnt" "/run/media/${USER}" "${PORT_WINE_PATH}") export PW_RT_MOUNT_RW=("/media" "/mnt" "/run/media/${USER}" "${PORT_WINE_PATH}")
......
...@@ -148,11 +148,6 @@ pw_tray_icon () { ...@@ -148,11 +148,6 @@ pw_tray_icon () {
pw_gui_for_edit_db () { pw_gui_for_edit_db () {
KEY_EDIT_DB_GUI=$RANDOM KEY_EDIT_DB_GUI=$RANDOM
if [[ "${MANGOHUD_CONFIG}" == *fps_limit=[0-9]* ]] ; then
FPS_LIMIT_VAR="$(echo ${MANGOHUD_CONFIG} | sed 's/.*fps_limit=//' | awk -F, '{print $1}')"
else
FPS_LIMIT_VAR="disabled"
fi
if [[ "${PW_WINE_CPU_TOPOLOGY}" == *[0-9]:* ]] && [[ "${PW_WINE_CPU_TOPOLOGY}" != "disabled" ]] ; then if [[ "${PW_WINE_CPU_TOPOLOGY}" == *[0-9]:* ]] && [[ "${PW_WINE_CPU_TOPOLOGY}" != "disabled" ]] ; then
CPU_LIMIT_VAR="`echo ${PW_WINE_CPU_TOPOLOGY%%:*}`" CPU_LIMIT_VAR="`echo ${PW_WINE_CPU_TOPOLOGY%%:*}`"
else else
...@@ -172,7 +167,6 @@ pw_gui_for_edit_db () { ...@@ -172,7 +167,6 @@ pw_gui_for_edit_db () {
GET_GPU_NAMES=$("$PW_VULKANINFO_PORTABLE" 2>/dev/null | awk -F '=' '/deviceName/{print $2}' | sed '/llvm/d'| sort -u | sed 's/^ //' | paste -sd '!') GET_GPU_NAMES=$("$PW_VULKANINFO_PORTABLE" 2>/dev/null | awk -F '=' '/deviceName/{print $2}' | sed '/llvm/d'| sort -u | sed 's/^ //' | paste -sd '!')
GET_REFRASH_RATE="30!45!60!75!120!144!165!240"
logical_cores=$(grep -c "^processor" /proc/cpuinfo) logical_cores=$(grep -c "^processor" /proc/cpuinfo)
if [[ "${logical_cores}" -le "4" ]] ; then if [[ "${logical_cores}" -le "4" ]] ; then
...@@ -217,7 +211,6 @@ pw_gui_for_edit_db () { ...@@ -217,7 +211,6 @@ pw_gui_for_edit_db () {
--field=":LBL" "" \ --field=":LBL" "" \
--field="${loc_gui_cpu_limit}!${loc_gui_cpu_limit_help} :CB" "${CPU_LIMIT_VAR}!disabled!${GET_LOGICAL_CORE}" \ --field="${loc_gui_cpu_limit}!${loc_gui_cpu_limit_help} :CB" "${CPU_LIMIT_VAR}!disabled!${GET_LOGICAL_CORE}" \
--field="${loc_gui_gpu_select}!${loc_gui_gpu_select_help} :CB" "${GPU_VAR}!disabled!${GET_GPU_NAMES}" \ --field="${loc_gui_gpu_select}!${loc_gui_gpu_select_help} :CB" "${GPU_VAR}!disabled!${GET_GPU_NAMES}" \
--field="${loc_gui_mango_fps}!${loc_gui_mango_fps_help} :CB" "${FPS_LIMIT_VAR}!disabled!${GET_REFRASH_RATE}" \
--field="${loc_gui_arg_gamescope}!${loc_gui_arg_gamescope_help} :CBE" "\\${GAMESCOPE_ARGS}!-r 60 -F fsr!" 2>/dev/null 1> "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" 2>/dev/null & --field="${loc_gui_arg_gamescope}!${loc_gui_arg_gamescope_help} :CBE" "\\${GAMESCOPE_ARGS}!-r 60 -F fsr!" 2>/dev/null 1> "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" 2>/dev/null &
"${pw_yad_v12_3}" --paned --key="$KEY_EDIT_DB_GUI" --title "EDIT_DB" --text-align=center --height="800" \ "${pw_yad_v12_3}" --paned --key="$KEY_EDIT_DB_GUI" --title "EDIT_DB" --text-align=center --height="800" \
...@@ -254,26 +247,16 @@ pw_gui_for_edit_db () { ...@@ -254,26 +247,16 @@ pw_gui_for_edit_db () {
LAUNCH_PARAMETERS=`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $5}'` LAUNCH_PARAMETERS=`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $5}'`
CPU_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $7}'`" CPU_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $7}'`"
PW_GPU_USE="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $8}'`" PW_GPU_USE="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $8}'`"
FPS_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $9}'`" GAMESCOPE_ARGS="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $9}'`"
GAMESCOPE_ARGS="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $10}'`"
# PW_AMD_VULKAN_USE="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $10}'`" # PW_AMD_VULKAN_USE="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $10}'`"
if [[ "${FPS_LIMIT}" != "disabled" ]] && [[ "${FPS_LIMIT_VAR}" != "disabled" ]] ; then
export MANGOHUD_CONFIG="$(echo ${MANGOHUD_CONFIG} | sed "s/fps_limit=${FPS_LIMIT_VAR}/fps_limit=${FPS_LIMIT}/")"
export PW_MANGOHUD=1
elif [[ "${FPS_LIMIT}" != "disabled" ]] && [[ "${FPS_LIMIT_VAR}" == "disabled" ]] ; then
export MANGOHUD_CONFIG=${MANGOHUD_CONFIG},fps_limit=${FPS_LIMIT}
export PW_MANGOHUD=1
elif [[ "${FPS_LIMIT}" == "disabled" ]] ; then
export MANGOHUD_CONFIG="$(echo ${MANGOHUD_CONFIG} | sed "s/,fps_limit=${FPS_LIMIT_VAR}//" | sed "s/,fps_limit=//")"
fi
if [[ "${CPU_LIMIT}" != "disabled" ]] ; then if [[ "${CPU_LIMIT}" != "disabled" ]] ; then
export PW_WINE_CPU_TOPOLOGY="${CPU_LIMIT}:$(seq -s, 0 $((${CPU_LIMIT} - 1)))" export PW_WINE_CPU_TOPOLOGY="${CPU_LIMIT}:$(seq -s, 0 $((${CPU_LIMIT} - 1)))"
else else
export PW_WINE_CPU_TOPOLOGY="disabled" export PW_WINE_CPU_TOPOLOGY="disabled"
fi fi
echo "pw_gui_for_edit_db PORTWINE_DB_FILE=$PORTWINE_DB_FILE" echo "pw_gui_for_edit_db PORTWINE_DB_FILE=$PORTWINE_DB_FILE"
edit_db_from_gui $@ MANGOHUD_CONFIG LAUNCH_PARAMETERS PW_WINDOWS_VER PW_DLL_INSTALL WINEDLLOVERRIDES PW_WINE_CPU_TOPOLOGY GAMESCOPE_ARGS edit_db_from_gui $@ LAUNCH_PARAMETERS PW_WINDOWS_VER PW_DLL_INSTALL WINEDLLOVERRIDES PW_WINE_CPU_TOPOLOGY GAMESCOPE_ARGS
edit_user_conf_from_gui PW_GPU_USE edit_user_conf_from_gui PW_GPU_USE
# PW_AMD_VULKAN_USE # PW_AMD_VULKAN_USE
return 0 return 0
...@@ -510,6 +493,114 @@ gui_vkBasalt () { ...@@ -510,6 +493,114 @@ gui_vkBasalt () {
exit 0 exit 0
} }
gui_MangoHud() {
KEY_MH_GUI=$RANDOM
LIST_MH=(
arch battery battery_icon battery_time battery_watt core_bars core_load
cpu_mhz cpu_power cpu_temp device_battery_icon engine_short_names
engine_version exec_name fcat fps_metrics fps_only frame_count full
gamemode gpu_core_clock gpu_fan gpu_junction_temp gpu_mem_clock
gpu_mem_temp gpu_name gpu_power gpu_temp gpu_voltage histogram horizontal
horizontal_stretch hud_compact hud_no_margin io_read io_write no_display
no_small_font procmem procmem_shared procmem_virt ram resolution
show_fps_limit swap temp_fahrenheit throttling_status throttling_status_graph
time version vkbasalt vram vulkan_driver wine
)
unset ADD_GUI_MH GUI_MH_RESULT
GET_REFRASH_RATE="30!45!60!75!120!144!165!240"
if [[ -z "$FPS_LIMIT" ]]; then
FPS_LIMIT_VAR="disabled"
else
FPS_LIMIT_VAR="${FPS_LIMIT}"
fi
if [ -n "$MANGOHUD_CONFIG" ]; then
PW_MANGOHUD_CONFIG=($(echo "$MANGOHUD_CONFIG" | tr ',' '\n' | grep -v '='))
else
PW_MANGOHUD_CONFIG=($(echo "$DEFAULT_MANGOHUD_CONFIG" | tr ',' '\n' | grep -v '='))
fi
for add_list_mh in "${LIST_MH[@]}"; do
PW_MH_GUI_HELP="PW_MH_${add_list_mh}_INFO"
if [[ -n "$(grep -wo "$add_list_mh" <<<"${PW_MANGOHUD_CONFIG[@]}")" ]]; then
ADD_GUI_MH+="--field=$add_list_mh!${!PW_MH_GUI_HELP}:CHK%TRUE%"
else
ADD_GUI_MH+="--field=$add_list_mh!${!PW_MH_GUI_HELP}:CHK%FALSE%"
fi
done
export old_IFS=$IFS
export IFS="%"
"${pw_yad_v12_3}" --plug=$KEY_MH_GUI --tabnum="1" --form --columns=5 --separator=" " \
--text-align=center --text="$loc_gui_mh_top" \
${ADD_GUI_MH} 1> "${PORT_WINE_TMP_PATH}/tmp_yad_mh_set" 2>/dev/null &
export IFS="${old_IFS}"
"${pw_yad_v12_3}" --plug=$KEY_MH_GUI --tabnum="2" --separator=" " --form \
--field="${loc_gui_mango_fps}!${loc_gui_mango_fps_help} :CB" "${FPS_LIMIT_VAR}!disabled!${GET_REFRASH_RATE}" \
1> "${PORT_WINE_TMP_PATH}/tmp_yad_mh_fps_limit" 2>/dev/null &
"${pw_yad_v12_3}" --paned --key="$KEY_MH_GUI" --height="650" --title="MangoHud" --center --borders=3 \
--separator=" " --window-icon="$PW_GUI_ICON_PATH/port_proton.png" \
--button="$loc_gui_cancel"!!"$loc_gui_cancel_help":1 \
--button="$loc_gui_disabled_mh"!!"$loc_gui_disabled_mh_help":183 \
--button="$loc_gui_save_changes"!!"$loc_gui_save_changes_help":184 2>/dev/null
YAD_MANGOHUD_STATUS="$?"
case "${YAD_MANGOHUD_STATUS}" in
1 | 252)
/usr/bin/env bash -c "${pw_full_command_line[*]}" &
exit 0
;;
183)
export PW_MANGOHUD=0
;;
184)
export PW_MANGOHUD=1
;;
esac
YAD_MH_SET=$(<"${PORT_WINE_TMP_PATH}/tmp_yad_mh_set")
FPS_LIMIT=$(<"${PORT_WINE_TMP_PATH}/tmp_yad_mh_fps_limit")
if command -v xrand 2>/dev/null; then
MONITOR_HEIGHT=$(xrandr | grep -oP 'current\s+\K[0-9]+ x [0-9]+' | awk '{print $3}')
MH_FONT_SIZE="font_size=$(expr $MONITOR_HEIGHT / 45)"
fi
INT_COUNT_FX=0
for read_list_mh in ${YAD_MH_SET}; do
if [[ "$read_list_mh" == "TRUE" ]]; then
export GUI_MH_RESULT+="${LIST_MH[$INT_COUNT_FX]},"
fi
export INT_COUNT_FX=$((INT_COUNT_FX + 1))
done
if [ -n "$MH_FONT_SIZE" ]; then
GUI_MH_RESULT="${GUI_MH_RESULT}${MH_FONT_SIZE}"
else
GUI_MH_RESULT="${GUI_MH_RESULT%,}"
fi
if [[ "${FPS_LIMIT}" != "disabled" ]] ; then
export GUI_MH_RESULT=${GUI_MH_RESULT},fps_limit=${FPS_LIMIT}
export PW_MANGOHUD=1
elif [[ "${FPS_LIMIT}" == "disabled" ]] ; then
export GUI_MH_RESULT="$(echo ${GUI_MH_RESULT} | sed "s/,fps_limit=${FPS_LIMIT_VAR}//" | sed "s/,fps_limit=//")"
fi
export MANGOHUD_CONFIG="${GUI_MH_RESULT}"
edit_db_from_gui MANGOHUD_CONFIG PW_MANGOHUD FPS_LIMIT
/usr/bin/env bash -c "${pw_full_command_line[*]}" &
exit 0
}
portwine_create_shortcut () { portwine_create_shortcut () {
pw_create_gui_png pw_create_gui_png
pw_stop_progress_bar pw_stop_progress_bar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment