Commit 0e4ff2da authored by Mikhail Tergoev's avatar Mikhail Tergoev

Scripts version 2085

parent f6764ec4
......@@ -2,6 +2,12 @@ You can help us in the development of the project on the website: https://boosty
-----------------------------------------
Changelog:
###Scripts version 2085###
* added argument editor for ".exe" file to "EDIT_DB" interface
* added "WINDOWS" version selection to "EDIT_DB" interface
* added "WINEDLLOVERRIDES" variable editor to "EDIT_DB" interface
* added "AUTOINSTALL WITH WINETRICKS" to "EDIT_DB" interface for installing "WINDOWS" libraries
###Scripts version 2084###
* improved function of displaying the icon of the file being launched in the PortProton GUI
* fixed function of changing "CREATE_SHORTCUT" button in PortProton interface
......
......@@ -2,6 +2,12 @@
-----------------------------------------
История изменений:
###Scripts version 2085###
* добавлен редактор аргументов для ".exe" файла в интерфейс "EDIT_DB"
* добавлен выбор версии "WINDOWS" в интерфейс "EDIT_DB"
* добавлен редактор переменной "WINEDLLOVERRIDES" в интерфейс "EDIT_DB"
* добавлен "AUTOINSTALL WITH WINETRICKS" в интерфейс "EDIT_DB" для установки "WINDOWS" библиотек
###Scripts version 2084###
* улучшена функция отображения иконки запускаемого файла в графическом интерфейсе PortProton
* исправлена функция изменения в интерфейсе PortProton кнопки "CREATE_SHORTCUT"
......
......@@ -49,18 +49,16 @@ export -f try_copy_dir
try_remove_file () {
if [ -f "$1" ] ; then
rm -f "$1"
[ "$?" != 0 ] && print_error "failed to remove file $1" || return 0
[ "$?" == 0 ] && return 0 || return 1
fi
return 1
}
export -f try_remove_file
try_remove_dir () {
if [ -d "$1" ] ; then
rm -fr "$1"
[ "$?" != 0 ] && print_error "failed to remove directory $1" || return 0
[ "$?" == 0 ] && return 0 || return 1
fi
return 1
}
export -f try_remove_dir
......@@ -189,12 +187,12 @@ unpack_tar () {
}
pw_mangohud_check () {
export RUN_MANGOHUD=""
if [ "${PW_MANGOHUD}" == "1" ] ; then
if [ "${PW_VULKAN_USE}" = "0" ] ; then
export RUN_MANGOHUD="${PW_WINELIB}/portable/bin/mangohud --dlsym"
export RUN_MANGOHUD_IN_SLR=""
if [[ "${PW_MANGOHUD}" == "1" ]] ; then
if [[ "${PW_VULKAN_USE}" = "0" ]] ; then
export RUN_MANGOHUD_IN_SLR="mangohud --dlsym"
else
export RUN_MANGOHUD="${PW_WINELIB}/portable/bin/mangohud"
export RUN_MANGOHUD_IN_SLR="mangohud"
fi
else
export DISABLE_MANGOHUD=1
......@@ -546,7 +544,7 @@ pw_init_db () {
export PORTWINE_DB=`echo "${portwine_exe}" | awk -F '/' 'NF>1{print $NF}' | sed s/".exe"/""/gi`
orig_IFS="$IFS"
IFS=$'\n'
PW_FIND_DB_FILE=`grep -ilw "#${PORTWINE_DB}" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi`
PW_FIND_DB_FILE=`grep -ilw "#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi`
if [[ `echo "$PW_FIND_DB_FILE" | wc -l` -gt 1 ]] ; then
unset ADD_CB_DBFILE
for PW_CHECK_DB_FILE in $PW_FIND_DB_FILE ; do
......@@ -707,6 +705,7 @@ pw_create_gui_png () {
export PORTPROTON_NAME="$(basename "${portwine_exe}" | sed s/".exe"/""/gi )"
fi
PW_RESIZE_TO=96
try_remove_file "${PORT_WINE_PATH}/data/img/setup.png"
if [[ -x "`which wrestool 2>/dev/null`" ]] && [[ ! -f "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" ]] ; then
try_remove_dir "${PORT_WINE_TMP_PATH}/tmp_img"
create_new_dir "${PORT_WINE_TMP_PATH}/tmp_img"
......
......@@ -85,6 +85,7 @@ then
export PW_MANGOHUD_USER_CONF_INFO='Принудительное использование системных настроек MANGOHUD (GOverlay и т.п.)'
export PW_D3D_EXTRAS_DISABLE_INFO='Отключить принудительное использование сторонних библиотек DirectX'
export PW_PRIME_RENDER_OFFLOAD_INFO='Включить дискретную видеокарту NVIDIA для ноутбуков с гибридной графикой (при поддержке установленого драйвера в ОС)'
export PW_USE_WINDOWS_7_INFO='Изменить версию WINDOWS 10 на WINDOWS 7 в префиксе'
export PW_3DFX_INFO='Имитация старого графического ускорителя 3dfx (добавляет горизонтальные полосы)'
export PW_AdaptiveSharpen_INFO='Увеличение резкости, можно использовать совместо с CAS'
......
......@@ -4,7 +4,7 @@
#Rating=5
################################################
export PW_COMMENT_DB="Steam"
export PW_WINDOWS_VER=7 # Set windows version 10, 7 or XP
export PW_WINDOWS_VER=7
export PW_DLL_INSTALL="vcrun2019 d3dcompiler_46"
export WINEDLLOVERRIDES="libglesv2,lsteamclient="
export LAUNCH_PARAMETERS="-no-cef-sandbox"
......
......@@ -40,7 +40,10 @@ start_portwine () {
pw_update_pfx_cover_gui
if [[ ! -z "`cat /etc/*-release | grep -i opensuse`" ]] || [[ ! -z "`cat /etc/*-release | grep -i centos`" ]] ; then
if [[ ! -z "`cat /etc/*-release | grep -i opensuse`" ]] \
|| [[ ! -z "`cat /etc/*-release | grep -i centos`" ]] \
|| [[ ! -z "`cat /etc/*-release | grep -i fedora`" ]] \
|| [[ ! -z "`cat /etc/*-release | grep -i gentoo`" ]] ; then
if check_symlink "${PW_WINELIB}/portable/lib/lib64" ; then
rm -fr "${PW_WINELIB}/portable/lib/lib64"
fi
......@@ -210,7 +213,6 @@ start_portwine () {
elif [[ ! -z "${PW_USE_DXR10}" && "${PW_USE_DXR10}" != 0 ]]
then var_vkd3d_config_update dxr
fi
export optirun_on=""
export check_optimus_manager=
export PW_NVIDIA="$(lspci | grep NVIDIA)"
......@@ -367,7 +369,7 @@ start_portwine () {
# export TOTAL_VRAM=`"${PW_WINELIB}/runtime/files/bin/glxinfo" -B | grep Total | awk -F: '{print $2}' | awk '{print $1}'`
# echo "TOTAL_VRAM=${TOTAL_VRAM}"
if [[ "${PW_VULKAN_USE}" = "0" ]] ; then
if [[ "${PW_VULKAN_USE}" == "0" ]] ; then
echo "Use OpenGL"
export MESA_GLSL_CACHE_DIR="${PORT_WINE_TMP_PATH}"
export GL_YIELD="NOTHING"
......@@ -396,7 +398,7 @@ start_portwine () {
try_force_link_file "${WINEDIR}/lib/wine/dxvk/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/${wine_dxvk_dll}.dll"
try_force_link_file "${WINEDIR}/lib64/wine/dxvk/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/${wine_dxvk_dll}.dll"
done
if [[ "${PW_USE_WINE_DXGI}" = 1 ]] || [[ "${PW_VULKAN_USE}" = "2" ]]; then
if [[ "${PW_USE_WINE_DXGI}" == 1 ]] || [[ "${PW_VULKAN_USE}" == "2" ]]; then
echo "Try link wine DXGI..."
if ! try_force_link_file "${WINEDIR}"/lib/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/syswow64/dxgi.dll"
then try_force_link_file "${WINEDIR}"/lib/wine/i386-windows/dxgi.dll "${WINEPREFIX}/drive_c/windows/syswow64/dxgi.dll"
......@@ -503,25 +505,28 @@ pw_run () {
cd "${WINEPREFIX}/drive_c"
fi
pw_mangohud_check
PW_LOG_TO_FILE="${PORT_WINE_PATH}/${portname}.log"
print_var "WINEDIR" "WINEPREFIX" "WINEDLLOVERRIDES" "PATH_TO_GAME" "PW_WINE_USE" "PW_VULKAN_USE" "VKD3D_CONFIG" \
"LD_LIBRARY_PATH" "PATH" "WINEESYNC" "WINEFSYNC" "WINEFSYNC_FUTEX2"
if [ "${PW_LOG}" == 1 ] ; then
export PW_LOG_TO_FILE="${PORT_WINE_PATH}/${portname}.log"
echo "WINEDLLOVERRIDES=${WINEDLLOVERRIDES}" >> "${PW_LOG_TO_FILE}"
echo "------------------------------------" >> "${PW_LOG_TO_FILE}"
echo "Log WINE:" >> "${PW_LOG_TO_FILE}"
if [[ ! -z "${PW_GAMEMODERUN}" && "${PW_GAMEMODERUN}" != 0 ]] ; then
${optirun_on} ${pw_runtime} env LD_PRELOAD="${PW_LD_PRELOAD}" VK_LAYER_PATH="${VK_LAYER_PATH}" PATH="${PATH}" \
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]} &>>"${PW_LOG_TO_FILE}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" ${RUN_MANGOHUD_IN_SLR} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
else
${optirun_on} ${pw_runtime} env VK_LAYER_PATH="${VK_LAYER_PATH}" PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" \
${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]} &>>"${PW_LOG_TO_FILE}"
${RUN_MANGOHUD_IN_SLR} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
fi
else
[ "${PW_USE_TERMINAL}" != "1" ] && export PW_TERM=""
if [[ ! -z "${PW_GAMEMODERUN}" && "${PW_GAMEMODERUN}" != 0 ]] ; then
$PW_TERM ${optirun_on} ${pw_runtime} env LD_PRELOAD="${PW_LD_PRELOAD}" VK_LAYER_PATH="${VK_LAYER_PATH}" PATH="${PATH}" \
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" ${RUN_MANGOHUD_IN_SLR} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]}
else
$PW_TERM ${optirun_on} ${pw_runtime} env VK_LAYER_PATH="${VK_LAYER_PATH}" PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" \
${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
${RUN_MANGOHUD_IN_SLR} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]}
fi
fi
}
......
......@@ -160,7 +160,6 @@ portwine_start_debug () {
cat "${USER_CONF}" | sed '/bash/d' >> "${PORT_WINE_PATH}/${portname}.log"
fi
echo "----------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Log WINE:" >> "${PORT_WINE_PATH}/${portname}.log"
export DXVK_HUD="full"
......@@ -188,7 +187,6 @@ portwine_start_debug () {
sed -i '/GStreamer/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/kerberos/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/ntlm/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/winemenubuilder.exe/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/HACK_does_openvr_work/d' "${PORT_WINE_PATH}/${portname}.log"
sed -i '/Uploading is disabled/d' "${PORT_WINE_PATH}/${portname}.log"
deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++')
......@@ -252,8 +250,8 @@ pw_winetricks () {
pw_edit_db () {
pw_gui_for_edit_db PW_MANGOHUD PW_MANGOHUD_USER_CONF ENABLE_VKBASALT PW_NO_ESYNC PW_NO_FSYNC PW_USE_DXR10 PW_USE_DXR11 \
PW_VULKAN_NO_ASYNC PW_USE_NVAPI_AND_DLSS PW_OLD_GL_STRING PW_HIDE_NVIDIA_GPU PW_FORCE_USE_VSYNC PW_VIRTUAL_DESKTOP \
PW_WINEDBG_DISABLE PW_USE_TERMINAL PW_WINE_ALLOW_XIM PW_HEAP_DELAY_FREE PW_NO_WRITE_WATCH PW_GUI_DISABLED_CS \
PW_USE_GSTREAMER PW_USE_GAMEMODE PW_DX12_DISABLE PW_PRIME_RENDER_OFFLOAD PW_D3D_EXTRAS_DISABLE
PW_WINEDBG_DISABLE PW_USE_TERMINAL PW_WINE_ALLOW_XIM PW_HEAP_DELAY_FREE PW_GUI_DISABLED_CS PW_USE_GSTREAMER \
PW_USE_GAMEMODE PW_DX12_DISABLE PW_PRIME_RENDER_OFFLOAD PW_D3D_EXTRAS_DISABLE
if [ "$?" == 0 ] ; then
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
......
#!/bin/env bash
#Author: Castro-Fidel (PortWINE-Linux.ru)
#SCRIPTS_NEXT_VERSION=2084
#SCRIPTS_NEXT_VERSION=2085
#PORT_NEXT_VERSION=97
########################################################################
export PW_MANGOHUD=1
......
......@@ -162,10 +162,21 @@ pw_gui_for_edit_db () {
1> "${PORT_WINE_TMP_PATH}/tmp_output_yad_edit_db" &
IFS=$old_IFS
"${pw_yad_new}" --plug=$KEY_EDIT_DB_GUI --tabnum="2" --form --separator=" " --columns=1 \
case ${PW_WINDOWS_VER} in
"7") ADD_WINVER_EDIT_DB="7!10!XP" ;;
"XP") ADD_WINVER_EDIT_DB="XP!7!10" ;;
*) ADD_WINVER_EDIT_DB="10!7!XP" ;;
esac
"${pw_yad_new}" --plug=$KEY_EDIT_DB_GUI --tabnum="2" --form --separator="%" --columns=1 \
--field="SELECT VERSION OF WINDOWS::CB" "${ADD_WINVER_EDIT_DB}" \
--field="AUTOINSTALL WITH WINETRICKS::CBE" "${PW_DLL_INSTALL}!vcrun2019 corefonts lucida" \
--field="WINEDLLOVERRIDES::CBE" "${WINEDLLOVERRIDES}!d3dx9_36,d3dx9_42=n,b;mfc120=b,n" \
--field=":LBL" "" \
--field="ADD ARGUMENTS FOR .EXE FILE::CBE" "\\${LAUNCH_PARAMETERS[@]}!-dx11 -skipintro 1" \
--field=":LBL" "" \
--field="MANGOHUD FPS LIMIT (0-disabled):SCL" ${FPS_LIMIT_VAR} 1> "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" &
"${pw_yad_new}" --paned --key="$KEY_EDIT_DB_GUI" --title "EDIT_DB" --text-align=center --height="400" \
"${pw_yad_new}" --paned --key="$KEY_EDIT_DB_GUI" --title "EDIT_DB" --text-align=center --height="520" \
--text "Change settings in database file for ${PORTWINE_DB}\n" --separator=" " --borders=10 --center \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" --button="CANCEL":1 --button="OPEN DB FILE":150 --button="SAVE CHANGES":0
YAD_STATUS="$?"
......@@ -191,13 +202,18 @@ pw_gui_for_edit_db () {
done
}
edit_db_field_read $@
FPS_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit"`"
PW_WINDOWS_VER="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $1}'`"
PW_DLL_INSTALL=\"`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $2}'`\"
WINEDLLOVERRIDES=\"`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $3}'`\"
LAUNCH_PARAMETERS=\"`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $5}'`\"
FPS_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $7}'`"
if [ "${FPS_LIMIT}" == 0 ] ; then
export MANGOHUD_CONFIG=font_size=24,position=top-left,toggle_hud=Shift_R+F12,no_display,resolution,wine,gpu_name,vulkan_driver,gpu_stats,vkbasalt
else
export MANGOHUD_CONFIG=font_size=24,position=top-left,toggle_hud=Shift_R+F12,no_display,resolution,wine,gpu_name,vulkan_driver,gpu_stats,vkbasalt,fps_limit=${FPS_LIMIT}
fi
edit_db_from_gui $@ MANGOHUD_CONFIG
edit_db_from_gui $@ MANGOHUD_CONFIG LAUNCH_PARAMETERS PW_WINDOWS_VER PW_DLL_INSTALL WINEDLLOVERRIDES
return 0
}
......
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