diff --git a/AUTHORS b/AUTHORS index c73bee95c7..2b29f2fffa 100644 --- a/AUTHORS +++ b/AUTHORS @@ -26,6 +26,7 @@ Also thanks to: * Andrew Perkins * Andrew Riedi * Andreas Beck (baxtor) + * Arik Lirette (Angusm3) * Barnaby Smith (mvi) * Bellator * Braxton Williams (Buddytex) diff --git a/Makefile b/Makefile index 11701bfc48..f593a2e2b0 100644 --- a/Makefile +++ b/Makefile @@ -358,7 +358,7 @@ install-linux-scripts: @echo "#!/bin/sh" > openra @echo 'cd "$(gameinstalldir)"' >> openra @echo 'mono OpenRA.Game.exe "$$@"' >> openra - @echo 'if [ $$? != 0 ]' >> openra + @echo 'if [ $$? != 0 && $$? != 1 ]' >> 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 diff --git a/OpenRA.Game/Support/Program.cs b/OpenRA.Game/Support/Program.cs index b219f96921..542cf2cbb5 100644 --- a/OpenRA.Game/Support/Program.cs +++ b/OpenRA.Game/Support/Program.cs @@ -16,7 +16,7 @@ using System.Text; namespace OpenRA { - enum RunStatus + public enum RunStatus { Error = -1, Success = 0, diff --git a/OpenRA.GameMonitor/GameMonitor.cs b/OpenRA.GameMonitor/GameMonitor.cs index fdaf6625a6..a284fe40e2 100644 --- a/OpenRA.GameMonitor/GameMonitor.cs +++ b/OpenRA.GameMonitor/GameMonitor.cs @@ -105,7 +105,7 @@ namespace OpenRA static void GameProcessExited(object sender, EventArgs e) { - if (gameProcess.ExitCode != 0) + if (!(gameProcess.ExitCode == (int)RunStatus.Success || gameProcess.ExitCode == (int)RunStatus.Restart)) ShowErrorDialog(); Exit(); diff --git a/launch-game.sh b/launch-game.sh index 6b73263d68..85faa77f40 100755 --- a/launch-game.sh +++ b/launch-game.sh @@ -1,9 +1,9 @@ #!/bin/sh # launch script (executed by Desura) mono OpenRA.Game.exe Server.Dedicated=False Server.DedicatedLoop=False "$@" -if [ $? != 0 ] +if [ $? != 0 && $? != 1 ] then 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 exit 1 -fi \ No newline at end of file +fi diff --git a/packaging/osx/template.app/Contents/MacOS/OpenRA b/packaging/osx/template.app/Contents/MacOS/OpenRA index 6cb51f0d59..379774e9ea 100755 --- a/packaging/osx/template.app/Contents/MacOS/OpenRA +++ b/packaging/osx/template.app/Contents/MacOS/OpenRA @@ -42,7 +42,7 @@ fi cd "$RESOURCES" && FONTCONFIG_PATH="." $MONO_BIN --debug OpenRA.Game.exe Graphics.Renderer=Sdl2 # Display an error dialog on game crash -if [ $? != 0 ] +if [ $? != 0 && $? != 1 ] then osascript \ -e "set logsPath to ((path to application support folder from user domain) as text) & \"OpenRA:Logs:\"" \ @@ -58,4 +58,4 @@ then -e " end repeat" \ -e "end tell" exit 1 -fi \ No newline at end of file +fi