summarylogtreecommitdiffstats
path: root/openra-ra2
diff options
context:
space:
mode:
authorBrenton Horne2019-03-23 21:26:52 +1000
committerBrenton Horne2019-03-23 21:26:52 +1000
commit89c4d3e9044c1a4eefa45d4921d0c4345d141fb7 (patch)
treee1b24347c2179dfec0eb794caecd97f10d4d5160 /openra-ra2
downloadaur-89c4d3e9044c1a4eefa45d4921d0c4345d141fb7.tar.gz
Initial commit
Diffstat (limited to 'openra-ra2')
-rwxr-xr-xopenra-ra219
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
+