Commit 146eacb2 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Scripts version 2222

parent 17efde16
You can help us in the development of the project on the website: https://linux-gaming.ru/donate/ You can help us in the development of the project on the website: https://linux-gaming.ru/donate/
---------------------------------------- ----------------------------------------
-
Changelog: Changelog:
###Scripts version 2221### Дата: 19.09.2023 / Download update size: 230 megabytes
###Scripts version 2222### Date: 22.09.2023 / Download update size: 8 megabytes
* HOTFIX: update prefix
* WGC and LGC are set in separate prefixes
* fixed clearing the DOTNET prefix
* minor changes to the WINE settings tab
* fixed the function of forcing the use of the English layout
###Scripts version 2221### Date: 19.09.2023 / Download update size: 230 megabytes
* updated PROTON_LG to version 8-15-1 (fix update prefix) * updated PROTON_LG to version 8-15-1 (fix update prefix)
* added (спасибо Boria138) * added (спасибо Boria138)
REDUCE_PULSE_LATENCY - 'Reduce pulseaudio latency to fix intermittent sound' REDUCE_PULSE_LATENCY - 'Reduce pulseaudio latency to fix intermittent sound'
......
...@@ -2,11 +2,18 @@ ...@@ -2,11 +2,18 @@
----------------------------------------- -----------------------------------------
История изменений: История изменений:
###Scripts version 2221### Дата: 19.09.2023 / Размер скачиваемого обновления: 230 мегабай ###Scripts version 2222### Дата: 22.09.2023 / Размер скачиваемого обновления: 8 мегабайт
* HOTFIX: обновление префикса, на некоторых ОС
* WGC и LGC устанавливаются в отдельные префиксы
* исправлена очистка префикса DOTNET
* небольшие изменения вкладки настроек WINE
* исправлена функция принудительного использования английской раскладки
###Scripts version 2221### Дата: 19.09.2023 / Размер скачиваемого обновления: 230 мегабайт
* обновлен PROTON_LG до версии 8-15-1 (исправлено обновление префикса) * обновлен PROTON_LG до версии 8-15-1 (исправлено обновление префикса)
* добавлены параметры (спасибо Boria138) * добавлены параметры (спасибо Boria138)
REDUCE_PULSE_LATENCY - 'Уменьшить задержку pulseaudio для исправления прерывистого звука' REDUCE_PULSE_LATENCY - 'Уменьшить задержку pulseaudio для исправления прерывистого звука'
USE_US_LAYOUT_INFO - 'Принудительное использование английской раскладки (полезно для игр в которых управление верно работает исключительно на английской раскладке)' USE_US_LAYOUT - 'Принудительное использование английской раскладки (полезно для игр в которых управление верно работает исключительно на английской раскладке)'
###Scripts version 2220### Дата: 17.09.2023 / Размер скачиваемого обновления: 260 мегабайт ###Scripts version 2220### Дата: 17.09.2023 / Размер скачиваемого обновления: 260 мегабайт
* HOTFIX: установка Plarium Play перенесена в префикс DOTNET * HOTFIX: установка Plarium Play перенесена в префикс DOTNET
......
...@@ -233,6 +233,8 @@ unpack_tar () { ...@@ -233,6 +233,8 @@ unpack_tar () {
} }
pw_clear_pfx () { pw_clear_pfx () {
try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.dotnet48"
try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver"
try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg" try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/system.reg"
try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/user.reg" try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/user.reg"
try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/userdef.reg" try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/userdef.reg"
...@@ -408,9 +410,9 @@ init_wine_ver () { ...@@ -408,9 +410,9 @@ init_wine_ver () {
pw_init_runtime () { pw_init_runtime () {
if [[ -n "$(grep -E '(ROSA Fresh|RED OS)' "/etc/os-release")" ]] ; then if [[ ! -z "$(grep -E '(ROSA Fresh|RED OS)' "/etc/os-release")" ]] ; then
export LOCPATH="/run/host/usr/share/locale/" export LOCPATH="/run/host/usr/share/locale/"
elif [[ -n "$(grep "altlinux" "/etc/os-release")" ]] ; then elif [[ ! -z "$(grep "altlinux" "/etc/os-release")" ]] ; then
export LIBGL_DRIVERS_PATH="/usr/lib/X11/modules/dri:/usr/lib64/X11/modules/dri" export LIBGL_DRIVERS_PATH="/usr/lib/X11/modules/dri:/usr/lib64/X11/modules/dri"
fi fi
...@@ -601,10 +603,10 @@ pw_kill_autostart () { ...@@ -601,10 +603,10 @@ pw_kill_autostart () {
export -f pw_kill_autostart export -f pw_kill_autostart
stop_portwine () { stop_portwine () {
if [ "$int_xneur" = "1" ]; then if [[ "$int_xneur" == "1" ]] ; then
xneur & xneur &
fi fi
if [ "$PW_USE_US_LAYOUT" != "0" ]; then if [[ "$PW_USE_US_LAYOUT" == "1" ]] ; then
setxkbmap setxkbmap
fi fi
pw_stop_progress_bar pw_stop_progress_bar
...@@ -613,8 +615,8 @@ stop_portwine () { ...@@ -613,8 +615,8 @@ stop_portwine () {
kill_portwine && kill_portwine &&
try_remove_dir "${PW_WINELIB}/var" try_remove_dir "${PW_WINELIB}/var"
find "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/" -maxdepth 1 -type f -name "*.tmp" -delete find "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/" -maxdepth 1 -type f -name "*.tmp" -delete
if [ ! -z "`pgrep -a yad_v12_3 | grep "\-\-notification" | awk '{print $1}'`" ] ; then if [ ! -z "`pgrep -a yad_v12_3 | grep "\--notification" | awk '{print $1}'`" ] ; then
kill -s SIGUSR1 "`pgrep -a yad_v12_3 | grep "\-\-notification" | awk '{print $1}'`" 2>/dev/null kill -s SIGUSR1 "`pgrep -a yad_v12_3 | grep "\--notification" | awk '{print $1}'`" 2>/dev/null
fi fi
add_in_stop_portwine #&>/dev/null add_in_stop_portwine #&>/dev/null
kill -n 9 `pgrep -a start.sh | grep -i '/PortProton/' | awk '{print $1}'` > /dev/null 2>&1 kill -n 9 `pgrep -a start.sh | grep -i '/PortProton/' | awk '{print $1}'` > /dev/null 2>&1
...@@ -874,6 +876,10 @@ pw_init_db () { ...@@ -874,6 +876,10 @@ pw_init_db () {
fi fi
if [ ! -z "${PORTWINE_DB_FILE}" ]; then if [ ! -z "${PORTWINE_DB_FILE}" ]; then
. "${PORTWINE_DB_FILE}" . "${PORTWINE_DB_FILE}"
# HOTFIX: update prefix
[[ "$PW_WINE_USE" == "PROTON_LG_8-15" ]] && export PW_WINE_USE="$PW_PROTON_LG_VER"
init_wine_ver && init_wine_ver &&
print_info "Use ${PORTWINE_DB_FILE} db file." print_info "Use ${PORTWINE_DB_FILE} db file."
fi fi
...@@ -881,7 +887,7 @@ pw_init_db () { ...@@ -881,7 +887,7 @@ pw_init_db () {
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )" export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
fi fi
if [[ "${PW_WINE_CPU_TOPOLOGY}" == "disabled" ]] && [[ -n "${WINE_CPU_TOPOLOGY}" ]] ; then if [[ "${PW_WINE_CPU_TOPOLOGY}" == "disabled" ]] && [[ ! -z "${WINE_CPU_TOPOLOGY}" ]] ; then
export PW_WINE_CPU_TOPOLOGY="${WINE_CPU_TOPOLOGY}" export PW_WINE_CPU_TOPOLOGY="${WINE_CPU_TOPOLOGY}"
fi fi
if ls "${PATH_TO_GAME}"/*_Data/Resources/ 2>/dev/null | grep "unity" &>/dev/null \ if ls "${PATH_TO_GAME}"/*_Data/Resources/ 2>/dev/null | grep "unity" &>/dev/null \
...@@ -961,6 +967,7 @@ pw_port_update () { ...@@ -961,6 +967,7 @@ pw_port_update () {
cd "${PORT_WINE_PATH}/data/" cd "${PORT_WINE_PATH}/data/"
tar -czpf "${PORT_WINE_TMP_PATH}/scripts_backup/scripts_v.${scripts_install_ver}.tar.gz" ./scripts ./img \ tar -czpf "${PORT_WINE_TMP_PATH}/scripts_backup/scripts_v.${scripts_install_ver}.tar.gz" ./scripts ./img \
./changelog* ./dxvk.conf ./vkBasalt.conf ./tmp/scripts_ver ./changelog* ./dxvk.conf ./vkBasalt.conf ./tmp/scripts_ver
try_remove_dir "${PORT_WINE_PATH}/data/scripts/portwine_db"
cp -fr "${PORT_WINE_TMP_PATH}/PortWINE-master/data_from_portwine/"* "${PORT_WINE_PATH}/data/" cp -fr "${PORT_WINE_TMP_PATH}/PortWINE-master/data_from_portwine/"* "${PORT_WINE_PATH}/data/"
try_remove_file "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz" try_remove_file "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
try_remove_dir "${PORT_WINE_TMP_PATH}/PortWINE-master/" try_remove_dir "${PORT_WINE_TMP_PATH}/PortWINE-master/"
...@@ -1098,7 +1105,7 @@ pw_find_exe () { ...@@ -1098,7 +1105,7 @@ pw_find_exe () {
fi fi
IFS=$OrigIFS IFS=$OrigIFS
if [[ -n "${PW_SET_FIND_EXE}" ]] ; then if [[ ! -z "${PW_SET_FIND_EXE}" ]] ; then
portwine_exe="${PW_PATH_FOR_FIND}$(echo "${PW_SET_FIND_EXE}" | awk -F'|' '{print $1}')" portwine_exe="${PW_PATH_FOR_FIND}$(echo "${PW_SET_FIND_EXE}" | awk -F'|' '{print $1}')"
portwine_create_shortcut silent portwine_create_shortcut silent
/usr/bin/env bash -c ${pw_full_command_line[*]} & /usr/bin/env bash -c ${pw_full_command_line[*]} &
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
export PW_COMMENT_DB="World of Sea Battle" export PW_COMMENT_DB="World of Sea Battle"
export PW_PREFIX_NAME="DOTNET" export PW_PREFIX_NAME="DOTNET"
export PW_WINDOWS_VER="10" export PW_WINDOWS_VER="10"
export PW_DLL_INSTALL="faudio dotnet48 dotnet20sp2" export PW_DLL_INSTALL="faudio dotnet48 dotnet20sp2 dotnetdesktop7"
export WINEDLLOVERRIDES="quartz=b" export WINEDLLOVERRIDES="quartz=b"
export LAUNCH_PARAMETERS="" export LAUNCH_PARAMETERS=""
export PW_VULKAN_USE="1" export PW_VULKAN_USE="1"
...@@ -37,5 +37,3 @@ export PW_FIX_VIDEO_IN_GAME="0" ...@@ -37,5 +37,3 @@ export PW_FIX_VIDEO_IN_GAME="0"
export PW_USE_AMDVLK_DRIVER="1" export PW_USE_AMDVLK_DRIVER="1"
export PW_FORCE_LARGE_ADDRESS_AWARE="1" export PW_FORCE_LARGE_ADDRESS_AWARE="1"
export PW_USE_SHADER_CACHE="1" export PW_USE_SHADER_CACHE="1"
export PW_WINE_USE=GE-PROTON7-55
gui_proton_downloader silent "${PW_WINE_USE}"
#!/usr/bin/env bash
#Author: PortWINE
#lgc_api.exe
#lgc.exe
#Rating=5
export PW_COMMENT_DB="Lesta Game Centers"
################################################
export PW_WINE_USE="PROTON_LG_8-4"
export PW_VULKAN_USE=1 #dxvk, vkd3d or 0 for OpenGL
export LAUNCH_PARAMETERS="" # Additional launch options
export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
export WINEDLLOVERRIDES=""
export PW_DLL_INSTALL="lucida" # Install DLL in port prefix (used winetricks)
export PW_USE_D3D_EXTRAS="1"
export PW_USE_EAC_AND_BE="0"
export PW_PREFIX_NAME="LGC"
gui_proton_downloader silent "${PW_WINE_USE}"
add_in_start_portwine () {
if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/AppData/Roaming/Wargaming.net/WorldOfTanks/preferences.xml" ]] ; then
sed -i 's%<igbHardwareAccelerationEnabled> true </igbHardwareAccelerationEnabled>%<igbHardwareAccelerationEnabled> false </igbHardwareAccelerationEnabled>%' "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/AppData/Roaming/Wargaming.net/WorldOfTanks/preferences.xml"
fi
if [[ "${PW_VULKAN_USE}" == "0" || "${PW_VULKAN_USE}" == "3" ]] ; then
export LAUNCH_PARAMETERS="--disable-gpu"
fi
}
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
#Author: PortWINE #Author: PortWINE
#wgc.exe #wgc.exe
#wgc_api.exe #wgc_api.exe
#lgc_api.exe
#lgc.exe
#Rating=5 #Rating=5
export PW_COMMENT_DB="Wargaming and Lesta Game Centers" export PW_COMMENT_DB="Wargaming Game Centers"
################################################ ################################################
export PW_WINE_USE="PROTON_LG_8-4" export PW_WINE_USE="PROTON_LG_8-4"
export PW_VULKAN_USE=1 #dxvk, vkd3d or 0 for OpenGL export PW_VULKAN_USE=1 #dxvk, vkd3d or 0 for OpenGL
...@@ -17,6 +15,8 @@ export PW_USE_D3D_EXTRAS="1" ...@@ -17,6 +15,8 @@ export PW_USE_D3D_EXTRAS="1"
export PW_USE_EAC_AND_BE="0" export PW_USE_EAC_AND_BE="0"
export PW_PREFIX_NAME="WGC" export PW_PREFIX_NAME="WGC"
gui_proton_downloader silent "${PW_WINE_USE}"
add_in_start_portwine () { add_in_start_portwine () {
if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/AppData/Roaming/Wargaming.net/WorldOfTanks/preferences.xml" ]] ; then if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/AppData/Roaming/Wargaming.net/WorldOfTanks/preferences.xml" ]] ; then
sed -i 's%<igbHardwareAccelerationEnabled> true </igbHardwareAccelerationEnabled>%<igbHardwareAccelerationEnabled> false </igbHardwareAccelerationEnabled>%' "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/AppData/Roaming/Wargaming.net/WorldOfTanks/preferences.xml" sed -i 's%<igbHardwareAccelerationEnabled> true </igbHardwareAccelerationEnabled>%<igbHardwareAccelerationEnabled> false </igbHardwareAccelerationEnabled>%' "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/AppData/Roaming/Wargaming.net/WorldOfTanks/preferences.xml"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
export LAUNCH_PARAMETERS=("/VERYSILENT") export LAUNCH_PARAMETERS=("/VERYSILENT")
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/Lesta_Game_Center_Install_RU.exe" export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/Lesta_Game_Center_Install_RU.exe"
export PW_PREFIX_NAME="LGC" export PW_PREFIX_NAME="LGC"
export PW_WINE_USE="PROTON_LG_8-4"
try_download_lgc () { try_download_lgc () {
set -o pipefail set -o pipefail
wget -t 5 -T 3 "$1" --output-document="$2" 2>&1 | \ wget -t 5 -T 3 "$1" --output-document="$2" 2>&1 | \
...@@ -14,7 +14,7 @@ try_download_lgc () { ...@@ -14,7 +14,7 @@ try_download_lgc () {
} }
pw_clear_pfx pw_clear_pfx
gui_proton_downloader silent "PROTON_LG_8-4" gui_proton_downloader silent "${PW_WINE_USE}"
start_portwine start_portwine
if try_download_lgc "redirect.lesta.ru/LGC/Lesta_Game_Center_Install_RU.exe" "${PW_AUTOINSTALL_EXE}" if try_download_lgc "redirect.lesta.ru/LGC/Lesta_Game_Center_Install_RU.exe" "${PW_AUTOINSTALL_EXE}"
......
...@@ -5,6 +5,7 @@ export LAUNCH_PARAMETERS=("/VERYSILENT") ...@@ -5,6 +5,7 @@ export LAUNCH_PARAMETERS=("/VERYSILENT")
[ "${update_loc}" = "RUS" ] && export WGC_LOC=RU || export WGC_LOC=EU [ "${update_loc}" = "RUS" ] && export WGC_LOC=RU || export WGC_LOC=EU
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe" export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe"
export PW_PREFIX_NAME="WGC" export PW_PREFIX_NAME="WGC"
export PW_WINE_USE="PROTON_LG_8-4"
try_download_wgc () { try_download_wgc () {
set -o pipefail set -o pipefail
...@@ -15,8 +16,9 @@ try_download_wgc () { ...@@ -15,8 +16,9 @@ try_download_wgc () {
} }
pw_clear_pfx pw_clear_pfx
gui_proton_downloader silent "PROTON_LG_8-4" gui_proton_downloader silent "${PW_WINE_USE}"
start_portwine start_portwine
if try_download_wgc "redirect.wargaming.net/WGC/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe" "${PW_AUTOINSTALL_EXE}" if try_download_wgc "redirect.wargaming.net/WGC/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe" "${PW_AUTOINSTALL_EXE}"
then then
pw_start_progress_bar_block "Starting WGC installation..." pw_start_progress_bar_block "Starting WGC installation..."
......
...@@ -6,8 +6,6 @@ export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/wos_client.exe" ...@@ -6,8 +6,6 @@ export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/wos_client.exe"
export LAUNCH_PARAMETERS=("/VERYSILENT") export LAUNCH_PARAMETERS=("/VERYSILENT")
export PW_DLL_INSTALL="faudio dotnet48" export PW_DLL_INSTALL="faudio dotnet48"
export PW_VULKAN_USE=1 export PW_VULKAN_USE=1
export PW_WINE_USE=GE-PROTON7-55
gui_proton_downloader silent "${PW_WINE_USE}"
start_portwine start_portwine
if try_download "165311.selcdn.ru/wosb_installer/wos_client.exe" "${PW_AUTOINSTALL_EXE}" if try_download "165311.selcdn.ru/wosb_installer/wos_client.exe" "${PW_AUTOINSTALL_EXE}"
......
...@@ -275,14 +275,16 @@ start_portwine () { ...@@ -275,14 +275,16 @@ start_portwine () {
if [[ -f "${PW_WINELIB}/default_pfx.tar.xz" ]] && [[ "${DISABLE_CP_DEFPFX}" != 1 ]] ; then if [[ -f "${PW_WINELIB}/default_pfx.tar.xz" ]] && [[ "${DISABLE_CP_DEFPFX}" != 1 ]] ; then
unpack_tar_xz "${PW_WINELIB}/default_pfx.tar.xz" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/" 2>/dev/null unpack_tar_xz "${PW_WINELIB}/default_pfx.tar.xz" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/" 2>/dev/null
fi fi
${pw_runtime} env LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" "${WINELOADER}" wineboot -u &>>"${PORT_WINE_TMP_PATH}/update_pfx_log" ${pw_runtime} env WINEDLLOVERRIDES="winegstreamer=" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \
"${WINELOADER}" wineboot -u &>>"${PORT_WINE_TMP_PATH}/update_pfx_log"
wait_wineserver && wait_wineserver &&
echo "${PW_WINE_USE}" > "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver" echo "${PW_WINE_USE}" > "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver"
elif [[ ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver" ]] \ elif [[ ! -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver" ]] \
|| [[ -z "`cat "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver" | grep ${PW_WINE_USE}`" ]] \ || [[ -z "`cat "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver" | grep ${PW_WINE_USE}`" ]] \
|| [[ ! -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/dosdevices" ]] ; then || [[ ! -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/dosdevices" ]] ; then
check_dirs_and_files_in_pfx check_dirs_and_files_in_pfx
${pw_runtime} env LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" "${WINELOADER}" wineboot -i &>>"${PORT_WINE_TMP_PATH}/update_pfx_log" ${pw_runtime} env WINEDLLOVERRIDES="winegstreamer=" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \
"${WINELOADER}" wineboot -i &>>"${PORT_WINE_TMP_PATH}/update_pfx_log"
wait_wineserver && wait_wineserver &&
echo "${PW_WINE_USE}" > "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver" echo "${PW_WINE_USE}" > "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.wine_ver"
fi fi
...@@ -321,7 +323,7 @@ start_portwine () { ...@@ -321,7 +323,7 @@ start_portwine () {
unset PULSE_LATENCY_MSEC unset PULSE_LATENCY_MSEC
fi fi
if [[ "${PW_USE_US_LAYOUT}" == 1 ]] ; then if [[ "${PW_USE_US_LAYOUT}" == "1" ]] ; then
setxkbmap -model pc101 us -print | xkbcomp - $DISPLAY setxkbmap -model pc101 us -print | xkbcomp - $DISPLAY
fi fi
...@@ -594,7 +596,7 @@ start_portwine () { ...@@ -594,7 +596,7 @@ start_portwine () {
pw_run () { pw_run () {
unset GDK_BACKEND unset GDK_BACKEND
if [[ -n "${PATH_TO_GAME}" ]] ; then if [[ ! -z "${PATH_TO_GAME}" ]] ; then
cd "${PATH_TO_GAME}" cd "${PATH_TO_GAME}"
else else
cd "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c" cd "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c"
......
...@@ -21,7 +21,7 @@ if [[ "${XDG_SESSION_TYPE}" = "wayland" ]] && [[ ! -f "${PORT_WINE_TMP_PATH}/che ...@@ -21,7 +21,7 @@ if [[ "${XDG_SESSION_TYPE}" = "wayland" ]] && [[ ! -f "${PORT_WINE_TMP_PATH}/che
echo "1" > "${PORT_WINE_TMP_PATH}/check_wayland" echo "1" > "${PORT_WINE_TMP_PATH}/check_wayland"
fi fi
if [[ -f "${PORT_WINE_TMP_PATH}/tmp_main_gui_size" ]] && [[ -n "$(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}')"
else else
...@@ -29,7 +29,7 @@ else ...@@ -29,7 +29,7 @@ else
export PW_MAIN_SIZE_H="300" export PW_MAIN_SIZE_H="300"
fi fi
if [[ -n $(basename "${portwine_exe}" | grep .ppack) ]] ; then if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then
export PW_ADD_TO_ARGS_IN_RUNTIME="--xterm" export PW_ADD_TO_ARGS_IN_RUNTIME="--xterm"
unset PW_SANDBOX_HOME_PATH unset PW_SANDBOX_HOME_PATH
pw_init_runtime pw_init_runtime
...@@ -37,7 +37,7 @@ if [[ -n $(basename "${portwine_exe}" | grep .ppack) ]] ; then ...@@ -37,7 +37,7 @@ if [[ -n $(basename "${portwine_exe}" | grep .ppack) ]] ; then
${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" unsquashfs -f -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" "$1" & ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" unsquashfs -f -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" "$1" &
sleep 10 sleep 10
while true ; do while true ; do
if [[ -n $(pgrep -a xterm | grep ".ppack" | head -n 1 | awk '{print $1}') ]] ; then if [[ ! -z $(pgrep -a xterm | grep ".ppack" | head -n 1 | awk '{print $1}') ]] ; then
sleep 0.5 sleep 0.5
else else
kill -TERM $(pgrep -a unsquashfs | grep ".ppack" | head -n 1 | awk '{print $1}') kill -TERM $(pgrep -a unsquashfs | grep ".ppack" | head -n 1 | awk '{print $1}')
...@@ -64,12 +64,12 @@ portwine_launch () { ...@@ -64,12 +64,12 @@ portwine_launch () {
start_portwine start_portwine
PORTWINE_MSI=$(basename "${portwine_exe}" | grep .msi) PORTWINE_MSI=$(basename "${portwine_exe}" | grep .msi)
PORTWINE_BAT=$(basename "${portwine_exe}" | grep .bat) PORTWINE_BAT=$(basename "${portwine_exe}" | grep .bat)
if [[ -n "${PW_VIRTUAL_DESKTOP}" && "${PW_VIRTUAL_DESKTOP}" == "1" ]] ; then if [[ ! -z "${PW_VIRTUAL_DESKTOP}" && "${PW_VIRTUAL_DESKTOP}" == "1" ]] ; then
pw_screen_resolution=$(xrandr --current | grep "*" | awk '{print $1;}' | head -1) 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 [ -n "${PORTWINE_MSI}" ]; then elif [ ! -z "${PORTWINE_MSI}" ]; then
pw_run msiexec /i "$portwine_exe" pw_run msiexec /i "$portwine_exe"
elif [[ -n "${PORTWINE_BAT}" || -n "${portwine_exe}" ]] ; then elif [[ ! -z "${PORTWINE_BAT}" || -n "${portwine_exe}" ]] ; then
pw_run ${WINE_WIN_START} "$portwine_exe" pw_run ${WINE_WIN_START} "$portwine_exe"
else else
pw_run winefile pw_run winefile
...@@ -96,7 +96,7 @@ portwine_start_debug () { ...@@ -96,7 +96,7 @@ portwine_start_debug () {
echo "RUNTIME is enabled" >> "${PORT_WINE_PATH}/${portname}.log" echo "RUNTIME is enabled" >> "${PORT_WINE_PATH}/${portname}.log"
fi fi
echo "----------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log" echo "----------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
if [ -n "${portwine_exe}" ] ; then if [ ! -z "${portwine_exe}" ] ; then
echo "Debug for programm:" >> "${PORT_WINE_PATH}/${portname}.log" echo "Debug for programm:" >> "${PORT_WINE_PATH}/${portname}.log"
echo "${portwine_exe}" >> "${PORT_WINE_PATH}/${portname}.log" echo "${portwine_exe}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "---------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log" echo "---------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
...@@ -169,7 +169,7 @@ portwine_start_debug () { ...@@ -169,7 +169,7 @@ portwine_start_debug () {
echo "winetricks.log:" >> "${PORT_WINE_PATH}/${portname}.log" echo "winetricks.log:" >> "${PORT_WINE_PATH}/${portname}.log"
cat "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" | sed -e /"^d3dcomp*"/d -e /"^d3dx*"/d >> "${PORT_WINE_PATH}/${portname}.log" cat "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" | sed -e /"^d3dcomp*"/d -e /"^d3dx*"/d >> "${PORT_WINE_PATH}/${portname}.log"
echo "-----------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log" echo "-----------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
if [ -n "${PORTWINE_DB_FILE}" ]; then if [ ! -z "${PORTWINE_DB_FILE}" ]; then
echo "Use ${PORTWINE_DB_FILE} db file:" >> "${PORT_WINE_PATH}/${portname}.log" echo "Use ${PORTWINE_DB_FILE} db file:" >> "${PORT_WINE_PATH}/${portname}.log"
cat "${PORTWINE_DB_FILE}" | sed '/##/d' >> "${PORT_WINE_PATH}/${portname}.log" cat "${PORTWINE_DB_FILE}" | sed '/##/d' >> "${PORT_WINE_PATH}/${portname}.log"
else else
...@@ -188,9 +188,9 @@ portwine_start_debug () { ...@@ -188,9 +188,9 @@ portwine_start_debug () {
sleep 3 sleep 3
pw_stop_progress_bar_cover pw_stop_progress_bar_cover
unset PW_TIMER unset PW_TIMER
while read -r line || [[ -n $(pgrep -a yad | grep "yad_v12_3 --text-info --tail --button="STOP":0 --title="DEBUG"" | awk '{print $1}') ]] ; do while read -r line || [[ ! -z $(pgrep -a yad | grep "yad_v12_3 --text-info --tail --button="STOP":0 --title="DEBUG"" | awk '{print $1}') ]] ; do
sleep 0.005 sleep 0.005
if [[ -n "${line}" ]] && [[ -z "$(echo "${line}" | grep -i "kerberos")" ]] \ if [[ ! -z "${line}" ]] && [[ -z "$(echo "${line}" | grep -i "kerberos")" ]] \
&& [[ -z "$(echo "${line}" | grep -i "ntlm")" ]] && [[ -z "$(echo "${line}" | grep -i "ntlm")" ]]
then then
echo "# ${line}" echo "# ${line}"
...@@ -316,13 +316,13 @@ pw_prefix_manager () { ...@@ -316,13 +316,13 @@ pw_prefix_manager () {
for STPFXMNG in $(cat "${PORT_WINE_TMP_PATH}/to_winetricks") ; do for STPFXMNG in $(cat "${PORT_WINE_TMP_PATH}/to_winetricks") ; do
grep $(echo ${STPFXMNG} | awk -F'|' '{print $2}') "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" &>/dev/null grep $(echo ${STPFXMNG} | awk -F'|' '{print $2}') "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" &>/dev/null
if [ "$?" == "1" ] ; then if [ "$?" == "1" ] ; then
[[ -n "${STPFXMNG}" ]] && SET_FROM_PFX_MANAGER+="$(echo "${STPFXMNG}" | awk -F'|' '{print $2}') " [[ ! -z "${STPFXMNG}" ]] && SET_FROM_PFX_MANAGER+="$(echo "${STPFXMNG}" | awk -F'|' '{print $2}') "
fi fi
done done
IFS=${old_IFS} IFS=${old_IFS}
try_remove_file "${PORT_WINE_TMP_PATH}/to_winetricks" try_remove_file "${PORT_WINE_TMP_PATH}/to_winetricks"
if [[ -n ${SET_FROM_PFX_MANAGER} ]] ; then if [[ ! -z ${SET_FROM_PFX_MANAGER} ]] ; then
export PW_ADD_TO_ARGS_IN_RUNTIME="--xterm" export PW_ADD_TO_ARGS_IN_RUNTIME="--xterm"
pw_init_runtime pw_init_runtime
${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" "${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${SET_FROM_PFX_MANAGER} ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" "${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${SET_FROM_PFX_MANAGER}
...@@ -343,9 +343,9 @@ pw_winetricks () { ...@@ -343,9 +343,9 @@ pw_winetricks () {
pw_stop_progress_bar pw_stop_progress_bar
echo "WINETRICKS..." > "${PORT_WINE_TMP_PATH}/update_pfx_log" echo "WINETRICKS..." > "${PORT_WINE_TMP_PATH}/update_pfx_log"
unset PW_TIMER unset PW_TIMER
while read -r line || [[ -n $(pgrep -a yad | grep "yad_v12_3 --text-info --tail --no-buttons --title="WINETRICKS"" | awk '{print $1}') ]] ; do while read -r line || [[ ! -z $(pgrep -a yad | grep "yad_v12_3 --text-info --tail --no-buttons --title="WINETRICKS"" | awk '{print $1}') ]] ; do
sleep 0.005 sleep 0.005
if [[ -n "${line}" ]] && [[ -z "$(echo "${line}" | grep -i "gstreamer")" ]] \ if [[ ! -z "${line}" ]] && [[ -z "$(echo "${line}" | grep -i "gstreamer")" ]] \
&& [[ -z "$(echo "${line}" | grep -i "kerberos")" ]] \ && [[ -z "$(echo "${line}" | grep -i "kerberos")" ]] \
&& [[ -z "$(echo "${line}" | grep -i "ntlm")" ]] && [[ -z "$(echo "${line}" | grep -i "ntlm")" ]]
then then
...@@ -384,7 +384,7 @@ pw_create_prefix_backup () { ...@@ -384,7 +384,7 @@ pw_create_prefix_backup () {
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" --title "BACKUP PREFIX TO..." 2>/dev/null ) --window-icon="$PW_GUI_ICON_PATH/port_proton.png" --title "BACKUP PREFIX TO..." 2>/dev/null )
YAD_STATUS="$?" YAD_STATUS="$?"
if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" ]] ; then exit 0 ; fi if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" ]] ; then exit 0 ; fi
if [[ -n "$(grep "/${PW_PREFIX_NAME}/" "${PORT_WINE_PATH}"/*.desktop )" ]] ; then if [[ ! -z "$(grep "/${PW_PREFIX_NAME}/" "${PORT_WINE_PATH}"/*.desktop )" ]] ; then
try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.create_shortcut" try_remove_file "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.create_shortcut"
grep "/${PW_PREFIX_NAME}/" "${PORT_WINE_PATH}"/*.desktop | awk -F"/${PW_PREFIX_NAME}/" '{print $2}' \ grep "/${PW_PREFIX_NAME}/" "${PORT_WINE_PATH}"/*.desktop | awk -F"/${PW_PREFIX_NAME}/" '{print $2}' \
| awk -F\" '{print $1}' > "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.create_shortcut" | awk -F\" '{print $1}' > "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.create_shortcut"
...@@ -396,7 +396,7 @@ pw_create_prefix_backup () { ...@@ -396,7 +396,7 @@ pw_create_prefix_backup () {
${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" mksquashfs "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part" -comp zstd & ${pw_runtime} env PATH="${PATH}" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" mksquashfs "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part" -comp zstd &
sleep 10 sleep 10
while true ; do while true ; do
if [[ -n $(pgrep -a xterm | grep ".ppack.part" | head -n 1 | awk '{print $1}') ]] ; then if [[ ! -z $(pgrep -a xterm | grep ".ppack.part" | head -n 1 | awk '{print $1}') ]] ; then
sleep 0.5 sleep 0.5
else else
kill -TERM $(pgrep -a mksquashfs | grep ".ppack.part" | head -n 1 | awk '{print $1}') kill -TERM $(pgrep -a mksquashfs | grep ".ppack.part" | head -n 1 | awk '{print $1}')
...@@ -490,7 +490,7 @@ PW_PREFIX_NAME="$(echo "${PW_PREFIX_NAME}" | sed -e s/[[:blank:]]/_/g)" ...@@ -490,7 +490,7 @@ PW_PREFIX_NAME="$(echo "${PW_PREFIX_NAME}" | sed -e s/[[:blank:]]/_/g)"
PW_ALL_PREFIXES=$(ls "${PORT_WINE_PATH}/data/prefixes/" | sed -e s/"${PW_PREFIX_NAME}$"//g) PW_ALL_PREFIXES=$(ls "${PORT_WINE_PATH}/data/prefixes/" | sed -e s/"${PW_PREFIX_NAME}$"//g)
export PW_PREFIX_NAME PW_ALL_PREFIXES export PW_PREFIX_NAME PW_ALL_PREFIXES
# if [[ -n "${PORTWINE_DB}" ]] && [[ -z `echo "${PW_PREFIX_NAME}" | grep -i "$(echo "${PORTWINE_DB}" | sed -e s/[[:blank:]]/_/g)"` ]] ; then # if [[ ! -z "${PORTWINE_DB}" ]] && [[ -z `echo "${PW_PREFIX_NAME}" | grep -i "$(echo "${PORTWINE_DB}" | sed -e s/[[:blank:]]/_/g)"` ]] ; then
# export PW_PREFIX_NAME="${PW_PREFIX_NAME}!`echo "${PORTWINE_DB}" | sed -e s/[[:blank:]]/_/g`" # export PW_PREFIX_NAME="${PW_PREFIX_NAME}!`echo "${PORTWINE_DB}" | sed -e s/[[:blank:]]/_/g`"
# fi # fi
...@@ -524,11 +524,11 @@ case "${PW_VULKAN_USE}" in ...@@ -524,11 +524,11 @@ case "${PW_VULKAN_USE}" in
*) export PW_DEFAULT_VULKAN_USE="${loc_gui_vulkan_git}!${loc_gui_vulkan_stable}!${loc_gui_open_gl}!${loc_gui_gallium_nine}" ;; *) export PW_DEFAULT_VULKAN_USE="${loc_gui_vulkan_git}!${loc_gui_vulkan_stable}!${loc_gui_open_gl}!${loc_gui_gallium_nine}" ;;
esac esac
if [[ -n "${PORTWINE_DB_FILE}" ]] ; then if [[ ! -z "${PORTWINE_DB_FILE}" ]] ; then
[[ -z "${PW_COMMENT_DB}" ]] && PW_COMMENT_DB="${loc_gui_db_comments} <b>${PORTWINE_DB}</b>." [[ -z "${PW_COMMENT_DB}" ]] && PW_COMMENT_DB="${loc_gui_db_comments} <b>${PORTWINE_DB}</b>."
if [[ -n $(echo "${PW_WINE_USE}" | grep "^PROTON_LG$") ]] ; then if [[ ! -z $(echo "${PW_WINE_USE}" | grep "^PROTON_LG$") ]] ; then
export PW_DEFAULT_WINE_USE="${PW_PROTON_LG_VER}!${PW_WINE_LG_VER}${DIST_ADD_TO_GUI}!GET-OTHER-WINE" export PW_DEFAULT_WINE_USE="${PW_PROTON_LG_VER}!${PW_WINE_LG_VER}${DIST_ADD_TO_GUI}!GET-OTHER-WINE"
elif [[ -n $(echo "${PW_WINE_USE}" | grep "^PROTON_GE$") ]] ; then elif [[ ! -z $(echo "${PW_WINE_USE}" | grep "^PROTON_GE$") ]] ; then
export PW_DEFAULT_WINE_USE="${PW_WINE_LG_VER}!${PW_PROTON_LG_VER}${DIST_ADD_TO_GUI}!GET-OTHER-WINE" export PW_DEFAULT_WINE_USE="${PW_WINE_LG_VER}!${PW_PROTON_LG_VER}${DIST_ADD_TO_GUI}!GET-OTHER-WINE"
else else
if [[ "${PW_WINE_USE}" == "${PW_PROTON_LG_VER}" ]] ; then if [[ "${PW_WINE_USE}" == "${PW_PROTON_LG_VER}" ]] ; then
...@@ -557,7 +557,7 @@ else ...@@ -557,7 +557,7 @@ else
fi fi
unset PW_GUI_DISABLED_CS unset PW_GUI_DISABLED_CS
fi fi
if [ -n "${portwine_exe}" ]; then if [ ! -z "${portwine_exe}" ]; then
if [[ -z "${PW_GUI_DISABLED_CS}" || "${PW_GUI_DISABLED_CS}" == 0 ]] ; then if [[ -z "${PW_GUI_DISABLED_CS}" || "${PW_GUI_DISABLED_CS}" == 0 ]] ; then
pw_create_gui_png pw_create_gui_png
grep -il "${portwine_exe}" "${HOME}/.local/share/applications"/*.desktop grep -il "${portwine_exe}" "${HOME}/.local/share/applications"/*.desktop
...@@ -583,27 +583,27 @@ if [ -n "${portwine_exe}" ]; then ...@@ -583,27 +583,27 @@ if [ -n "${portwine_exe}" ]; then
export VULKAN_MOD=$(echo "${OUTPUT_START}" | grep \;\; | awk -F";" '{print $1}') export VULKAN_MOD=$(echo "${OUTPUT_START}" | grep \;\; | awk -F";" '{print $1}')
export PW_WINE_VER=$(echo "${OUTPUT_START}" | grep \;\; | awk -F";" '{print $2}') export PW_WINE_VER=$(echo "${OUTPUT_START}" | grep \;\; | awk -F";" '{print $2}')
export PW_PREFIX_NAME=$(echo "${OUTPUT_START}" | grep \;\; | awk -F";" '{print $3}' | sed -e s/[[:blank:]]/_/g) export PW_PREFIX_NAME=$(echo "${OUTPUT_START}" | grep \;\; | awk -F";" '{print $3}' | sed -e s/[[:blank:]]/_/g)
if [[ -z "${PW_PREFIX_NAME}" ]] || [[ -n "$(echo "${PW_PREFIX_NAME}" | grep -E '^_.*' )" ]] ; then if [[ -z "${PW_PREFIX_NAME}" ]] || [[ ! -z "$(echo "${PW_PREFIX_NAME}" | grep -E '^_.*' )" ]] ; then
export PW_PREFIX_NAME="DEFAULT" export PW_PREFIX_NAME="DEFAULT"
else else
export PW_PREFIX_NAME="${PW_PREFIX_NAME^^}" export PW_PREFIX_NAME="${PW_PREFIX_NAME^^}"
fi fi
elif [ -n "${PORTWINE_DB_FILE}" ]; then elif [ ! -z "${PORTWINE_DB_FILE}" ]; then
portwine_launch portwine_launch
fi fi
else else
button_click () { button_click () {
[[ -n "$1" ]] && echo "$1" > "${PORT_WINE_TMP_PATH}/tmp_yad_form" [[ ! -z "$1" ]] && echo "$1" > "${PORT_WINE_TMP_PATH}/tmp_yad_form"
if [[ -n $(pidof -s yad) ]] || [[ -n $(pidof -s yad_v12_3) ]] ; then if [[ ! -z $(pidof -s yad) ]] || [[ ! -z $(pidof -s yad_v12_3) ]] ; then
kill -s SIGUSR1 $(pgrep -a yad | grep "\-\-key=${KEY} \-\-notebook" | awk '{print $1}') > /dev/null 2>&1 kill -s SIGUSR1 $(pgrep -a yad | grep "\--key=${KEY} \-\-notebook" | awk '{print $1}') > /dev/null 2>&1
fi fi
} }
export -f button_click export -f button_click
run_desktop_b_click () { run_desktop_b_click () {
[[ -n "$1" ]] && echo "$1" > "${PORT_WINE_TMP_PATH}/tmp_yad_form" [[ ! -z "$1" ]] && echo "$1" > "${PORT_WINE_TMP_PATH}/tmp_yad_form"
if [[ -n $(pidof -s yad) ]] || [[ -n $(pidof -s yad_v12_3) ]] ; then if [[ ! -z $(pidof -s yad) ]] || [[ ! -z $(pidof -s yad_v12_3) ]] ; then
kill -s SIGUSR1 $(pgrep -a yad | grep "\-\-key=${KEY} \-\-notebook" | awk '{print $1}') > /dev/null 2>&1 kill -s SIGUSR1 $(pgrep -a yad | grep "\--key=${KEY} \-\-notebook" | awk '{print $1}') > /dev/null 2>&1
fi fi
PW_EXEC_FROM_DESKTOP="$(cat "${PORT_WINE_PATH}/${PW_YAD_SET//¬/" "}" | grep Exec | head -n 1 | awk -F"=env " '{print $2}')" PW_EXEC_FROM_DESKTOP="$(cat "${PORT_WINE_PATH}/${PW_YAD_SET//¬/" "}" | grep Exec | head -n 1 | awk -F"=env " '{print $2}')"
...@@ -714,15 +714,15 @@ else ...@@ -714,15 +714,15 @@ else
--field=" 3D API : :CB" "${PW_DEFAULT_VULKAN_USE}" \ --field=" 3D API : :CB" "${PW_DEFAULT_VULKAN_USE}" \
--field=" PREFIX : :CBE" "${PW_ADD_PREFIXES_TO_GUI}" \ --field=" PREFIX : :CBE" "${PW_ADD_PREFIXES_TO_GUI}" \
--field=" WINE : :CB" "${PW_DEFAULT_WINE_USE}" \ --field=" WINE : :CB" "${PW_DEFAULT_WINE_USE}" \
--field=" CREATE PFX BACKUP"!"$PW_GUI_ICON_PATH/separator.png"!"":"FBTN" '@bash -c "button_click pw_create_prefix_backup"' \
--field=' WINETRICKS'!"$PW_GUI_ICON_PATH/separator.png"!"${loc_winetricks}":"FBTN" '@bash -c "button_click WINETRICKS"' \
--field=" CLEAR PREFIX"!"$PW_GUI_ICON_PATH/separator.png"!"":"FBTN" '@bash -c "button_click gui_clear_pfx"' \
--field=" DOWNLOAD OTHER WINE"!"$PW_GUI_ICON_PATH/separator.png"!"${loc_download_other_wine}":"FBTN" '@bash -c "button_click gui_proton_downloader"' \ --field=" DOWNLOAD OTHER WINE"!"$PW_GUI_ICON_PATH/separator.png"!"${loc_download_other_wine}":"FBTN" '@bash -c "button_click gui_proton_downloader"' \
--field=" WINE UNINSTALLER"!"$PW_GUI_ICON_PATH/separator.png"!"":"FBTN" '@bash -c "button_click gui_wine_uninstaller"' \
--field=' WINECFG'!"$PW_GUI_ICON_PATH/separator.png"!"${loc_winecfg}":"FBTN" '@bash -c "button_click WINECFG"' \ --field=' WINECFG'!"$PW_GUI_ICON_PATH/separator.png"!"${loc_winecfg}":"FBTN" '@bash -c "button_click WINECFG"' \
--field=' WINEFILE'!"$PW_GUI_ICON_PATH/separator.png"!"${loc_winefile}":"FBTN" '@bash -c "button_click WINEFILE"' \ --field=' WINEFILE'!"$PW_GUI_ICON_PATH/separator.png"!"${loc_winefile}":"FBTN" '@bash -c "button_click WINEFILE"' \
--field=' WINECMD'!"$PW_GUI_ICON_PATH/separator.png"!"${loc_winecmd}":"FBTN" '@bash -c "button_click WINECMD"' \ --field=' WINECMD'!"$PW_GUI_ICON_PATH/separator.png"!"${loc_winecmd}":"FBTN" '@bash -c "button_click WINECMD"' \
--field=' WINEREG'!"$PW_GUI_ICON_PATH/separator.png"!"${loc_winereg}":"FBTN" '@bash -c "button_click WINEREG"' \ --field=' WINEREG'!"$PW_GUI_ICON_PATH/separator.png"!"${loc_winereg}":"FBTN" '@bash -c "button_click WINEREG"' 2>/dev/null 1> "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" &
--field=' WINETRICKS'!"$PW_GUI_ICON_PATH/separator.png"!"${loc_winetricks}":"FBTN" '@bash -c "button_click WINETRICKS"' \
--field=" WINE UNINSTALLER"!"$PW_GUI_ICON_PATH/separator.png"!"":"FBTN" '@bash -c "button_click gui_wine_uninstaller"' \
--field=" CLEAR PREFIX"!"$PW_GUI_ICON_PATH/separator.png"!"":"FBTN" '@bash -c "button_click gui_clear_pfx"' \
--field=" CREATE PFX BACKUP"!"$PW_GUI_ICON_PATH/separator.png"!"":"FBTN" '@bash -c "button_click pw_create_prefix_backup"' 2>/dev/null 1> "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" &
"${pw_yad_v12_3}" --plug=$KEY --tabnum=${PW_GUI_SORT_TABS[1]} --form --columns=3 --align-buttons --keep-icon-size --scroll \ "${pw_yad_v12_3}" --plug=$KEY --tabnum=${PW_GUI_SORT_TABS[1]} --form --columns=3 --align-buttons --keep-icon-size --scroll \
--field=" Dolphin 5.0"!"$PW_GUI_ICON_PATH/dolphin.png"!"":"FBTN" '@bash -c "button_click PW_DOLPHIN"' \ --field=" Dolphin 5.0"!"$PW_GUI_ICON_PATH/dolphin.png"!"":"FBTN" '@bash -c "button_click PW_DOLPHIN"' \
...@@ -773,12 +773,11 @@ else ...@@ -773,12 +773,11 @@ else
--field=" Path of Exile"!"$PW_GUI_ICON_PATH/poe.png"!"":"FBTN" '@bash -c "button_click PW_POE"' \ --field=" Path of Exile"!"$PW_GUI_ICON_PATH/poe.png"!"":"FBTN" '@bash -c "button_click PW_POE"' \
--field=" Guild Wars 2"!"$PW_GUI_ICON_PATH/gw2.png"!"":"FBTN" '@bash -c "button_click PW_GUILD_WARS_2"' \ --field=" Guild Wars 2"!"$PW_GUI_ICON_PATH/gw2.png"!"":"FBTN" '@bash -c "button_click PW_GUILD_WARS_2"' \
--field=" Genshin Impact"!"$PW_GUI_ICON_PATH/genshinimpact.png"!"":"FBTN" '@bash -c "button_click PW_GENSHIN_IMPACT"' \ --field=" Genshin Impact"!"$PW_GUI_ICON_PATH/genshinimpact.png"!"":"FBTN" '@bash -c "button_click PW_GENSHIN_IMPACT"' \
--field=" Battle Of Space Raiders"!"$PW_GUI_ICON_PATH/bsr.png"!"":"FBTN" '@bash -c "button_click PW_BSR"' \ --field=" Battle Of Space Raiders"!"$PW_GUI_ICON_PATH/bsr.png"!"":"FBTN" '@bash -c "button_click PW_BSR"' &
--field=" ROBLOX"!"$PW_GUI_ICON_PATH/roblox.png"!"":"FBTN" '@bash -c "button_click PW_ROBLOX"' 2>/dev/null &
# --field=" Electronic Arts App"!"$PW_GUI_ICON_PATH/eaapp.png"!"":"FBTN" '@bash -c "button_click PW_EAAPP"' # --field=" Electronic Arts App"!"$PW_GUI_ICON_PATH/eaapp.png"!"":"FBTN" '@bash -c "button_click PW_EAAPP"'
# --field=" Secret World Legends (ENG)"!"$PW_GUI_ICON_PATH/swl.png"!"":"FBTN" '@bash -c "button_click PW_SWL"' # --field=" Secret World Legends (ENG)"!"$PW_GUI_ICON_PATH/swl.png"!"":"FBTN" '@bash -c "button_click PW_SWL"'
# # --field=" ROBLOX"!"$PW_GUI_ICON_PATH/roblox.png"!"":"FBTN" '@bash -c "button_click PW_ROBLOX"' 2>/dev/null
# --field=" Bethesda.net Launcher"!"$PW_GUI_ICON_PATH/bethesda.png"!"":"FBTN" '@bash -c "button_click PW_BETHESDA"' # --field=" Bethesda.net Launcher"!"$PW_GUI_ICON_PATH/bethesda.png"!"":"FBTN" '@bash -c "button_click PW_BETHESDA"'
if [[ `command -v wmctrl` ]] &>/dev/null ; then if [[ `command -v wmctrl` ]] &>/dev/null ; then
...@@ -786,7 +785,7 @@ else ...@@ -786,7 +785,7 @@ else
while [[ $(pgrep -a yad_v12_3 | head -n 1 | awk '{print $1}' 2>/dev/null) ]] ; do while [[ $(pgrep -a yad_v12_3 | head -n 1 | awk '{print $1}' 2>/dev/null) ]] ; do
sleep 2 sleep 2
PW_MAIN_GUI_SIZE_TMP="$(wmctrl -lG | grep PortProton-1.0 | awk '{print $5" "$6}' 2>/dev/null)" PW_MAIN_GUI_SIZE_TMP="$(wmctrl -lG | grep PortProton-1.0 | awk '{print $5" "$6}' 2>/dev/null)"
if [[ -n "${PW_MAIN_GUI_SIZE_TMP}" ]] ; then if [[ ! -z "${PW_MAIN_GUI_SIZE_TMP}" ]] ; then
echo "${PW_MAIN_GUI_SIZE_TMP}" > "${PORT_WINE_TMP_PATH}/tmp_main_gui_size" echo "${PW_MAIN_GUI_SIZE_TMP}" > "${PORT_WINE_TMP_PATH}/tmp_main_gui_size"
fi fi
done done
...@@ -823,7 +822,7 @@ else ...@@ -823,7 +822,7 @@ else
export VULKAN_MOD=$(cat "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" | grep \;\; | awk -F";" '{print $1}') export VULKAN_MOD=$(cat "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" | grep \;\; | awk -F";" '{print $1}')
export PW_PREFIX_NAME=$(cat "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" | grep \;\; | awk -F";" '{print $2}' | sed -e "s/[[:blank:]]/_/g" ) export PW_PREFIX_NAME=$(cat "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" | grep \;\; | awk -F";" '{print $2}' | sed -e "s/[[:blank:]]/_/g" )
export PW_WINE_VER=$(cat "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" | grep \;\; | awk -F";" '{print $3}') export PW_WINE_VER=$(cat "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" | grep \;\; | awk -F";" '{print $3}')
if [[ -z "${PW_PREFIX_NAME}" ]] || [[ -n "$(echo "${PW_PREFIX_NAME}" | grep -E '^_.*' )" ]] ; then if [[ -z "${PW_PREFIX_NAME}" ]] || [[ ! -z "$(echo "${PW_PREFIX_NAME}" | grep -E '^_.*' )" ]] ; then
export PW_PREFIX_NAME="DEFAULT" export PW_PREFIX_NAME="DEFAULT"
else else
export PW_PREFIX_NAME="${PW_PREFIX_NAME^^}" export PW_PREFIX_NAME="${PW_PREFIX_NAME^^}"
...@@ -843,7 +842,7 @@ esac ...@@ -843,7 +842,7 @@ esac
init_wine_ver init_wine_ver
if [[ -z "${PW_DISABLED_CREATE_DB}" ]] ; then if [[ -z "${PW_DISABLED_CREATE_DB}" ]] ; then
if [[ -n "${PORTWINE_DB}" ]] && [[ -z "${PORTWINE_DB_FILE}" ]] ; then if [[ ! -z "${PORTWINE_DB}" ]] && [[ -z "${PORTWINE_DB_FILE}" ]] ; then
PORTWINE_DB_FILE=$(grep -il "\#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*) PORTWINE_DB_FILE=$(grep -il "\#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*)
if [[ -z "${PORTWINE_DB_FILE}" ]] ; then if [[ -z "${PORTWINE_DB_FILE}" ]] ; then
echo "#!/usr/bin/env bash" > "${portwine_exe}".ppdb echo "#!/usr/bin/env bash" > "${portwine_exe}".ppdb
...@@ -857,7 +856,7 @@ if [[ -z "${PW_DISABLED_CREATE_DB}" ]] ; then ...@@ -857,7 +856,7 @@ if [[ -z "${PW_DISABLED_CREATE_DB}" ]] ; then
edit_db_from_gui PW_VULKAN_USE PW_WINE_USE PW_PREFIX_NAME edit_db_from_gui PW_VULKAN_USE PW_WINE_USE PW_PREFIX_NAME
fi fi
[ -n "$PW_YAD_SET" ] && case "$PW_YAD_SET" in [ ! -z "$PW_YAD_SET" ] && case "$PW_YAD_SET" in
98) portwine_delete_shortcut ;; 98) portwine_delete_shortcut ;;
100) portwine_create_shortcut ;; 100) portwine_create_shortcut ;;
DEBUG|102) portwine_start_debug ;; DEBUG|102) portwine_start_debug ;;
......
#!/usr/bin/env bash #!/usr/bin/env bash
#Author: Castro-Fidel (linux-gaming.ru) #Author: Castro-Fidel (linux-gaming.ru)
#SCRIPTS_NEXT_VERSION=2221 #SCRIPTS_NEXT_VERSION=2222
######################################################################## ########################################################################
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 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
...@@ -30,6 +30,7 @@ export PROTON_DISABLE_LSTEAMCLIENT="0" ...@@ -30,6 +30,7 @@ export PROTON_DISABLE_LSTEAMCLIENT="0"
export PW_FORCE_LARGE_ADDRESS_AWARE="1" export PW_FORCE_LARGE_ADDRESS_AWARE="1"
export PW_MANGOHUD_x32="0" export PW_MANGOHUD_x32="0"
export PW_USE_EAC_AND_BE="1" export PW_USE_EAC_AND_BE="1"
export PW_USE_US_LAYOUT="0"
###GTK_CONFIG### ###GTK_CONFIG###
# export GTK_DATA_PREFIX= # export GTK_DATA_PREFIX=
# export GTK_THEME="Adwaita:dark" # export GTK_THEME="Adwaita:dark"
......
...@@ -108,8 +108,8 @@ open_changelog () { ...@@ -108,8 +108,8 @@ open_changelog () {
export -f open_changelog export -f open_changelog
pw_tray_icon () { pw_tray_icon () {
if [ ! -z "`pgrep -a yad_v12_3 | grep "\-\-notification" | awk '{print $1}'`" ] ; then if [ ! -z "`pgrep -a yad_v12_3 | grep "\--notification" | awk '{print $1}'`" ] ; then
kill -s SIGUSR1 "`pgrep -a yad_v12_3 | grep "\-\-notification" | awk '{print $1}'`" kill -s SIGUSR1 "`pgrep -a yad_v12_3 | grep "\--notification" | awk '{print $1}'`"
fi fi
tray_icon_click () { tray_icon_click () {
...@@ -155,7 +155,7 @@ pw_gui_for_edit_db () { ...@@ -155,7 +155,7 @@ pw_gui_for_edit_db () {
FPS_LIMIT_VAR="disabled" FPS_LIMIT_VAR="disabled"
fi fi
if [[ -n "${PW_WINE_CPU_TOPOLOGY}" ]] && [[ "${PW_WINE_CPU_TOPOLOGY}" != "disabled" ]] ; then if [[ ! -z "${PW_WINE_CPU_TOPOLOGY}" ]] && [[ "${PW_WINE_CPU_TOPOLOGY}" != "disabled" ]] ; then
CPU_LIMIT_VAR="`echo ${PW_WINE_CPU_TOPOLOGY%%:*}`" CPU_LIMIT_VAR="`echo ${PW_WINE_CPU_TOPOLOGY%%:*}`"
else else
CPU_LIMIT_VAR="disabled" CPU_LIMIT_VAR="disabled"
...@@ -366,7 +366,7 @@ gui_proton_downloader () { ...@@ -366,7 +366,7 @@ gui_proton_downloader () {
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_wine_ge_custom_git" try_remove_file "${PORT_WINE_TMP_PATH}/tmp_wine_ge_custom_git"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_installed_wine" try_remove_file "${PORT_WINE_TMP_PATH}/tmp_installed_wine"
elif [[ "$1" == "silent" ]] && [[ -n "$2" ]] ; then elif [[ "$1" == "silent" ]] && [[ ! -z "$2" ]] ; then
VERSION_WINE_GIT="$2" VERSION_WINE_GIT="$2"
fi fi
......
...@@ -19,7 +19,7 @@ if [ "$my_dir" == "/usr/bin" ] ; then ...@@ -19,7 +19,7 @@ if [ "$my_dir" == "/usr/bin" ] ; then
/usr/bin/env bash "${XDG_DATA_HOME}/PortWINE/PortProton/data/scripts/start.sh" "$@" /usr/bin/env bash "${XDG_DATA_HOME}/PortWINE/PortProton/data/scripts/start.sh" "$@"
exit 0 exit 0
else else
if [ -n "$(locale | grep "LANG=ru_RU.UTF-8")" ] ; then if [ ! -z "$(locale | grep "LANG=ru_RU.UTF-8")" ] ; then
PW_SET_LANG=$RUS_LANG PW_SET_LANG=$RUS_LANG
else else
PW_SET_LANG=$ENG_LANG PW_SET_LANG=$ENG_LANG
......
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