diff --git a/Makefile b/Makefile index 5ab9c331f5..4ba93c89ad 100644 --- a/Makefile +++ b/Makefile @@ -328,6 +328,8 @@ install-core: default @$(INSTALL_PROGRAM) thirdparty/Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) thirdparty/RestSharp.dll "$(DATA_INSTALL_DIR)" + @$(INSTALL_PROGRAM) -m +rx "error-dialog.sh" "$(DATA_INSTALL_DIR)" + @echo "#!/bin/sh" > openra @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra diff --git a/OpenRA.Game/Platform.cs b/OpenRA.Game/Platform.cs index be1e52f53b..2c0c6fc699 100644 --- a/OpenRA.Game/Platform.cs +++ b/OpenRA.Game/Platform.cs @@ -129,6 +129,9 @@ namespace OpenRA ).F(title, message, icon, logsButton, logsPath, faqButton, faqPath, quitButton); } + if (CurrentPlatform == PlatformType.Linux && File.Exists("/usr/bin/zenity") && File.Exists("/usr/bin/xdg-open")) + process = "error-dialog.sh"; + var psi = new ProcessStartInfo(process, args); psi.UseShellExecute = false; psi.CreateNoWindow = true; diff --git a/error-dialog.sh b/error-dialog.sh new file mode 100755 index 0000000000..9fd72ec12d --- /dev/null +++ b/error-dialog.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +zenity --error --title "OpenRA" --text "OpenRA has encountered a fatal error." + +zenity --question --title "OpenRA" --text="Would you like have a look at the crash log files?" || exit + +xdg-open ~/.openra/Logs + +zenity --question --title "OpenRA" --text="Would you like to read the FAQ?" || exit + +xdg-open https://github.com/OpenRA/OpenRA/wiki/FAQ \ No newline at end of file diff --git a/packaging/linux/deb/DEBIAN/control b/packaging/linux/deb/DEBIAN/control index 0252c2ea77..ef487f9cbf 100644 --- a/packaging/linux/deb/DEBIAN/control +++ b/packaging/linux/deb/DEBIAN/control @@ -3,7 +3,7 @@ Version: {VERSION} Architecture: all Maintainer: Chris Forbes Installed-Size: {SIZE} -Depends: libopenal1, mono-runtime (>= 2.10), libmono-system-core4.0-cil, libmono-system-drawing4.0-cil, libmono-system-windows-forms4.0-cil, libfreetype6, libc6, libasound2, libgl1-mesa-glx, libgl1-mesa-dri +Depends: libopenal1, mono-runtime (>= 2.10), libmono-system-core4.0-cil, libmono-system-drawing4.0-cil, libmono-system-windows-forms4.0-cil, libfreetype6, libc6, libasound2, libgl1-mesa-glx, libgl1-mesa-dri, xdg-utils, zenity Section: games Priority: extra Homepage: http://www.open-ra.org/ diff --git a/packaging/linux/pkgbuild/PKGBUILD b/packaging/linux/pkgbuild/PKGBUILD index 030b4b4801..dcbb1f1555 100644 --- a/packaging/linux/pkgbuild/PKGBUILD +++ b/packaging/linux/pkgbuild/PKGBUILD @@ -7,7 +7,7 @@ arch=('any') url="http://open-ra.org" license=('GPL3') groups=() -depends=('mono' 'openal' 'mesa' 'freetype2' 'glibc' 'alsa-lib') +depends=('mono' 'openal' 'mesa' 'freetype2' 'glibc' 'alsa-lib' 'xdg-utils' 'zenity') makedepends=('git' 'unzip' 'wget') optdepends=('gksu: Elevation for installing game packages on Gnome platforms' 'kdesudo: Elevation for installing game packages on KDE platforms') diff --git a/packaging/linux/rpm/openra.spec b/packaging/linux/rpm/openra.spec index 81c946331e..1267d459ad 100644 --- a/packaging/linux/rpm/openra.spec +++ b/packaging/linux/rpm/openra.spec @@ -22,6 +22,8 @@ Requires: libdl.so.2 Requires: libm.so.6 Requires: libpthread.so.0 Requires: librt.so.1 +Requires: xdg-utils +Requires: zenity Prefix: /usr Source: %{name}-%{version}.tar.gz