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

major changes

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