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

Megafix debug

parent 71b6108e
......@@ -286,16 +286,16 @@ class Session:
#load environment overrides
if "PW_LOG" in self.env and nonzero(self.env["PW_LOG"]):
self.env.setdefault("WINEDEBUG", "+timestamp,+pid,+tid,+seh,+debugstr,+loaddll,+mscoree")
self.env.setdefault("DXVK_LOG_LEVEL", "info")
self.env.setdefault("VKD3D_DEBUG", "warn")
self.env.setdefault("WINE_MONO_TRACE", "E:System.NotImplementedException")
#for performance, logging is disabled by default; override with user_settings.py
self.env.setdefault("WINEDEBUG", "-all")
self.env.setdefault("DXVK_LOG_LEVEL", "none")
self.env.setdefault("VKD3D_DEBUG", "none")
if "PW_LOG" in os.environ and nonzero(os.environ["PW_LOG"]):
self.env.setdefault("WINEDEBUG", "+timestamp,+pid,+tid,+seh,+debugstr,+loaddll,+mscoree")
self.env.setdefault("DXVK_LOG_LEVEL", "info")
self.env.setdefault("VKD3D_DEBUG", "warn")
self.env.setdefault("WINE_MONO_TRACE", "E:System.NotImplementedException")
#default wine-mono override for FNA games
# self.env.setdefault("WINE_MONO_OVERRIDES", "Microsoft.Xna.Framework.*,Gac=n")
......
......@@ -2,6 +2,10 @@
# Author: PortWINE-Linux.ru
. "$(dirname $(readlink -f "$0"))/runlib"
"${WINESERVER}" -k
if [ -e "${PORT_WINE_TMP_PATH}/dxvk_on" ]; then
rm -f "${PORT_WINE_TMP_PATH}/dxvk_on"
fi
export PW_USE_TERMINAL=1
START_PORTWINE
echo "${port_deb1}" > "${PORT_WINE_PATH}/${portname}.log"
echo "${port_deb2}" >> "${PORT_WINE_PATH}/${portname}.log"
......@@ -44,12 +48,13 @@ else
echo "!!!glxinfo not found!!!" >> "${PORT_WINE_PATH}/${portname}.log"
fi
echo "----------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Vulkan info device name" >> "${PORT_WINE_PATH}/${portname}.log"
if [ -x "`which vulkaninfo 2>/dev/null`" ]
then
vulkaninfo | grep deviceName >> "${PORT_WINE_PATH}/${portname}.log"
echo "Vulkan info device name:" >> "${PORT_WINE_PATH}/${portname}.log"
"${WINELIB}/amd64/usr/bin/vulkaninfo" | grep deviceName >> "${PORT_WINE_PATH}/${portname}.log"
"${WINELIB}/amd64/usr/bin/vkcube" --c 50
if [ $? -eq 0 ]; then
echo "Vulkan cube test passed successfully" >> "${PORT_WINE_PATH}/${portname}.log"
else
echo "!!!vulkaninfo not found!!!" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Vkcube test completed with error" >> "${PORT_WINE_PATH}/${portname}.log"
fi
echo "---------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
if [ ! -x "`which gamemoderun 2>/dev/null`" ]
......@@ -60,21 +65,36 @@ echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${port
echo "Version WINE in the Port" >> "${PORT_WINE_PATH}/${portname}.log"
"$WINELOADER" --version 2>&1 | tee -a "${PORT_WINE_PATH}/${portname}.log"
echo "-------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "log WINE" >> "${PORT_WINE_PATH}/${portname}.log"
echo "log WINE:" >> "${PORT_WINE_PATH}/${portname}.log"
export PW_LOG=1
export DXVK_HUD="full"
export PW_WINEDBG_DISABLE=0
if [ ! -z ${optirun_on} ]
then
$PW_TERM ${optirun_on} "${port_on_run}" "run" "${gamestart}" ${launch_parameters} >> "${PORT_WINE_PATH}/${portname}.log" 2>&1 &
else
$PW_TERM "${port_on_run}" "run" "${gamestart}" ${launch_parameters} >> "${PORT_WINE_PATH}/${portname}.log" 2>&1 &
PW_XTERM="${WINELIB}/amd64/usr/bin/xterm -l -lf ${PORT_WINE_PATH}/${portname}.log.wine -geometry 159x37 -e"
if [ -f "${PORT_WINE_PATH}/${portname}.log.wine" ]; then
rm -f "${PORT_WINE_PATH}/${portname}.log.wine"
fi
if [ ! -z "${gamename}" ]; then
if [ ! -z ${optirun_on} ]
then
${PW_XTERM} "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "${gamestart}" ${launch_parameters} 2>&1 &
else
${PW_XTERM} "${PW_RUNTIME}" "${port_on_run}" "run" "${gamestart}" ${launch_parameters} 2>&1 &
fi
else
if [ ! -z ${optirun_on} ]
then
${PW_XTERM} "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" explorer 2>&1 &
else
${PW_XTERM} "${PW_RUNTIME}" "${port_on_run}" "run" explorer 2>&1 &
fi
fi
zenity --info --title "DEBUG" --text "${port_debug}" --no-wrap && "${WINESERVER}" -k
STOP_PORTWINE | pwzen
cat "${PORT_WINE_PATH}/${portname}.log.wine" >> "${PORT_WINE_PATH}/${portname}.log"
rm -f "${PORT_WINE_PATH}/${portname}.log.wine"
deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++')
echo "$deb_text" > "${PORT_WINE_PATH}/${portname}.log"
echo "$deb_text" | zenity --text-info --editable \
......
......@@ -54,7 +54,7 @@ then
export port_time5="Сейчас не могу, может быть в другой раз."
export port_time6="Я уже сделал вклад в будущее проекта."
export port_debug="После окончания работы ${portname}, нажмите ОК."
export port_debug="Не торопитесь!\nПосле окончания работы ${portname}, нажмите ОК."
export hud_text="Выберите вывод необходимой информации на экран:"
export hud_info="Отображать:"
......@@ -128,7 +128,7 @@ then
export port_time5="I do not want to help the project"
export port_time6="I'm well done and have already contributed to the future of the project"
export port_debug="After finishing the ${portname}, click OK."
export port_debug="Please wait!\nAfter finishing the ${portname}, click OK."
export hud_text="The DXVK_HUD environment variable controls a HUD which can display the framerate\nand some stat counters. It accepts a comma-separated list of the following options:"
export hud_info="Description:"
......
......@@ -7,16 +7,17 @@ if [ -f "$1" ]; then
export PATH_TO_GAME="$( cd "$( dirname "$1" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME"
if [ ! -z ${optirun_on} ]; then
"${PW_RUNTIME}" $PW_TERM ${optirun_on} "${port_on_run}" "run" "$portwine_exe"
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "$portwine_exe"
else
"${PW_RUNTIME}" $PW_TERM "${port_on_run}" "run" "$portwine_exe"
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "$portwine_exe"
fi
else
cd "${WINEPREFIX}/drive_c/"
if [ ! -z ${optirun_on} ]
then
"${PW_RUNTIME}" $PW_TERM ${optirun_on} "${port_on_run}" "run" "explorer"
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "explorer"
else
"${PW_RUNTIME}" $PW_TERM "${port_on_run}" "run" "explorer"
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "explorer"
fi
fi
STOP_PORTWINE
......@@ -54,7 +54,7 @@ if [ ! -e "${PORT_WINE_TMP_PATH}/${portname}_ver" ]; then
echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver"
fi
########################################################################
export pw_libs_ver="_v3"
export pw_libs_ver="_v4"
export port_on_run="${PORT_WINE_PATH}/data/port_on"
export WINEDIR="${PORT_WINE_PATH}"/data/dist
export WINELIB="${HOME}/.PortWINE/libs${pw_libs_ver}"
......@@ -96,7 +96,7 @@ sh "${PORT_SCRIPTS_PATH}"/port_update
########################################################################
if [ ! -d "${WINELIB}" ]; then
echo "Download and install libraries..."
wget -T 2 --output-document="${HOME}/.PortWINE/tmp/libs${pw_libs_ver}.tar.xz" "${PW_FTP_URL}"/dist/libs${pw_libs_ver}.tar.xz | sszen &&
wget -c -T 2 --output-document="${HOME}/.PortWINE/tmp/libs${pw_libs_ver}.tar.xz" "${PW_FTP_URL}"/dist/libs${pw_libs_ver}.tar.xz | sszen &&
tar -Jxvf "${HOME}/.PortWINE/tmp/libs${pw_libs_ver}.tar.xz" -C "${HOME}/.PortWINE/" | sszen &&
rm -f "${HOME}/.PortWINE/tmp/libs${pw_libs_ver}.tar.xz"
"${WINELIB}"/setup.sh --force
......@@ -119,7 +119,7 @@ then
if [ $? -eq 1 ];then exit 1; fi
case $start_settings in
"VKD3D and OpenGL")
echo "off" > "${PORT_WINE_TMP_PATH}/dxvk_on" ;;
echo "off" > "${PORT_WINE_TMP_PATH}/dxvk_on" ;;
"DXVK")
hud_settings=`zenity --list --title "HUD" --text "${hud_text}" --list --checklist \
--column="${inst_set}" --column="HUD info:" --column="${hud_info}" --width=800 --height=550 \
......@@ -156,6 +156,9 @@ fi
export DXVK_HUD="${var_dxvk_on}"
echo "DXVK_HUD=${DXVK_HUD}"
cp -f "${WINEDIR}/lib/wine/fakedlls/dxgi.dll" "${WINEDIR}/lib/wine/dxgi.dll"
cp -f "${WINEDIR}/lib64/wine/fakedlls/dxgi.dll" "${WINEDIR}/lib64/wine/dxgi.dll"
if [ "${var_dxvk_on}" != "off" ]; then
export PW_USE_WINED3D=0
export PW_DXGI_FROM_DXVK=1
......@@ -241,7 +244,7 @@ sed -i '/HKLM,Software\\Wow6432Node\\Valve\\Steam/d' "${WINEDIR}/share/wine/wine
sed -i '/HKCR,steam\\shell\\open\\command/d' "${WINEDIR}/share/wine/wine.inf" &&
rm -f "${WINEDIR}"/lib*/wine/*steam*
if [ ! -d "${WINEPREFIX}" ] || [ ! -d "${WINEPREFIX}"/dosdevices ] || [ ! -d "${WINEPREFIX}"/drive_c/windows ] || [ ! -f "${WINEPREFIX}"/system.reg ] || [ ! -f "${WINEPREFIX}"/user.reg ] || [ ! -f "${WINEPREFIX}"/userdef.reg ]; then
"${PW_RUNTIME}" $PW_TERM "${WINELOADER}" wineboot -u
$PW_TERM "${PW_RUNTIME}" "${WINELOADER}" wineboot -u
fi
########################################################################
#if [ ! -f "${PORT_WINE_TMP_PATH}/init_run_suc" ]; then
......@@ -257,9 +260,6 @@ fi
# echo "######################################################"
#fi
########################################################################
#cp -f "${WINEDIR}/lib/wine/fakedlls/dxgi.dll" "${WINEDIR}/lib/wine/dxgi.dll"
#cp -f "${WINEDIR}/lib64/wine/fakedlls/dxgi.dll" "${WINEDIR}/lib64/wine/dxgi.dll"
ADD_IN_START_PORTWINE
}
########################################################################
......@@ -267,7 +267,7 @@ WAIT_WINESERVER ()
{
sleep 3
while [ $(pgrep wineserver)>'0' ]; do
sleep 2
sleep 1
done
}
########################################################################
......
......@@ -25,7 +25,7 @@ if [ ! -z "${gamename}" ]; then
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
cp -f "${PORT_WINE_PATH}/${name_desktop}.desktop" /home/${USER}/.local/share/applications/
else
name_desktop="PortProton"
name_desktop="PortProton"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${name_desktop}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Exec=env "${PORT_SCRIPTS_PATH}/portproton.sh %U"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
......
......@@ -6,15 +6,15 @@ START_PORTWINE
if [ ! -z "$1" ]; then
if [ ! -z $optirun_on ]; then
"${PW_RUNTIME}" $PW_TERM ${optirun_on} "${port_on_run}" "run" "$1"
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "$1"
else
"${PW_RUNTIME}" $PW_TERM "${port_on_run}" "run" "$1"
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "$1"
fi
else
if [ ! -z $optirun_on ]; then
"${PW_RUNTIME}" $PW_TERM ${optirun_on} "${port_on_run}" "run" "${gamestart}" ${launch_parameters}
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "${gamestart}" ${launch_parameters}
else
"${PW_RUNTIME}" $PW_TERM "${port_on_run}" "run" "${gamestart}" ${launch_parameters}
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "${gamestart}" ${launch_parameters}
fi
fi
......
......@@ -26,7 +26,8 @@ export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAU
export PW_WINEDBG_DISABLE=0
export PW_FORCE_DISABLED_GAMEMOD=0 # Force disabele gamemod
export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
#export PULSE_LATENCY_MSEC=60
export PULSE_LATENCY_MSEC=60
#export MANGOHUD=1
########################################################################
ADD_IN_START_PORTWINE ()
{
......
......@@ -6,8 +6,8 @@ START_PORTWINE
PW_LOG=1
if [ ! -z ${optirun_on} ]
then
"${PW_RUNTIME}" $PW_TERM ${optirun_on} "${port_on_run}" "run" "winecfg" >&2
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "winecfg" >&2
else
"${PW_RUNTIME}" $PW_TERM "${port_on_run}" "run" "winecfg" >&2
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "winecfg" >&2
fi
STOP_PORTWINE
......@@ -5,8 +5,8 @@ export PW_LOG=1
START_PORTWINE
if [ ! -z ${optirun_on} ]
then
"${PW_RUNTIME}" $PW_TERM '"${optirun_on}" "${port_on_run}" "run" "cmd"'
$PW_TERM '${PW_RUNTIME}" "${optirun_on}" "${port_on_run}" "run" "cmd"'
else
"${PW_RUNTIME}" $PW_TERM '"${port_on_run}" "run" "cmd"'
$PW_TERM '${PW_RUNTIME}" "${port_on_run}" "run" "cmd"'
fi
STOP_PORTWINE
......@@ -3,84 +3,11 @@
. "$(dirname $(readlink -f "$0"))/runlib"
"${WINESERVER}" -k
START_PORTWINE
if [ -z "${PATH_TO_GAME}" ]; then
export DXVK_STATE_CACHE_PATH="${PORT_WINE_TMP_PATH}"
export __GL_SHADER_DISK_CACHE_PATH="${PORT_WINE_TMP_PATH}"
export MESA_GLSL_CACHE_DIR="${PORT_WINE_TMP_PATH}"
fi
echo "${port_deb1}" > "${PORT_WINE_PATH}/${portname}.log"
echo "${port_deb2}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "PortWINE version:" >> "${PORT_WINE_PATH}/${portname}.log"
read install_ver < "${PORT_WINE_TMP_PATH}/${portname}_ver"
echo "${portname}-${install_ver}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "-------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "var_dxvk_on = ${var_dxvk_on}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Date and time of start debug for ${portname}" >> "${PORT_WINE_PATH}/${portname}.log"
date >> "${PORT_WINE_PATH}/${portname}.log"
echo "-----------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "The installation path of the ${portname}:" >> "${PORT_WINE_PATH}/${portname}.log"
echo "$PORT_WINE_PATH" >> "${PORT_WINE_PATH}/${portname}.log"
echo "----------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Operating system" >> "${PORT_WINE_PATH}/${portname}.log"
lsb_release -d | sed s/Description/ОС/g >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Desktop Environment" >> "${PORT_WINE_PATH}/${portname}.log"
echo "$DESKTOP_SESSION" >> "${PORT_WINE_PATH}/${portname}.log"
echo "${XDG_CURRENT_DESKTOP}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Kernel" >> "${PORT_WINE_PATH}/${portname}.log"
uname -r >> "${PORT_WINE_PATH}/${portname}.log"
echo "-------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "CPU" >> "${PORT_WINE_PATH}/${portname}.log"
cat /proc/cpuinfo | grep "model name" >> "${PORT_WINE_PATH}/${portname}.log"
echo "------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "RAM" >> "${PORT_WINE_PATH}/${portname}.log"
free -m >> "${PORT_WINE_PATH}/${portname}.log"
echo "-----------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Graphic cards and drivers" >> "${PORT_WINE_PATH}/${portname}.log"
lspci | grep VGA >> "${PORT_WINE_PATH}/${portname}.log"
lspci | grep 3D >> "${PORT_WINE_PATH}/${portname}.log"
if [ -x "`which glxinfo 2>/dev/null`" ]
then
glxinfo | grep OpenGL >> "${PORT_WINE_PATH}/${portname}.log"
else
echo "!!!glxinfo not found!!!" >> "${PORT_WINE_PATH}/${portname}.log"
fi
echo "----------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Vulkan info device name" >> "${PORT_WINE_PATH}/${portname}.log"
if [ -x "`which vulkaninfo 2>/dev/null`" ]
then
vulkaninfo | grep deviceName >> "${PORT_WINE_PATH}/${portname}.log"
else
echo "!!!vulkaninfo not found!!!" >> "${PORT_WINE_PATH}/${portname}.log"
fi
echo "---------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
if [ ! -x "`which gamemoderun 2>/dev/null`" ]
then
echo "!!!gamemod not found!!!" >> "${PORT_WINE_PATH}/${portname}.log"
fi
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Version WINE in the Port" >> "${PORT_WINE_PATH}/${portname}.log"
"$WINELOADER" --version 2>&1 | tee -a "${PORT_WINE_PATH}/${portname}.log"
echo "-------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "log WINE" >> "${PORT_WINE_PATH}/${portname}.log"
export DXVK_HUD="fps"
export PW_LOG=1
export PW_WINEDBG_DISABLE=0
cd "${WINEPREFIX}/drive_c/"
if [ ! -z ${optirun_on} ]
then
"${PW_RUNTIME}" $PW_TERM ${optirun_on} "${port_on_run}" "run" "explorer" >> "${PORT_WINE_PATH}/${portname}.log" 2>&1 &
$PW_TERM "${PW_RUNTIME}" ${optirun_on} "${port_on_run}" "run" "explorer"
else
"${PW_RUNTIME}" $PW_TERM "${port_on_run}" "run" "explorer" >> "${PORT_WINE_PATH}/${portname}.log" 2>&1 &
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "explorer"
fi
zenity --info --title "DEBUG" --text "${port_debug}" --no-wrap && "${WINESERVER}" -k
STOP_PORTWINE | pwzen
deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++')
echo "$deb_text" > "${PORT_WINE_PATH}/${portname}.log"
echo "$deb_text" | zenity --text-info --editable \
--width=800 --height=600 \
--title="${portname}.log"
STOP_PORTWINE
......@@ -3,5 +3,5 @@
. "$(dirname $(readlink -f "$0"))/runlib"
"${WINESERVER}" -k
START_PORTWINE
"${PW_RUNTIME}" $PW_TERM "${port_on_run}" "run" "regedit"
$PW_TERM "${PW_RUNTIME}" "${port_on_run}" "run" "regedit"
STOP_PORTWINE
......@@ -13,5 +13,5 @@ wget -T 3 --output-document=${PORT_WINE_TMP_PATH}/winetricks https://raw.githubu
chmod +x "${PORT_WINE_TMP_PATH}/winetricks"
export PW_USE_TERMINAL=1
START_PORTWINE
"${PW_RUNTIME}" $PW_TERM "${PORT_WINE_TMP_PATH}/winetricks" -q --force
$PW_TERM "${PW_RUNTIME}" "${PORT_WINE_TMP_PATH}/winetricks" -q --force
STOP_PORTWINE
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