Add kdialog support for KDE.

This commit is contained in:
Paul Chote
2018-05-04 23:53:24 +01:00
committed by abcdefg30
parent b78e9ee89a
commit 91f22c40bd
4 changed files with 8 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ if mono_missing_or_old; then
ERROR_MESSAGE="{MODNAME} requires Mono ${MINIMUM_MONO_VERSION} or greater.\nPlease install Mono using your system package manager."
if command -v zenity > /dev/null; then
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
elif command -v kdialog > /dev/null; then
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
else
printf "${ERROR_MESSAGE}"
fi

View File

@@ -42,6 +42,8 @@ if [ $? != 0 ] && [ $? != 1 ]; then
ERROR_MESSAGE="{MODNAME} has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in ~/.openra/Logs\nThe FAQ is available at http://wiki.openra.net/FAQ"
if command -v zenity > /dev/null; then
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
elif command -v kdialog > /dev/null; then
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
else
printf "${ERROR_MESSAGE}\n"
fi

View File

@@ -16,6 +16,8 @@ if [ $? != 0 ] && [ $? != 1 ]; then
ERROR_MESSAGE="{MODNAME} has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in ~/.openra/Logs\nThe FAQ is available at http://wiki.openra.net/FAQ"
if command -v zenity > /dev/null; then
zenity --no-wrap --error --title "{MODNAME}" --text "${ERROR_MESSAGE}" 2> /dev/null
elif command -v kdialog > /dev/null; then
kdialog --title "{MODNAME}" --error "${ERROR_MESSAGE}"
else
printf "${ERROR_MESSAGE}\n"
fi