Commit 1e0d6fea authored by Mikhail Tergoev's avatar Mikhail Tergoev

###Scripts version 2035###

parent 74fcce04
......@@ -7,6 +7,13 @@
* добавить проверку количества db файлов на один exe
* заниматься только развитием проекта за счет вашей подписки на https://boosty.to/portwine-linux.ru
-----------------------------------------
###Scripts version 2035###
* в EDIT_DB добавлена возможность ограничения FPS
* обновлеение winetricks происходит только при условии его последуещего использования (если не установлены какие-нибудь компоненты)
* значитель уменьшена задержка при перезапуске порта
* ускорено обновление префикса после смены версии WINE
* улучшена работа индикации загрузки порта
###Scripts version 2034###
* добавлены всплывающие описания эффектов vkBasalt в интерфейсе для его настройки (будут еще дополняться)
......@@ -60,7 +67,7 @@
* добавлена поддержка DLSS (требуется включение в EDIT_DB параметра PW_USE_NVAPI_AND_DLSS)
* добавлена функция автоматического удаления старых версий контейнеров (libs_vXX)
* значительная переработка условий в скриптах
* убрана задержка при перезапуске порта
* уменьшена задержка при перезапуске порта
* добавлен GUI для выбора версии PROTON_GE c github
PS: За помощь в создании автоустановки LoL, отдельное спасибо Dezert1r!
......
......@@ -75,7 +75,7 @@ then
export PW_USE_GSTREAMER_INFO='Использовать Gstreamer для вывода роликов в играх (поддержка WMF)'
export PW_USE_RUNTIME_INFO='Использовать контейнерный режим запуска (Рекомендуется не изменять значение)'
export PW_MANGOHUD_INFO='Использование мониторинга FPS и нагрузки системы (Включается и выключается сочитанием клавиш - правый Shift + F12)'
export PW_USE_GAMEMODE_INFO='Использование автоматической оптимизации системы для увеличение производительности в играх (при условии установленного пакета gamemode в системе)'
export PW_USE_GAMEMODE_INFO='Использование автоматической оптимизации системы для увеличения производительности в играх (при условии установленного пакета gamemode в системе)'
export PW_3DFX_INFO='Имитация старого графического ускорителя 3dfx (добавляет горизонтальные полосы)'
export PW_AdaptiveSharpen_INFO='Увеличение резкости, можно использовать совместо с CAS'
......
......@@ -23,10 +23,9 @@ fi
start_portwine () {
pw_check_and_download_wine "${PW_WINE_USE}"
init_wine_ver
init_wine_ver
pw_download_mono
pw_download_gecko
pw_tray_icon &
if [ -x "`which konsole 2>/dev/null`" ]; then export PW_TERM="konsole --nofork -e"
# elif [ -x "`which gnome-terminal 2>/dev/null`" ]; then export PW_TERM="gnome-terminal -- /bin/bash" ???
elif [ -x "`which lxterminal 2>/dev/null`" ]; then export PW_TERM="lxterminal -e"
......@@ -37,8 +36,24 @@ start_portwine () {
cp -f "${PORT_SCRIPTS_PATH}/.Xresources" "${HOME}"
xrdb -merge "${HOME}/.Xresources"
fi
pw_tray_icon
pw_start_progress_bar_block "Update prefix for ${PW_WINE_USE}... Please wait..."
pw_start_progress_bar_block "Start ${portname}... Please wait..."
if [[ ! -z "${LD_LIBRARY_PATH}" ]] ; then
if [[ -z "`echo ${LD_LIBRARY_PATH} | grep "${WINEDIR}/lib64:${WINEDIR}/lib"`" ]] ; then
export LD_LIBRARY_PATH="${WINEDIR}/lib64:${WINEDIR}/lib:${LD_LIBRARY_PATH}"
fi
else
export LD_LIBRARY_PATH="${WINEDIR}/lib64:${WINEDIR}/lib"
fi
if [ ! -z ${PATH_TMP} ]
then export PATH="${PATH_TMP}"
else export PATH_TMP="${PATH}"
fi
if [ ! -z "${PATH}" ]
then export PATH="${WINEDIR}/bin:${PATH}"
else export PATH="${WINEDIR}/bin"
fi
if [ "${PW_USE_GSTREAMER}" = 1 ] ; then
if [ -d "${WINEDIR}/lib64/gstreamer-1.0" ] ; then
......@@ -154,7 +169,7 @@ start_portwine () {
export RADV_DEBUG="llvm"
var_vkd3d_config_update single_queue
fi
if [[ ! -z "${PW_USE_NVAPI_AND_DLSS_AND_DLSS}" && "${PW_USE_NVAPI_AND_DLSS_AND_DLSS}" == 1 && -d "${WINEDIR}/lib/wine/nvapi/" ]]
if [[ ! -z "${PW_USE_NVAPI_AND_DLSS}" && "${PW_USE_NVAPI_AND_DLSS}" == 1 && -d "${WINEDIR}/lib/wine/nvapi/" ]]
then
try_copy_file "${WINEDIR}/lib/wine/nvapi/nvapi.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${WINEDIR}/lib64/wine/nvapi/nvapi64.dll" "${WINEPREFIX}/drive_c/windows/system32/"
......@@ -220,7 +235,7 @@ start_portwine () {
esac
export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/dxvk.conf"
export int_xneur=0
if [ $(pgrep xneur)>'0' ]; then
if [[ ! -z "`pgrep xneur`" ]]; then
killall xneur
export int_xneur=1
fi
......@@ -237,10 +252,14 @@ start_portwine () {
export PW_GAMEMODERUN=0
echo "Gamemod is not installed or disabled in vars script or db file: PW_USE_GAMEMODE=$PW_USE_GAMEMODE"
fi
pw_vkbasalt_check
pw_other_fixes
#init_pfx
if [[ ! -d "${WINEPREFIX}" || ! -d "${WINEPREFIX}"/drive_c/windows || ! -d "${WINEPREFIX}/dosdevices" || ! -f "${WINEPREFIX}"/userdef.reg || ! -f "${WINEPREFIX}"/system.reg || ! -f "${WINEPREFIX}"/user.reg ]]
if [[ ! -d "${WINEPREFIX}" || ! -d "${WINEPREFIX}"/drive_c/windows || ! -d "${WINEPREFIX}/dosdevices" || \
! -f "${WINEPREFIX}"/userdef.reg || ! -f "${WINEPREFIX}"/system.reg || ! -f "${WINEPREFIX}"/user.reg || \
-z "`cat ${WINEPREFIX}/.wine_ver | grep ${PW_WINE_USE}`" ]]
then
pw_clear_pfx
# pw_clear_pfx
create_new_dir "${WINEPREFIX}"
create_new_dir "${WINEPREFIX}/drive_c"
create_new_dir "${WINEPREFIX}/dosdevices"
......@@ -254,15 +273,12 @@ start_portwine () {
try_copy_file "${WINEDIR}/share/fonts/"LiberationSerif-Regular.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"times.ttf
try_copy_file "${WINEDIR}/share/fonts/"LiberationMono-Regular.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"cour.ttf
try_copy_file "${WINEDIR}/share/fonts/"SourceHanSansSCRegular.otf "${WINEPREFIX}/drive_c/windows/Fonts/"msyh.ttf
pw_stop_progress_bar
pw_start_progress_bar_block "Updating prefix... Please wait..."
kill_portwine
${pw_runtime} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${WINELOADER}" wineboot -u
wait_wineserver
kill_portwine
fi
pw_stop_progress_bar
pw_start_progress_bar_cs "Initialization prefix..."
# kill_portwine &&
${pw_runtime} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${WINELOADER}" wineboot -i
wait_wineserver &&
# kill_portwine &&
echo "${PW_WINE_USE}" > "${WINEPREFIX}/.wine_ver"
fi
[ ! -d "${WINEPREFIX}/dosdevices/c:" ] && try_force_link_dir "${WINEPREFIX}/drive_c/" "${WINEPREFIX}/dosdevices/c:"
[ ! -d "${WINEPREFIX}/dosdevices/z:" ] && try_force_link_dir "/" "${WINEPREFIX}/dosdevices/z:"
create_new_dir "${WINEPREFIX}/drive_c/users/steamuser"
......@@ -310,7 +326,7 @@ start_portwine () {
done
var_winedlloverride_update "d3d11,d3d10,d3d10core,d3d10_1,d3d9,dxgi=b"
elif [ "${PW_VULKAN_USE}" = "1" ] ; then
echo "Use VKD3D-PROTON and DXVK (DX12 to vulkan)"
echo "Use VKD3D-PROTON and DXVK (DX 9-12 to vulkan)"
export CP_DXVK_FILES="d3d11 d3d10 d3d10core d3d10_1 d3d9"
echo "Try copy native DXVK files"
for wine_dxvk_dll in ${CP_DXVK_FILES} ; do
......@@ -344,9 +360,7 @@ start_portwine () {
export __GL_SHADER_DISK_CACHE_PATH="${PORT_WINE_TMP_PATH}/gl_shader_cache"
export __GL_SHADER_DISK_CACHE=1
export __GL_SHADER_DISK_CACHE_SIZE=1000000000
pw_other_fixes
#run_winetricks_from_db
update_winetricks
if [ ! -z "${PW_MUST_HAVE_DLL}" ]
then export PW_DLL_INSTALL="${PW_MUST_HAVE_DLL} ${PW_DLL_INSTALL}"
fi
......@@ -375,13 +389,13 @@ start_portwine () {
fi
done
if [ "${USE_WT_FROM_DB}" == "1" ] ; then
pw_stop_progress_bar
update_winetricks
print_info "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}"
chmod -R 775 "${HOME}/.cache/winetricks"
if [ "${PW_WINE_VER}" != "PROTON_STEAM" ] ; then
export PW_WINE_VER_FROM_DB="${PW_WINE_USE}"
export PW_WINE_VER="PROTON_STEAM"
init_wine_ver
init_wine_ver &&
cabextract_fix
fi
${pw_runtime} xterm -e env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" \
......@@ -398,11 +412,11 @@ start_portwine () {
fi
${pw_runtime} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" \
"${WINELOADER}" winecfg -v `echo "win${PW_WINDOWS_VER}" | sed 's/.*/\L&/'`
wait_wineserver &&
echo "Set to win${PW_WINDOWS_VER}"
wait_wineserver
fi
add_in_start_portwine
pw_stop_progress_bar
pw_stop_progress_bar &&
pw_start_progress_bar_cs "Start ${portname}... Please wait..."
}
......@@ -416,7 +430,6 @@ pw_run () {
cd "${WINEPREFIX}/drive_c"
fi
pw_mangohud_check
pw_vkbasalt_check
print_var "WINEDIR" "WINEPREFIX" "WINEDLLOVERRIDES" "PATH_TO_GAME" "PW_WINE_USE" "PW_VULKAN_USE" "VKD3D_CONFIG" "LD_LIBRARY_PATH" "PATH"
if [ "${PW_LOG}" == 1 ] ; then
export PW_LOG_TO_FILE="${PORT_WINE_PATH}/${portname}.log"
......@@ -437,6 +450,7 @@ pw_run () {
${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
fi
fi
stop_portwine
}
###MAIN###
......@@ -469,16 +483,9 @@ fi
create_new_dir "${PORT_WINE_TMP_PATH}"/gecko
create_new_dir "${PORT_WINE_TMP_PATH}"/mono
if [ -d "${HOME}/.PortWINE/" ] ; then
try_remove_dir "${HOME}/.PortWINE/tmp"
mv -f "${HOME}/.PortWINE"/* "${PORT_WINE_TMP_PATH}"
try_remove_dir "${HOME}/.PortWINE/"
fi
cd "${PORT_SCRIPTS_PATH}"
. "${PORT_SCRIPTS_PATH}/var"
[ -f "${PORT_SCRIPTS_PATH}/autoinstall" ] && try_remove_file "${PORT_SCRIPTS_PATH}/autoinstall"
if [ ! -f "${PORT_WINE_TMP_PATH}/${portname}_loc" ] ; then
SET_LANG=`zenity --title "Install $portname" --text "Select the language" --list --radiolist \
--column="Set:" --column "Language:" TRUE "RUS" FALSE "ENG" `
......
......@@ -186,6 +186,7 @@ pw_winecmd () {
start_portwine
cd "${WINEPREFIX}/drive_c"
${pw_runtime} xterm -e env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${WINELOADER}" cmd
stop_portwine
}
pw_winereg () {
......@@ -201,6 +202,7 @@ pw_winetricks () {
cabextract_fix
start_portwine
${PW_TERM} "${PORT_WINE_TMP_PATH}/winetricks" -q -r
stop_portwine
}
pw_edit_db () {
......@@ -238,7 +240,7 @@ PW_ALL_DIST=`ls "${PORT_WINE_PATH}/data/dist/" | sed -e s/"PROTON_GE$//g" | sed
unset DIST_ADD_TO_GUI
for DAIG in ${PW_ALL_DIST}
do
export DIST_ADD_TO_GUI="${DIST_ADD_TO_GUI}\!${DAIG}"
export DIST_ADD_TO_GUI="${DIST_ADD_TO_GUI}!${DAIG}"
done
if [ ! -z "${PORTWINE_DB_FILE}" ] ; then
[ -z "${PW_COMMENT_DB}" ] && PW_COMMENT_DB="PortWINE database file for "\"${PORTWINE_DB}"\" was found."
......@@ -248,24 +250,24 @@ if [ ! -z "${PORTWINE_DB_FILE}" ] ; then
[ -z "${PW_WINE_USE}" ] && export PW_WINE_USE=PROTON_STEAM
fi
case "${PW_VULKAN_USE}" in
"dxvk") export PW_DEFAULT_VULKAN_USE='DXVK (DX 9-11 to Vulkan)\!VULKAN (DXVK and VKD3D)\!OPENGL ' ;;
"0") export PW_DEFAULT_VULKAN_USE='OPENGL \!VULKAN (DXVK and VKD3D)\!DXVK (DX 9-11 to Vulkan)' ;;
*) export PW_DEFAULT_VULKAN_USE='VULKAN (DXVK and VKD3D)\!DXVK (DX 9-11 to Vulkan)\!OPENGL ' ;;
"dxvk") export PW_DEFAULT_VULKAN_USE='DXVK (DX 9-11 to Vulkan)!VULKAN (DXVK and VKD3D)!OPENGL ' ;;
"0") export PW_DEFAULT_VULKAN_USE='OPENGL !VULKAN (DXVK and VKD3D)!DXVK (DX 9-11 to Vulkan)' ;;
*) export PW_DEFAULT_VULKAN_USE='VULKAN (DXVK and VKD3D)!DXVK (DX 9-11 to Vulkan)!OPENGL ' ;;
esac
case "${PW_WINE_USE}" in
"PROTON_GE") export PW_DEFAULT_WINE_USE="PROTON_GE (${PW_GE_VER})\!PROTON_STEAM (${PW_STEAM_VER})${DIST_ADD_TO_GUI}" ;;
"PROTON_STEAM") export PW_DEFAULT_WINE_USE="PROTON_STEAM (${PW_STEAM_VER})\!PROTON_GE (${PW_GE_VER})${DIST_ADD_TO_GUI}" ;;
"PROTON_GE") export PW_DEFAULT_WINE_USE="PROTON_GE (${PW_GE_VER})!PROTON_STEAM (${PW_STEAM_VER})${DIST_ADD_TO_GUI}" ;;
"PROTON_STEAM") export PW_DEFAULT_WINE_USE="PROTON_STEAM (${PW_STEAM_VER})!PROTON_GE (${PW_GE_VER})${DIST_ADD_TO_GUI}" ;;
*)
export DIST_ADD_TO_GUI=`echo ${DIST_ADD_TO_GUI} | sed -e s/"\!${PW_WINE_USE}$//g"`
export PW_DEFAULT_WINE_USE="${PW_WINE_USE}\!PROTON_STEAM (${PW_STEAM_VER})\!PROTON_GE (${PW_GE_VER})${DIST_ADD_TO_GUI}" ;;
export PW_DEFAULT_WINE_USE="${PW_WINE_USE}!PROTON_STEAM (${PW_STEAM_VER})!PROTON_GE (${PW_GE_VER})${DIST_ADD_TO_GUI}" ;;
esac
else
export PW_DEFAULT_VULKAN_USE='VULKAN (DXVK and VKD3D)\!DXVK (DX 9-11 to Vulkan)\!OPENGL '
export PW_DEFAULT_WINE_USE="PROTON_STEAM (${PW_STEAM_VER})\!PROTON_GE (${PW_GE_VER})${DIST_ADD_TO_GUI}"
export PW_DEFAULT_VULKAN_USE='VULKAN (DXVK and VKD3D)!DXVK (DX 9-11 to Vulkan)!OPENGL '
export PW_DEFAULT_WINE_USE="PROTON_STEAM (${PW_STEAM_VER})!PROTON_GE (${PW_GE_VER})${DIST_ADD_TO_GUI}"
unset PW_GUI_DISABLED_CS
fi
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
OUTPUT_START=$("${pw_yad}" --text-align=center --text "$PW_COMMENT_DB" --wrap-width=150 --borders=15 --form --center \
--title "${portname}-${install_ver} (${scripts_install_ver})" --image "$PW_GUI_ICON_PATH/port_proton.png" --separator=";" \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" \
......@@ -293,13 +295,6 @@ else
}
export -f button_click
open_changelog () {
"${pw_yad}" --title="Changelog" --borders=10 --no-buttons --text-align=center \
--text-info --show-uri --wrap --center --width=1200 --height=550 --uri-color=red \
--filename="${PORT_WINE_PATH}/data/changelog"
}
export -f open_changelog
gui_clear_pfx () {
if gui_question "${port_clear_pfx}" ; then
pw_clear_pfx
......@@ -356,11 +351,11 @@ else
"${pw_yad}" --plug=${KEY} --tabnum=1 --columns=3 --form --separator=";" \
--image "$PW_GUI_ICON_PATH/port_proton.png" \
--field=":CB" "VULKAN (DXVK and VKD3D)\!DXVK (DX 9-11 to Vulkan)\!OPENGL" \
--field=":CB" "VULKAN (DXVK and VKD3D)!DXVK (DX 9-11 to Vulkan)!OPENGL" \
--field=":LBL" "" \
--field='DEBUG'!!"${loc_debug}":"BTN" '@bash -c "button_click DEBUG"' \
--field='WINECFG'!!"${loc_winecfg}":"BTN" '@bash -c "button_click WINECFG"' \
--field=":CB" "PROTON_STEAM (${PW_STEAM_VER})\!PROTON_GE (${PW_GE_VER})${DIST_ADD_TO_GUI}" \
--field=":CB" "PROTON_STEAM (${PW_STEAM_VER})!PROTON_GE (${PW_GE_VER})${DIST_ADD_TO_GUI}" \
--field=":LBL" "" \
--field='WINEFILE'!!"${loc_winefile}":"BTN" '@bash -c "button_click WINEFILE"' \
--field='WINECMD'!!"${loc_winecmd}":"BTN" '@bash -c "button_click WINECMD"' \
......@@ -427,7 +422,5 @@ case "$PW_YAD_SET" in
gui_rm_portproton) gui_rm_portproton ;;
gui_proton_downloader) gui_proton_downloader ;;
120) gui_vkBasalt ;;
*) pw_autoinstall_from_db ;;
PW_*) pw_autoinstall_from_db ;;
esac
stop_portwine
#!/bin/bash
#Author: Castro-Fidel (PortWINE-Linux.ru)
#SCRIPTS_NEXT_VERSION=2034
#SCRIPTS_NEXT_VERSION=2035
#PORT_NEXT_VERSION=97
########################################################################
export PW_MANGOHUD=0
......@@ -69,6 +69,6 @@ for fix_reg in "PnkBstrA.exe" "PnkBstrB.exe" ; do
sed -i "${sysreg_norig}s/dword:0000000[1-2]/dword:00000003/" "${WINEPREFIX}/system.reg"
fi
done
#disabled silent autostart steam
sed -i '/steam.exe\\" -silent"/d' "${WINEPREFIX}/user.reg"
}
###FOR_OLD_VERSION_PORTPROTON###
#SCRIPTS_VERSION=1000
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