Commit 7d4d4f2c authored by Mikhail Tergoev's avatar Mikhail Tergoev

major changes

parent 293a3146
...@@ -308,7 +308,7 @@ class Session: ...@@ -308,7 +308,7 @@ class Session:
self.env["WINEDLLPATH"] = g_proton.lib64_dir + "/wine:" + g_proton.lib_dir + "/wine" self.env["WINEDLLPATH"] = g_proton.lib64_dir + "/wine:" + g_proton.lib_dir + "/wine"
self.env["GST_PLUGIN_SYSTEM_PATH_1_0"] = g_proton.lib64_dir + "gstreamer-1.0" + ":" + g_proton.lib_dir + "gstreamer-1.0" self.env["GST_PLUGIN_SYSTEM_PATH_1_0"] = g_proton.lib64_dir + "gstreamer-1.0" + ":" + g_proton.lib_dir + "gstreamer-1.0"
self.env["WINE_GST_REGISTRY_DIR"] = g_compatdata.path("gstreamer-1.0/") self.env["WINE_GST_REGISTRY_DIR"] = g_compatdata.path("/tmp/gstreamer-1.0/")
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"]
......
...@@ -22,12 +22,12 @@ cp -f "${PORTPROTON_IMG}" "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" ...@@ -22,12 +22,12 @@ cp -f "${PORTPROTON_IMG}" "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png"
name_desktop="${PORTPROTON_NAME}" name_desktop="${PORTPROTON_NAME}"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${PORTPROTON_NAME}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Name=${PORTPROTON_NAME}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Exec="env PATH_TO_GAME=\""$PORTPROTON_PATH"\" sh \"${PORT_WINE_PATH}/data/scripts/start\" \"${PORTPROTON_EXE}\" ${PORTPROTON_CMD}"" \ echo "Exec="env PATH_TO_GAME=\""$PORTPROTON_PATH"\" sh \"${PORT_SCRIPTS_PATH}/start\" \"${PORTPROTON_EXE}\" ${PORTPROTON_CMD}"" \
>> "${PORT_WINE_PATH}/${name_desktop}.desktop" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Type=Application" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Type=Application" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Categories=Game" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Categories=Game" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "StartupNotify=true" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "StartupNotify=true" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Path="${PORT_WINE_PATH}/data/scripts/"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Path="${PORT_SCRIPTS_PATH}/"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Icon="${PORTPROTON_IMG}"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Icon="${PORTPROTON_IMG}"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod +x "${PORT_WINE_PATH}/${name_desktop}.desktop" chmod +x "${PORT_WINE_PATH}/${name_desktop}.desktop"
######################################################################## ########################################################################
......
...@@ -64,6 +64,7 @@ echo "log WINE" >> "${PORT_WINE_PATH}/${portname}.log" ...@@ -64,6 +64,7 @@ echo "log WINE" >> "${PORT_WINE_PATH}/${portname}.log"
export PW_LOG=1 export PW_LOG=1
export DXVK_HUD="full" export DXVK_HUD="full"
export PW_WINEDBG_DISABLE=0
if [ ! -z ${optirun_on} ] if [ ! -z ${optirun_on} ]
then then
......
...@@ -75,6 +75,8 @@ then ...@@ -75,6 +75,8 @@ then
export sc_img="Создаем ярлык. Выберите иконку ICO, или PNG формата..." export sc_img="Создаем ярлык. Выберите иконку ICO, или PNG формата..."
export sc_cmd="Введите дополнительные параметры запуска, или оставьте полепустым." export sc_cmd="Введите дополнительные параметры запуска, или оставьте полепустым."
export debug_path="Выберите ярлык для создания .log файла..."
elif [ "${update_loc}" = "ENG" ] elif [ "${update_loc}" = "ENG" ]
then then
...@@ -146,5 +148,7 @@ then ...@@ -146,5 +148,7 @@ then
export sc_img="Select the .ICO or .PNG file..." export sc_img="Select the .ICO or .PNG file..."
export sc_cmd="Add command line" export sc_cmd="Add command line"
export debug_path="Select the .desktop file for create the log"
fi fi
...@@ -12,11 +12,11 @@ zenity --progress --title="Settings..." --text="Please wait!" --pulsate --auto-c ...@@ -12,11 +12,11 @@ zenity --progress --title="Settings..." --text="Please wait!" --pulsate --auto-c
} }
######################################################################## ########################################################################
cd "$(dirname "`readlink -f "$0"`")" cd "$(dirname "`readlink -f "$0"`")"
export link="$(pwd)" export PORT_SCRIPTS_PATH="$(pwd)"
cd "${link}/../../" cd "${PORT_SCRIPTS_PATH}/../../"
export PORT_WINE_PATH="$(pwd)" export PORT_WINE_PATH="$(pwd)"
cd "${link}" cd "${PORT_SCRIPTS_PATH}"
. "${link}"/vars . "${PORT_SCRIPTS_PATH}"/vars
######################################################################## ########################################################################
export config_path="${PORT_WINE_PATH}/data/tmp" export config_path="${PORT_WINE_PATH}/data/tmp"
if [ ! -d "${config_path}" ]; then if [ ! -d "${config_path}" ]; then
...@@ -30,7 +30,7 @@ if [ ! -e "${config_path}/${portname}_loc" ]; then ...@@ -30,7 +30,7 @@ if [ ! -e "${config_path}/${portname}_loc" ]; then
echo "${SET_LANG}" > "${config_path}/${portname}_loc" echo "${SET_LANG}" > "${config_path}/${portname}_loc"
fi fi
######################################################################## ########################################################################
. "${link}"/lang . "${PORT_SCRIPTS_PATH}"/lang
if [ ! -e "${config_path}/${portname}_ver" ]; then if [ ! -e "${config_path}/${portname}_ver" ]; then
echo "10" > "${config_path}/${portname}_ver" echo "10" > "${config_path}/${portname}_ver"
fi fi
...@@ -52,7 +52,7 @@ export urlg="http://portwine-linux.ru/donate" ...@@ -52,7 +52,7 @@ export urlg="http://portwine-linux.ru/donate"
######################################################################## ########################################################################
START_PORTWINE () START_PORTWINE ()
{ {
sh "${link}"/port_update sh "${PORT_SCRIPTS_PATH}"/port_update
if [ -d "${WINELIB}" ]; then if [ -d "${WINELIB}" ]; then
host_lib_paths= host_lib_paths=
/sbin/ldconfig -XNv | grep "/" | cut -d: -f1 1> "${config_path}"/default_lib_paths /sbin/ldconfig -XNv | grep "/" | cut -d: -f1 1> "${config_path}"/default_lib_paths
...@@ -213,5 +213,5 @@ if [ "$int_xneur" = "1" ]; then ...@@ -213,5 +213,5 @@ if [ "$int_xneur" = "1" ]; then
fi fi
#killall -r -s9 winedevice #killall -r -s9 winedevice
rm -f "${PORT_WINE_PATH}"/0 rm -f "${PORT_WINE_PATH}"/0
rm -f "${link}"/0 rm -f "${PORT_SCRIPTS_PATH}"/0
} }
...@@ -10,15 +10,15 @@ then ...@@ -10,15 +10,15 @@ then
mkdir -p "/home/${USER}/.local/share/applications" mkdir -p "/home/${USER}/.local/share/applications"
fi fi
if [ ! -z ${gamename} ]; then if [ ! -z "${gamename}" ]; then
name_desktop="${gamename}" name_desktop="${gamename}"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${name_desktop}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Name=${name_desktop}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Exec=sh "${PORT_WINE_PATH}/data/scripts/start"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Exec=sh "${PORT_SCRIPTS_PATH}/start"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Type=Application" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Type=Application" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Categories=Game" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Categories=Game" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "StartupNotify=true" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "StartupNotify=true" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Path="${PORT_WINE_PATH}/data/scripts/"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Path="${PORT_SCRIPTS_PATH}/"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Icon="${PORT_WINE_PATH}/data/img/w.png"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop" echo "Icon="${PORT_WINE_PATH}/data/img/w.png"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop" chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
cp -f "${PORT_WINE_PATH}/${name_desktop}.desktop" /home/${USER}/.local/share/applications/ cp -f "${PORT_WINE_PATH}/${name_desktop}.desktop" /home/${USER}/.local/share/applications/
...@@ -40,11 +40,11 @@ for name_desktop in "winecfg" "winefile" "winecmd" "winereg" "create_shortcut" ...@@ -40,11 +40,11 @@ for name_desktop in "winecfg" "winefile" "winecmd" "winereg" "create_shortcut"
do do
echo ""[Desktop Entry]" echo ""[Desktop Entry]"
"Name=${name_desktop}" "Name=${name_desktop}"
"Exec=sh "${PORT_WINE_PATH}/data/scripts/${name_desktop}"" "Exec=sh "${PORT_SCRIPTS_PATH}/${name_desktop}""
"Type=Application" "Type=Application"
"Categories=Game" "Categories=Game"
"StartupNotify=true" "StartupNotify=true"
"Path="${PORT_WINE_PATH}/data/scripts/"" "Path="${PORT_SCRIPTS_PATH}/""
"Icon="${PORT_WINE_PATH}/data/img/s.png""" > "${PORT_WINE_PATH}/Settings/${name_desktop}.desktop" "Icon="${PORT_WINE_PATH}/data/img/s.png""" > "${PORT_WINE_PATH}/Settings/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/Settings/${name_desktop}.desktop" chmod u+x "${PORT_WINE_PATH}/Settings/${name_desktop}.desktop"
done done
...@@ -53,42 +53,47 @@ for name_desktop in "debug" "reset" ...@@ -53,42 +53,47 @@ for name_desktop in "debug" "reset"
do do
echo ""[Desktop Entry]" echo ""[Desktop Entry]"
"Name=${name_desktop}" "Name=${name_desktop}"
"Exec=sh "${PORT_WINE_PATH}/data/scripts/${name_desktop}"" "Exec=sh "${PORT_SCRIPTS_PATH}/${name_desktop}""
"Type=Application" "Type=Application"
"Categories=Game" "Categories=Game"
"StartupNotify=true" "StartupNotify=true"
"Path="${PORT_WINE_PATH}/data/scripts/"" "Path="${PORT_SCRIPTS_PATH}/""
"Icon="${PORT_WINE_PATH}/data/img/s.png""" > "${PORT_WINE_PATH}/${name_desktop}.desktop" "Icon="${PORT_WINE_PATH}/data/img/s.png""" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop" chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
done done
echo ""[Desktop Entry]" echo ""[Desktop Entry]"
"Name=winetricks" "Name=winetricks"
"Exec=sh "${PORT_WINE_PATH}/data/scripts/remove"" "Exec=sh "${PORT_SCRIPTS_PATH}/remove""
"Type=Application" "Type=Application"
"Categories=Game" "Categories=Game"
"StartupNotify=true" "StartupNotify=true"
"Path="${PORT_WINE_PATH}/data/scripts/"" "Path="${PORT_SCRIPTS_PATH}/""
"Icon="${PORT_WINE_PATH}/data/img/rm.png""" > "${PORT_WINE_PATH}/Settings/remove.desktop" "Icon="${PORT_WINE_PATH}/data/img/rm.png""" > "${PORT_WINE_PATH}/Settings/remove.desktop"
chmod u+x "${PORT_WINE_PATH}/Settings/remove.desktop" chmod u+x "${PORT_WINE_PATH}/Settings/remove.desktop"
echo ""[Desktop Entry]" echo ""[Desktop Entry]"
"Name=winetricks" "Name=winetricks"
"Exec=sh "${PORT_WINE_PATH}/data/scripts/winetricks-q-force"" "Exec=sh "${PORT_SCRIPTS_PATH}/winetricks-q-force""
"Type=Application" "Type=Application"
"Categories=Game" "Categories=Game"
"StartupNotify=true" "StartupNotify=true"
"Path="${PORT_WINE_PATH}/data/scripts/"" "Path="${PORT_SCRIPTS_PATH}/""
"Icon="${PORT_WINE_PATH}/data/img/s.png""" > "${PORT_WINE_PATH}/Settings/winetricks.desktop" "Icon="${PORT_WINE_PATH}/data/img/s.png""" > "${PORT_WINE_PATH}/Settings/winetricks.desktop"
chmod u+x "${PORT_WINE_PATH}/Settings/winetricks.desktop" chmod u+x "${PORT_WINE_PATH}/Settings/winetricks.desktop"
chmod u+x "${PORT_WINE_PATH}/data/scripts/"* chmod u+x "${PORT_SCRIPTS_PATH}/"*
if [ ! -d "${PORT_WINE_PATH}/drive_c" ]; then if [ ! -d "${PORT_WINE_PATH}/drive_c" ]; then
ln -s "${PORT_WINE_PATH}/data/pfx/drive_c/" "${PORT_WINE_PATH}/drive_c" ln -s "${PORT_WINE_PATH}/data/pfx/drive_c/" "${PORT_WINE_PATH}/drive_c"
fi fi
if [ ! -d "${PORT_WINE_PATH}/data/pfx/drive_c/users/${USER}" ]; then
ln -s "${PORT_WINE_PATH}/data/pfx/drive_c/users/steamuser" "${PORT_WINE_PATH}/data/pfx/drive_c/users/${USER}"
fi
sed -i "s/xuser/${USER}/g" "${PORT_WINE_PATH}/data/pfx/"*.reg sed -i "s/xuser/${USER}/g" "${PORT_WINE_PATH}/data/pfx/"*.reg
sed -i "s/vagrant/${USER}/g" "${PORT_WINE_PATH}/data/pfx/"*.reg
if [ ! -z "${PATH_TO_GAME}" ]; then if [ ! -z "${PATH_TO_GAME}" ]; then
rm -f "${PATH_TO_GAME}"/*.dxvk-cache rm -f "${PATH_TO_GAME}"/*.dxvk-cache
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
START_PORTWINE START_PORTWINE
if [ ! -z "$1" ]; then if [ ! -z "$1" ]; then
if [ ! -z ${optirun_on} ]; then if [ ! -z ${optirun_on} ]; then
${optirun_on} "${port_on_run}" "run" "$1" &>/dev/null ${optirun_on} "${port_on_run}" "run" "$1"
else else
"${port_on_run}" "run" "$1" &>/dev/null "${port_on_run}" "run" "$1"
fi fi
else else
if [ ! -z ${optirun_on} ]; then if [ ! -z ${optirun_on} ]; then
${optirun_on} "${port_on_run}" "run" "${gamestart}" ${launch_parameters} &>/dev/null ${optirun_on} "${port_on_run}" "run" "${gamestart}" ${launch_parameters}
else else
"${port_on_run}" "run" "${gamestart}" ${launch_parameters} &>/dev/null "${port_on_run}" "run" "${gamestart}" ${launch_parameters}
fi fi
fi fi
STOP_PORTWINE STOP_PORTWINE
...@@ -6,11 +6,11 @@ wine_pids=$(ls -l /proc/*/exe 2>/dev/null | grep -E 'wine(64)?-preloader|wineser ...@@ -6,11 +6,11 @@ wine_pids=$(ls -l /proc/*/exe 2>/dev/null | grep -E 'wine(64)?-preloader|wineser
if ! [ -z "${wine_pids}" ] ; then if ! [ -z "${wine_pids}" ] ; then
kill -9 ${wine_pids} kill -9 ${wine_pids}
fi fi
rm -f ${link}/winetricks rm -f ${PORT_SCRIPTS_PATH}/winetricks
"/usr/bin/xterm" -e wget -T 3 --output-document="${link}/winetricks" https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks "/usr/bin/xterm" -e wget -T 3 --output-document="${PORT_SCRIPTS_PATH}/winetricks" https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x "${link}/winetricks" chmod +x "${PORT_SCRIPTS_PATH}/winetricks"
sed -i '18a . $(dirname $(readlink -f "$0"))/runlib\nSTART_PORTWINE\nexport WINELOADER="${WINEDIR}/bin/wine" ' "${link}/winetricks" sed -i '18a . $(dirname $(readlink -f "$0"))/runlib\nSTART_PORTWINE\nexport WINELOADER="${WINEDIR}/bin/wine" ' "${PORT_SCRIPTS_PATH}/winetricks"
sleep 1 sleep 1
export PW_LOG=1 export PW_LOG=1
"/usr/bin/xterm" -e "sh ${link}/winetricks -q --force" "/usr/bin/xterm" -e "sh ${PORT_SCRIPTS_PATH}/winetricks -q --force"
STOP_PORTWINE 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