Commit 999b4592 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Added silent installation

parent 5c369f4e
#!/bin/bash
# Author: PortWINE-Linux.ru
. "$(dirname $(readlink -f "$0"))/runlib"
START_PORTWINE
if [ -f "$1" ]; then
export portwine_exe="$(readlink -f "$1")"
export PATH_TO_GAME="$( cd "$( dirname "$1" )" >/dev/null 2>&1 && pwd )"
START_PORTWINE
if [ ! -z ${optirun_on} ]; then
"${PW_RUNTIME}" $PW_TERM ${optirun_on} "${port_on_run}" "run" "$portwine_exe"
else
"${PW_RUNTIME}" $PW_TERM "${port_on_run}" "run" "$portwine_exe"
fi
else
START_PORTWINE
sh "${PORT_SCRIPTS_PATH}/winefile"
if [ ! -z ${optirun_on} ]
then
"${PW_RUNTIME}" $PW_TERM ${optirun_on} "${port_on_run}" "run" "explorer"
else
"${PW_RUNTIME}" $PW_TERM "${port_on_run}" "run" "explorer"
fi
fi
STOP_PORTWINE
......@@ -11,6 +11,10 @@ clear && echo '
'
########################################################################
[ $(id -u) = 0 ] && echo "Do not run this script as root!" && zenity --error --text "Do not run this script as root!" && exit 1
if [ "${s_install}" != "1" ] && [ ! -x "`which "zenity" 2>/dev/null`" ];then
echo "You will need to install: zenity, and restart the port."
xdg-open "http://portwine-linux.ru/portwine-faq/" > /dev/null 2>&1 & exit 0
fi
########################################################################
sszen() {
zenity --progress --title="Settings..." --text="Updating start parameters" --pulsate --auto-close --auto-kill --width=450
......
......@@ -118,4 +118,10 @@ if [ -f "${PORT_WINE_PATH}/restart.desktop" ]; then
fi
update-desktop-database -q "${HOME}/.local/share/applications"
xdg-open "http://portwine-linux.ru/portwine-faq/" > /dev/null 2>&1 & exit 0
if [ "${s_install}" = "1" ]; then
echo "Installation completed successfully."
else
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
xdg-open "http://portwine-linux.ru/portwine-faq/" > /dev/null 2>&1 & exit 0
fi
......@@ -51,5 +51,4 @@ echo " "
ADD_IN_POST_INSTALL ()
{
rm -f "${PORT_WINE_PATH}/data/pfx/drive_c/ProgramData/Battle.net/Agent/product.db"
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
}
......@@ -47,6 +47,6 @@ echo " "
########################################################################
ADD_IN_POST_INSTALL ()
{
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
echo " "
}
......@@ -47,5 +47,5 @@ echo " "
########################################################################
ADD_IN_POST_INSTALL ()
{
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
echo " "
}
......@@ -53,6 +53,6 @@ echo " "
########################################################################
ADD_IN_POST_INSTALL ()
{
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
echo " "
}
......@@ -38,5 +38,5 @@ echo " "
########################################################################
ADD_IN_POST_INSTALL ()
{
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
echo " "
}
......@@ -50,5 +50,5 @@ echo " "
########################################################################
ADD_IN_POST_INSTALL ()
{
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
echo " "
}
......@@ -63,5 +63,5 @@ done
########################################################################
ADD_IN_POST_INSTALL ()
{
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
echo " "
}
......@@ -47,5 +47,5 @@ echo " "
########################################################################
ADD_IN_POST_INSTALL ()
{
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
echo " "
}
......@@ -52,5 +52,4 @@ if [ "${update_loc}" = "ENG" ]; then
sed -i 's/RU/EN/g' "${PORT_WINE_PATH}/data/pfx/drive_c/Games/WGC/preferences.xml"
sed -i 's/ru/en/g' "${PORT_WINE_PATH}/data/pfx/drive_c/Games/WGC/preferences.xml"
fi
`zenity --info --title "${inst_set_top}" --text "${inst_succ}" --no-wrap ` > /dev/null 2>&1
}
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