diff options
author | Brenton Horne | 2019-03-23 21:26:52 +1000 |
---|---|---|
committer | Brenton Horne | 2019-03-23 21:26:52 +1000 |
commit | 89c4d3e9044c1a4eefa45d4921d0c4345d141fb7 (patch) | |
tree | e1b24347c2179dfec0eb794caecd97f10d4d5160 /openra-ra2 | |
download | aur-89c4d3e9044c1a4eefa45d4921d0c4345d141fb7.tar.gz |
Initial commit
Diffstat (limited to 'openra-ra2')
-rwxr-xr-x | openra-ra2 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/openra-ra2 b/openra-ra2 new file mode 100755 index 000000000000..163ca5fd6131 --- /dev/null +++ b/openra-ra2 @@ -0,0 +1,19 @@ +#!/bin/sh +cd "/usr/lib/openra-ra2" + +# Run the game +mono --debug OpenRA.Game.exe Game.Mod=ra2 Engine.LaunchPath="/usr/bin/openra-ra2" "Engine.ModSearchPaths=/usr/lib/openra-ra2/mods" "$@" + +# Show a crash dialog if something went wrong +if [ $? != 0 ] && [ $? != 1 ]; then + ERROR_MESSAGE="OpenRA Red Alert 2 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 "OpenRA Red Alert 2" --text "${ERROR_MESSAGE}" 2> /dev/null + elif command -v kdialog > /dev/null; then + kdialog --title "OpenRA Red Alert 2" --error "${ERROR_MESSAGE}" + else + printf "${ERROR_MESSAGE}\n" + fi + exit 1 +fi + |