Commit 791c25a8 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Scripts version 2246

parent 2fb4fd49
......@@ -2,6 +2,14 @@ You can help us in the development of the project on the website: https://linux-
----------------------------------------
Changelog:
###Scripts version 2246### Date: 20.01.2024 / Download update size: 8 megabytes
* HOTFIX - fixed the launch of Modern Warships after its update
* HOTFIX - fixed launch with gamescope
* the REDUCE_PULSE_LATENCY variable was returned to the settings when running on wayland
* by default, when creating a shortcut, the option "create a shortcut for STEAM" is deselected
* the PW_RESTORE_RESOLUTION setting is replaced with an automatic return to the original resolution of the main monitor after the game is completed
* improved automatic font size adjustment in MANGOHUD (when using more than one monitor)
###Scripts version 2245### Date: 19.01.2024 / Download update size: 350 megabytes
* updated WINE_LG to version 9-0 and added fonts from proton steam
* The libs_v46 container library package has been updated
......
......@@ -2,6 +2,14 @@
-----------------------------------------
История изменений:
###Scripts version 2246### Дата: 20.01.2024 / Размер скачиваемого обновления: 8 мегабайт
* HOTFIX - исправлен запуск Modern Warships после его обновления
* HOTFIX - исправлен запуск с gamescope
* возвращена переменная REDUCE_PULSE_LATENCY в настройки при запуске на wayland
* по умолчанию при создании ярлыка снят выбор с пункта "создать ярлык для STEAM"
* заменена настройка PW_RESTORE_RESOLUTION на автоматический возврат исходного разрешения главного монитора после завершения игры
* улучшена автоматическая настройка размера шрифта в MANGOHUD (при использовании более одного монитора)
###Scripts version 2245### Дата: 19.01.2024 / Размер скачиваемого обновления: 350 мегабайт
* обновлен WINE_LG до версии 9-0 и добавлены шрифты из proton steam
* обновлен пакет библиотек контейнера libs_v46
......
......@@ -635,10 +635,10 @@ stop_portwine () {
if [[ "$PW_USE_US_LAYOUT" == "1" ]] && [[ "${XDG_SESSION_TYPE}" != "wayland" ]] && command -v setxkbmap &>/dev/null ; then
setxkbmap
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"
if [[ "${XDG_SESSION_TYPE}" != "wayland" ]] \
&& [[ "$(xrandr | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')" != "$PW_SCREEN_RESOLUTION" ]]
then
xrandr --output "$PW_SCREEN_PRIMARY" --mode "$PW_SCREEN_RESOLUTION"
fi
pw_stop_progress_bar
try_remove_file "${PORT_SCRIPTS_PATH}/0"
......
#!/usr/bin/env bash
#Author: ValoKarDin
#modern_warships_pp.exe
#Modern Warships.exe
#Rating=5
export PW_COMMENT_DB="Modern Warships"
################################################
......
......@@ -10,7 +10,7 @@ start_portwine
if try_download_game "https://gdn.gaijin.net/launcher/current.php?id=ModernWarshipsLauncher" "${PW_AUTOINSTALL_EXE}"
then
pw_start_progress_bar_block "Starting Modern Warships installation..."
pw_start_progress_bar_block "${loc_gui_installing_the} Modern Warships. ${loc_gui_please_wait} "
pw_kill_autostart launcher.exe &
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe="$WINEPREFIX/drive_c/users/$USER/AppData/Local/ModernWarships/launcher.exe"
......
......@@ -391,11 +391,6 @@ start_portwine () {
unset PULSE_LATENCY_MSEC
fi
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
else
......@@ -688,6 +683,7 @@ pw_run () {
echo "Log WINE:" >> "${PW_LOG_TO_FILE}"
echo ""
print_debug "Log from RUNTIME and WINE:"
${PW_RUN_GAMESCOPE} \
${pw_runtime} \
env PATH="${PATH}" \
LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \
......@@ -695,7 +691,6 @@ pw_run () {
VK_LAYER_PATH="${PW_VK_LAYER_PATH}" \
VK_INSTANCE_LAYERS=${PW_VK_INSTANCE_LAYERS} \
${PW_GAMEMODERUN_SLR} \
${PW_RUN_GAMESCOPE} \
${PW_MANGOHUD_SLR} \
"${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
else
......@@ -706,6 +701,7 @@ pw_run () {
echo ""
echo "Log WINE:" > "${PW_LOG_TO_FILE}"
print_debug "Log from RUNTIME and WINE:"
${PW_RUN_GAMESCOPE} \
${pw_runtime} \
env PATH="${PATH}" \
LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \
......@@ -713,7 +709,6 @@ pw_run () {
VK_LAYER_PATH="${PW_VK_LAYER_PATH}" \
VK_INSTANCE_LAYERS="${PW_VK_INSTANCE_LAYERS}" \
${PW_GAMEMODERUN_SLR} \
${PW_RUN_GAMESCOPE} \
${PW_MANGOHUD_SLR} \
"${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
cat "${PW_LOG_TO_FILE}"
......@@ -786,6 +781,15 @@ create_new_dir "${PW_VULKAN_DIR}"
export LSPCI_VGA="$(lspci -k | grep -E 'VGA|3D' | tr -d '\n')"
if command -v xrandr &>/dev/null ; then
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_screen_configuration"
export PW_SCREEN_RESOLUTION="$(xrandr | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')"
export PW_SCREEN_PRIMARY="$(xrandr | grep "primary" | awk '{print $1}')"
print_var PW_SCREEN_RESOLUTION PW_SCREEN_PRIMARY
else
print_error "xrandr - not found!"
fi
cd "${PORT_SCRIPTS_PATH}"
. "${PORT_SCRIPTS_PATH}/var"
......
......@@ -11,6 +11,15 @@ elif [[ "$1" == *.exe ]] ; then
export portwine_exe="$1"
MISSING_DESKTOP_FILE=1
fi
# HOTFIX - ModernWarships
if echo "$portwine_exe" | grep ModernWarships &>/dev/null \
&& [[ -f "$(dirname "${portwine_exe}")/Modern Warships.exe" ]]
then
export portwine_exe="$(dirname "${portwine_exe}")/Modern Warships.exe"
MISSING_DESKTOP_FILE=0
fi
. "$(dirname $(readlink -f "$0"))/runlib"
kill_portwine
killall -15 yad_v12_3 2>/dev/null
......@@ -67,8 +76,7 @@ portwine_launch () {
PORTWINE_MSI=$(basename "${portwine_exe}" | grep .msi)
PORTWINE_BAT=$(basename "${portwine_exe}" | grep .bat)
if [[ ! -z "${PW_VIRTUAL_DESKTOP}" && "${PW_VIRTUAL_DESKTOP}" == "1" ]] ; then
pw_screen_resolution=$(xrandr --current | grep "*" | awk '{print $1;}' | head -1)
pw_run explorer "/desktop=PortProton,${pw_screen_resolution}" ${WINE_WIN_START} "$portwine_exe"
pw_run explorer "/desktop=PortProton,${PW_SCREEN_RESOLUTION}" ${WINE_WIN_START} "$portwine_exe"
elif [ ! -z "${PORTWINE_MSI}" ]; then
pw_run msiexec /i "$portwine_exe"
elif [[ ! -z "${PORTWINE_BAT}" || -n "${portwine_exe}" ]] ; then
......@@ -456,7 +464,7 @@ 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_GUI_DISABLED_CS PW_USE_GAMEMODE PW_USE_D3D_EXTRAS PW_FIX_VIDEO_IN_GAME PW_REDUCE_PULSE_LATENCY \
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
else
......@@ -464,7 +472,7 @@ pw_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_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
fi
if [[ "$?" == 0 ]] ; then
......
#!/usr/bin/env bash
#Author: Castro-Fidel (linux-gaming.ru)
#SCRIPTS_NEXT_VERSION=2245
#SCRIPTS_NEXT_VERSION=2246
########################################################################
export PW_MANGOHUD=0
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 DEFAULT_MANGOHUD_CONFIG=cpu_stats,cpu_temp,cpu_mhz,gpu_stats,gpu_temp,gpu_core_clock,gpu_mem_clock,vulkan_driver,gpu_name,vram,ram,frame_timing=1,time,arch,wine,toggle_hud=Shift_R+F12,resolution,vkbasalt,gamemode
export PW_RT_MOUNT_RO=("")
export PW_RT_MOUNT_RW=("/media" "/mnt" "/run/media/${USER}" "${PORT_WINE_PATH}")
#export PW_SANDBOX_HOME_PATH="${PORT_WINE_PATH}"
......
......@@ -509,7 +509,7 @@ gui_MangoHud () {
unset ADD_GUI_MH GUI_MH_RESULT
GET_REFRASH_RATE="30!45!60!75!120!144!165!240"
GET_REFRESH_RATE="30!45!60!75!120!144!165!240"
if [[ -z "$FPS_LIMIT" ]]; then
FPS_LIMIT_VAR="disabled"
......@@ -526,9 +526,9 @@ gui_MangoHud () {
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%"
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%"
ADD_GUI_MH+="--field= $add_list_mh !${!PW_MH_GUI_HELP}:CHK%FALSE%"
fi
done
......@@ -540,7 +540,7 @@ gui_MangoHud () {
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}" \
--field="${loc_gui_mango_fps}!${loc_gui_mango_fps_help} :CB" "${FPS_LIMIT_VAR}!disabled!${GET_REFRESH_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 \
......@@ -570,10 +570,9 @@ gui_MangoHud () {
YAD_MH_SET=$(<"${PORT_WINE_TMP_PATH}/tmp_yad_mh_set")
FPS_LIMIT=$(cat "${PORT_WINE_TMP_PATH}/tmp_yad_mh_fps_limit" | awk '{print $1}')
if command -v xrandr 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
MONITOR_HEIGHT="$(echo $PW_SCREEN_RESOLUTION | awk -F'x' '{print $2}')"
MH_FONT_SIZE="font_size=(( $MONITOR_HEIGHT / 45 ))"
export INT_COUNT_FX=0
for read_list_mh in ${YAD_MH_SET} ; do
......@@ -624,7 +623,7 @@ portwine_create_shortcut () {
--field="${sc_info}":LBL "" \
--field=" ${name_desktop}":LBL "" \
--field=" ${sc_menu_desktop}":CHK "TRUE" \
--field=" ${sc_add_in_steam}":CHK "$PW_FOUND_VDF" \
--field=" ${sc_add_in_steam}":CHK "FALSE" \
--button="$loc_gui_create_shortcut":0)
PW_YAD_OUT=$?
else
......@@ -635,7 +634,7 @@ portwine_create_shortcut () {
--field="${sc_info}":LBL "" \
--field="${sc_name}:" "${name_desktop}" \
--field=" ${sc_menu_desktop}":CHK "TRUE" \
--field=" ${sc_add_in_steam}":CHK "$PW_FOUND_VDF" \
--field=" ${sc_add_in_steam}":CHK "FALSE" \
--button="$loc_gui_create_shortcut":0)
PW_YAD_OUT=$?
fi
......
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