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

Major fix for runtime libs

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