diff options
author | Brenton Horne | 2020-02-11 16:50:42 +1000 |
---|---|---|
committer | Brenton Horne | 2020-02-11 16:50:42 +1000 |
commit | 6b3d7be0c22072d4a655d4897d197676d6ba92b7 (patch) | |
tree | 4dc03b5529f411bd1f2357f89a4a68cb32bebfce /openra-vs | |
download | aur-6b3d7be0c22072d4a655d4897d197676d6ba92b7.tar.gz |
Initial commit
Diffstat (limited to 'openra-vs')
-rwxr-xr-x | openra-vs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/openra-vs b/openra-vs new file mode 100755 index 000000000000..fc2c507b6e55 --- /dev/null +++ b/openra-vs @@ -0,0 +1,19 @@ +#!/bin/sh +cd "/usr/lib/openra-vs" + +# Run the game +mono --debug OpenRA.Game.exe Game.Mod=rv Engine.LaunchPath="/usr/bin/openra-vs" "Engine.ModSearchPaths=/usr/lib/openra-vs/mods" "$@" + +# Show a crash dialog if something went wrong +if [ $? != 0 ] && [ $? != 1 ]; then + ERROR_MESSAGE="OpenRA Valiant Shades 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 Valiant Shades" --text "${ERROR_MESSAGE}" 2> /dev/null + elif command -v kdialog > /dev/null; then + kdialog --title "OpenRA Valiant Shades" --error "${ERROR_MESSAGE}" + else + printf "${ERROR_MESSAGE}\n" + fi + exit 1 +fi + |