Files
OpenRA/packaging/linux/openra.in
Paul Chote c1a4e66b29 Adjust zenity crash dialog.
This removes the "View FAQ" button, which does not work in the AppImage
enivronment.  It also replaces the inconsistent question mark icon with
a more appropriate stop symbol, and makes the wording consistent across
the zenity, terminal, and native macOS dialogs.
2018-05-05 22:34:27 +02:00

23 lines
976 B
Bash
Executable File

#!/bin/sh
cd "{GAME_INSTALL_DIR}"
# Search for server connection
PROTOCOL_PREFIX="openra-{MODID}-{TAG}://"
JOIN_SERVER=""
if [ "${1#${PROTOCOL_PREFIX}}" != "${1}" ]; then
JOIN_SERVER="Launch.Connect=${1#${PROTOCOL_PREFIX}}"
fi
# Run the game
mono {DEBUG} OpenRA.Game.exe Game.Mod={MODID} Engine.LaunchPath="{BIN_DIR}/openra-{MODID}" "${JOIN_SERVER}" "$@"
# Show a crash dialog if something went wrong
if [ $? != 0 ] && [ $? != 1 ]; then
if command -v zenity > /dev/null; then
zenity --no-wrap --error --title "{MODNAME}" --text "{MODNAME} 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"
else
printf "{MODNAME} 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\n"
fi
exit 1
fi