Commit 2a971a41 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Major fix for runtime libs

parent a05d9992
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
dxgi.nvapiHack = False dxgi.nvapiHack = False
# Override maximum amount of device memory and shared system memory # Override maximum amount of device memory and shared system memory
# reported to the application. This may fix texture streaming issues # reported to the application. This may fix texture streaming issues
# in games that do not support cards with large amounts of VRAM. # in games that do not support cards with large amounts of VRAM.
......
...@@ -17,6 +17,7 @@ from filelock import FileLock ...@@ -17,6 +17,7 @@ from filelock import FileLock
CURRENT_PREFIX_VERSION="5.6-GE-2" CURRENT_PREFIX_VERSION="5.6-GE-2"
ld_path_var = "LD_LIBRARY_PATH"
PFX="Proton: " PFX="Proton: "
...@@ -287,6 +288,15 @@ class CompatData: ...@@ -287,6 +288,15 @@ class CompatData:
#create font files symlinks #create font files symlinks
self.create_fonts_symlinks() self.create_fonts_symlinks()
#copy openvr files into place
dst = self.prefix_dir + "/drive_c/vrclient/bin/"
makedirs(dst)
try_copy(g_proton.lib_dir + "wine/fakedlls/vrclient.dll", dst)
try_copy(g_proton.lib64_dir + "wine/fakedlls/vrclient_x64.dll", dst)
try_copy(g_proton.lib_dir + "wine/dxvk/openvr_api_dxvk.dll", self.prefix_dir + "/drive_c/windows/syswow64/")
try_copy(g_proton.lib64_dir + "wine/dxvk/openvr_api_dxvk.dll", self.prefix_dir + "/drive_c/windows/system32/")
if "wined3d" in g_session.compat_config: if "wined3d" in g_session.compat_config:
dxvkfiles = ["dxvk_config"] dxvkfiles = ["dxvk_config"]
...@@ -361,6 +371,13 @@ class Session: ...@@ -361,6 +371,13 @@ class Session:
self.env.pop("LC_ALL", "") self.env.pop("LC_ALL", "")
self.env.pop("WINEARCH", "") self.env.pop("WINEARCH", "")
if ld_path_var in os.environ:
self.env[ld_path_var] = g_proton.lib64_dir + ":" + g_proton.lib_dir + ":" + os.environ[ld_path_var]
else:
self.env[ld_path_var] = g_proton.lib64_dir + ":" + g_proton.lib_dir
self.env["WINEDLLPATH"] = g_proton.lib64_dir + "/wine:" + g_proton.lib_dir + "/wine"
if "PATH" in os.environ: if "PATH" in os.environ:
self.env["PATH"] = g_proton.bin_dir + ":" + os.environ["PATH"] self.env["PATH"] = g_proton.bin_dir + ":" + os.environ["PATH"]
...@@ -445,6 +462,7 @@ class Session: ...@@ -445,6 +462,7 @@ class Session:
f.write("PATH=\"" + self.env["PATH"] + "\" \\\n") f.write("PATH=\"" + self.env["PATH"] + "\" \\\n")
f.write("\tTERM=\"xterm\" \\\n") #XXX f.write("\tTERM=\"xterm\" \\\n") #XXX
f.write("\tWINEDLLPATH=\"" + self.env["WINEDLLPATH"] + "\" \\\n") f.write("\tWINEDLLPATH=\"" + self.env["WINEDLLPATH"] + "\" \\\n")
f.write("\t" + ld_path_var + "=\"" + self.env[ld_path_var] + "\" \\\n")
f.write("\tWINEPREFIX=\"" + self.env["WINEPREFIX"] + "\" \\\n") f.write("\tWINEPREFIX=\"" + self.env["WINEPREFIX"] + "\" \\\n")
if "WINEESYNC" in self.env: if "WINEESYNC" in self.env:
f.write("\tWINEESYNC=\"" + self.env["WINEESYNC"] + "\" \\\n") f.write("\tWINEESYNC=\"" + self.env["WINEESYNC"] + "\" \\\n")
......
...@@ -21,12 +21,10 @@ export PORT_WINE_PATH="$(pwd)" ...@@ -21,12 +21,10 @@ export PORT_WINE_PATH="$(pwd)"
cd "${link}" cd "${link}"
. "${link}"/vars . "${link}"/vars
export config_path="${PORT_WINE_PATH}/data/tmp" export config_path="${PORT_WINE_PATH}/data/tmp"
if [ ! -d "${config_path}" ] if [ ! -d "${config_path}" ]; then
then
mkdir -p "${config_path}" mkdir -p "${config_path}"
fi fi
if [ ! -e "${config_path}/${portname}_loc" ] if [ ! -e "${config_path}/${portname}_loc" ]; then
then
SET_LANG=`zenity --title "Install $portname" --text "Select the language\nВыберите язык" --list --radiolist \ SET_LANG=`zenity --title "Install $portname" --text "Select the language\nВыберите язык" --list --radiolist \
--column="Set (Выбор)" --column "Language (Язык):" \ --column="Set (Выбор)" --column "Language (Язык):" \
TRUE "RUS" \ TRUE "RUS" \
...@@ -34,12 +32,10 @@ then ...@@ -34,12 +32,10 @@ then
echo "${SET_LANG}" > "${config_path}/${portname}_loc" echo "${SET_LANG}" > "${config_path}/${portname}_loc"
fi fi
. "${link}"/lang . "${link}"/lang
if [ ! -e "${config_path}/${portname}_ver" ] if [ ! -e "${config_path}/${portname}_ver" ]; then
then
echo "10" > "${config_path}/${portname}_ver" echo "10" > "${config_path}/${portname}_ver"
fi fi
if [ ! -f "${config_path}/dxvk_on" ] if [ ! -f "${config_path}/dxvk_on" ]; then
then
start_settings=`zenity --title "${ss_title}" --text "${ss_text}" --list --radiolist \ start_settings=`zenity --title "${ss_title}" --text "${ss_text}" --list --radiolist \
--column="${inst_set}" --column "${ss_ver}" --column "${ss_dr}" --width=600 --height=250 \ --column="${inst_set}" --column "${ss_ver}" --column "${ss_dr}" --width=600 --height=250 \
FALSE "OpenGL" "${ss_ogl_2}" \ FALSE "OpenGL" "${ss_ogl_2}" \
...@@ -70,27 +66,24 @@ export WINEPREFIX="${PORT_WINE_PATH}/data/pfx" ...@@ -70,27 +66,24 @@ export WINEPREFIX="${PORT_WINE_PATH}/data/pfx"
export PATH="${WINEDIR}/bin:${PATH}" export PATH="${WINEDIR}/bin:${PATH}"
export WINESTART="C:\\windows\\command\\start.exe" export WINESTART="C:\\windows\\command\\start.exe"
export STEAM_COMPAT_DATA_PATH="${PORT_WINE_PATH}/data/" export STEAM_COMPAT_DATA_PATH="${PORT_WINE_PATH}/data/"
#export OS_BASED="$(cat /etc/os-release | grep ID_LIKE | cut -d '=' -f2)"
export OS_BASED="$(cat /etc/os-release | grep ID_LIKE | cut -d '=' -f2)" if [ -d "${WINELIB}" ]; then #&& [ "${OS_BASED}" != "arch" ]
if [ -d "${WINELIB}" ] && [ "${OS_BASED}" != "arch" ] host_lib_paths=
then /sbin/ldconfig -XNv | grep "/" | cut -d: -f1 1> "${config_path}"/default_lib_paths
if [ ! -z "${LD_LIBRARY_PATH}" ] while read lib_path_prefix; do
then export host_lib_paths=$host_lib_paths$lib_path_prefix:
export LD_LIBRARY_PATH="${WINEDIR}/lib64:${WINEDIR}/lib:${WINELIB}/pinned_libs_32:${WINELIB}/pinned_libs_64:/usr/lib/x86_64-linux-gnu/libfakeroot:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/local/lib:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib:/usr/lib/i386-linux-gnu/i686:/usr/lib/i386-linux-gnu/sse2:/usr/lib/i386-linux-gnu/i686/sse2:${WINELIB}/i386/lib/i386-linux-gnu:${WINELIB}/i386/lib:${WINELIB}/i386/usr/lib/i386-linux-gnu:${WINELIB}/i386/usr/lib:${WINELIB}/amd64/lib/x86_64-linux-gnu:${WINELIB}/amd64/lib:${WINELIB}/amd64/usr/lib/x86_64-linux-gnu:${WINELIB}/amd64/usr/lib:${WINELIB}/usr/lib/i386-linux-gnu:${WINELIB}/usr/lib/x86_64-linux-gnu:${WINELIB}/amd64/usr/lib:${WINELIB}/lib/i386-linux-gnu:${WINELIB}/lib/x86_64-linux-gnu:${WINELIB}/lib:${LD_LIBRARY_PATH}" done < "${config_path}"/default_lib_paths
host_lib_paths="${WINELIB}/pinned_libs_32:${WINELIB}/pinned_libs_64:$host_lib_paths"
portwine_runtime_libs_paths="$host_lib_paths${WINELIB}/lib/i386-linux-gnu:${WINELIB}/usr/lib/i386-linux-gnu:${WINELIB}/lib/x86_64-linux-gnu:${WINELIB}/usr/lib/x86_64-linux-gnu:${WINELIB}/lib:${WINELIB}/usr/lib"
if [ ! -z "${LD_LIBRARY_PATH}" ]; then
export LD_LIBRARY_PATH="$portwine_runtime_libs_paths:${LD_LIBRARY_PATH-}"
else else
export LD_LIBRARY_PATH="${WINEDIR}/lib64:${WINEDIR}/lib:${WINELIB}/pinned_libs_32:${WINELIB}/pinned_libs_64:/usr/lib/x86_64-linux-gnu/libfakeroot:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/local/lib:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib:/usr/lib/i386-linux-gnu/i686:/usr/lib/i386-linux-gnu/sse2:/usr/lib/i386-linux-gnu/i686/sse2:${WINELIB}/i386/lib/i386-linux-gnu:${WINELIB}/i386/lib:${WINELIB}/i386/usr/lib/i386-linux-gnu:${WINELIB}/i386/usr/lib:${WINELIB}/amd64/lib/x86_64-linux-gnu:${WINELIB}/amd64/lib:${WINELIB}/amd64/usr/lib/x86_64-linux-gnu:${WINELIB}/amd64/usr/lib:${WINELIB}/usr/lib/i386-linux-gnu:${WINELIB}/usr/lib/x86_64-linux-gnu:${WINELIB}/amd64/usr/lib:${WINELIB}/lib/i386-linux-gnu:${WINELIB}/lib/x86_64-linux-gnu:${WINELIB}/lib" export LD_LIBRARY_PATH="$portwine_runtime_libs_paths"
fi fi
echo "runtime libs is enabled" echo "runtime libs is enabled"
else else
if [ ! -z "${LD_LIBRARY_PATH}" ]
then
export LD_LIBRARY_PATH="${WINEDIR}/lib64:${WINEDIR}/lib:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${WINEDIR}/lib64:${WINEDIR}/lib}"
fi
echo "runtime libs is disabled" echo "runtime libs is disabled"
fi fi
export GST_PLUGIN_SYSTEM_PATH_1_0="${WINEDIR}/lib64/lib/gstreamer-1.0/:${WINEDIR}/lib/lib/gstreamer-1.0/" export GST_PLUGIN_SYSTEM_PATH_1_0="${WINEDIR}/lib64/lib/gstreamer-1.0/:${WINEDIR}/lib/lib/gstreamer-1.0/"
export WINE_GST_REGISTRY_DIR="${PORT_WINE_PATH}/data/gstreamer-1.0/" export WINE_GST_REGISTRY_DIR="${PORT_WINE_PATH}/data/gstreamer-1.0/"
######################################################################## ########################################################################
...@@ -102,16 +95,15 @@ export urlg="http://portwine-linux.ru/donate" ...@@ -102,16 +95,15 @@ export urlg="http://portwine-linux.ru/donate"
START_PORTWINE () START_PORTWINE ()
{ {
sh "${link}"/port_update sh "${link}"/port_update
export DXVK_LOG_LEVEL="none"
export VKD3D_DEBUG="none"
export PROTON_NO_FSYNC=0 export PROTON_NO_FSYNC=0
export optirun_on="" export optirun_on=""
if [ -x "`which nvidia-settings 2>/dev/null`" ] if [ -x "`which nvidia-settings 2>/dev/null`" ]; then
then if [ -x "`which primusrun 2>/dev/null`" ]; then
if [ -x "`which primusrun 2>/dev/null`" ]
then
export optirun_on="primusrun" export optirun_on="primusrun"
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
elif [ -x "`which optirun 2>/dev/null`" ] elif [ -x "`which optirun 2>/dev/null`" ]; then
then
export optirun_on="optirun -b primus" export optirun_on="optirun -b primus"
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
fi fi
...@@ -124,8 +116,7 @@ then ...@@ -124,8 +116,7 @@ then
export __GL_THREADED_OPTIMIZATIONS=1 export __GL_THREADED_OPTIMIZATIONS=1
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1 > /dev/null nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1 > /dev/null
export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/dxvk_nvidia.conf" export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/dxvk_nvidia.conf"
if [ ! -z "${WINEDLLOVERRIDES}" ] if [ ! -z "${WINEDLLOVERRIDES}" ]; then
then
export WINEDLLOVERRIDES="nvapi,nvapi64=;${WINEDLLOVERRIDES}" export WINEDLLOVERRIDES="nvapi,nvapi64=;${WINEDLLOVERRIDES}"
else else
export WINEDLLOVERRIDES="nvapi,nvapi64=" export WINEDLLOVERRIDES="nvapi,nvapi64="
...@@ -137,11 +128,9 @@ else ...@@ -137,11 +128,9 @@ else
export mesa_glthread=true export mesa_glthread=true
# export RADV_DEBUG=nocache,nomemorycache # export RADV_DEBUG=nocache,nomemorycache
local AMD_ATI="$(lspci | grep AMD/ATI)" local AMD_ATI="$(lspci | grep AMD/ATI)"
if [ ! -z "${AMD_ATI}" ] if [ ! -z "${AMD_ATI}" ]; then
then
export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/dxvk_amd.conf" export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/dxvk_amd.conf"
if [ "${PORTWINE_ACO}" -eq "1" ] if [ "${PORTWINE_ACO}" -eq "1" ]; then
then
export RADV_PERFTEST=aco export RADV_PERFTEST=aco
echo "ACO is enabled" echo "ACO is enabled"
else else
...@@ -149,20 +138,16 @@ else ...@@ -149,20 +138,16 @@ else
fi fi
fi fi
fi fi
if [ "${var_dxvk_on}" -eq "1" ] if [ "${var_dxvk_on}" -eq "1" ]; then
then
export DXVK_HUD=0 export DXVK_HUD=0
elif [ "${var_dxvk_on}" -eq "2" ] elif [ "${var_dxvk_on}" -eq "2" ]; then
then
export DXVK_HUD="fps,devinfo,version" export DXVK_HUD="fps,devinfo,version"
fi fi
export def_pfx="${PORT_WINE_PATH}data/dist/share/default_pfx/" export def_pfx="${PORT_WINE_PATH}data/dist/share/default_pfx/"
if [ ! -d "${def_pfx}" ] if [ ! -d "${def_pfx}" ]; then
then
"${PROTONRUN}" "run" | pwzen "${PROTONRUN}" "run" | pwzen
fi fi
if [ "$(ulimit -n)" -lt 50000 ] if [ "$(ulimit -n)" -lt 50000 ]; then
then
export PROTON_NO_ESYNC=1 export PROTON_NO_ESYNC=1
echo "ESYNC is disabled" echo "ESYNC is disabled"
else else
...@@ -170,15 +155,12 @@ else ...@@ -170,15 +155,12 @@ else
echo "ESYNC is enabled" echo "ESYNC is enabled"
fi fi
export int_xneur=0 export int_xneur=0
if [ $(pgrep xneur)>'0' ] if [ $(pgrep xneur)>'0' ]; then
then
killall xneur killall xneur
export int_xneur=1 export int_xneur=1
fi fi
if [ -x "`which "gamemoderun" 2>/dev/null`" ] if [ -x "`which "gamemoderun" 2>/dev/null`" ]; then
then if [ ! -z "${LD_PRELOAD}" ]; then
if [ ! -z "${LD_PRELOAD}" ]
then
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libgamemodeauto.so.0:${LD_PRELOAD}" export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libgamemodeauto.so.0:${LD_PRELOAD}"
else else
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libgamemodeauto.so.0" export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libgamemodeauto.so.0"
...@@ -192,21 +174,18 @@ ADD_IN_START_PORTWINE ...@@ -192,21 +174,18 @@ ADD_IN_START_PORTWINE
WAIT_WINESERVER () WAIT_WINESERVER ()
{ {
sleep 3 sleep 3
while [ $(pgrep wineserver)>'0' ] while [ $(pgrep wineserver)>'0' ]; do
do
sleep 2 sleep 2
done done
} }
######################################################################## ########################################################################
KILL9_WINEDEVICE () KILL9_WINEDEVICE ()
{ {
if [ "${kill_winedevice}" -eq "1" ] if [ "${kill_winedevice}" -eq "1" ]; then
then
sleep 10 sleep 10
killall -r -s9 winedevice killall -r -s9 winedevice
fi fi
if [ "${kill_explorer}" -eq "1" ] if [ "${kill_explorer}" -eq "1" ]; then
then
sleep 10 sleep 10
killall -r -s9 explorer killall -r -s9 explorer
fi fi
...@@ -216,8 +195,7 @@ STOP_PORTWINE () ...@@ -216,8 +195,7 @@ STOP_PORTWINE ()
{ {
WAIT_WINESERVER WAIT_WINESERVER
ADD_IN_STOP_PORTWINE ADD_IN_STOP_PORTWINE
if [ "$int_xneur" -eq "1" ] if [ "$int_xneur" -eq "1" ]; then
then
xneur & xneur &
fi fi
#killall -r -s9 winedevice #killall -r -s9 winedevice
......
...@@ -3,10 +3,9 @@ ...@@ -3,10 +3,9 @@
. "$(dirname $(readlink -f "$0"))/runlib" . "$(dirname $(readlink -f "$0"))/runlib"
"${WINESERVER}" -k "${WINESERVER}" -k
START_PORTWINE START_PORTWINE
if [ ! -z ${optirun_on} ] if [ ! -z ${optirun_on} ]; then
then ${optirun_on} "${PROTONRUN}" "run" "${gamestart}" ${launch_parameters} &>/dev/null & KILL9_WINEDEVICE
${optirun_on} "${PROTONRUN}" "run" "${gamestart}" ${launch_parameters} & KILL9_WINEDEVICE >&2
else else
"${PROTONRUN}" "run" "${gamestart}" ${launch_parameters} & KILL9_WINEDEVICE >&2 "${PROTONRUN}" "run" "${gamestart}" ${launch_parameters} &>/dev/null & KILL9_WINEDEVICE
fi fi
STOP_PORTWINE STOP_PORTWINE
...@@ -24,12 +24,14 @@ ADD_IN_START_PORTWINE () ...@@ -24,12 +24,14 @@ ADD_IN_START_PORTWINE ()
if [ "${var_dxvk_on}" -eq "0" ] if [ "${var_dxvk_on}" -eq "0" ]
then ###OPENGL### then ###OPENGL###
export PROTON_USE_WINED3D=1 export PROTON_USE_WINED3D=1
export PROTON_NO_D9VK=0 export PROTON_USE_VKD3D=0
export PROTON_NO_D9VK=1
export PROTON_NO_D3D11=0 export PROTON_NO_D3D11=0
export PROTON_NO_D3D10=0 export PROTON_NO_D3D10=0
export PROTON_OLD_GL_STRING=0 export PROTON_OLD_GL_STRING=0
else ###DXVK### else ###DXVK###
export PROTON_USE_WINED3D=0 export PROTON_USE_WINED3D=0
export PROTON_USE_VKD3D=0
export PROTON_NO_D9VK=0 export PROTON_NO_D9VK=0
export PROTON_NO_D3D11=0 export PROTON_NO_D3D11=0
export PROTON_NO_D3D10=0 export PROTON_NO_D3D10=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