From 590de11df45105cdccb1ca6bfcd27701be702821 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 19 Oct 2014 14:19:30 +1300 Subject: [PATCH] Add crash dialog to Linux launcher. --- Makefile | 9 ++++++++- error-dialog.sh | 3 --- 2 files changed, 8 insertions(+), 4 deletions(-) delete mode 100755 error-dialog.sh diff --git a/Makefile b/Makefile index 484c655d93..11701bfc48 100644 --- a/Makefile +++ b/Makefile @@ -357,7 +357,14 @@ install-linux-desktop: install-linux-scripts: @echo "#!/bin/sh" > openra @echo 'cd "$(gameinstalldir)"' >> openra - @echo 'exec mono OpenRA.Game.exe "$$@"' >> openra + @echo 'mono OpenRA.Game.exe "$$@"' >> openra + @echo 'if [ $$? != 0 ]' >> openra + @echo 'then' >> openra + @echo 'ZENITY=`which zenity` || echo "OpenRA needs zenity installed to display a graphical error dialog. See ~/.openra. for log files."' >> openra + @echo '$$ZENITY --question --title "OpenRA" --text "OpenRA has encountered a fatal error.\nLog Files are available in ~/.openra." --ok-label "Quit" --cancel-label "View FAQ" || xdg-open https://github.com/OpenRA/OpenRA/wiki/FAQ' >> openra + @echo 'exit 1' >> openra + @echo 'fi' >> openra + @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)" @$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)" @-$(RM) openra diff --git a/error-dialog.sh b/error-dialog.sh deleted file mode 100755 index 371ea3f178..0000000000 --- a/error-dialog.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -ZENITY=`which zenity` || echo "OpenRA needs zenity installed to display a graphical error dialog. See ~/.openra. for log files." -$ZENITY --question --title "OpenRA" --text "OpenRA has encountered a fatal error.\nLog Files are available in ~/.openra." --ok-label "Quit" --cancel-label "View FAQ" || xdg-open https://github.com/OpenRA/OpenRA/wiki/FAQ \ No newline at end of file