python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / games / openra / mod-launch-game.sh
blob88b53e71e1bc4657941c9f4f85a5886a0d72c5b3
1 #!/usr/bin/env bash
2 show_error() {
3 if command -v zenity > /dev/null; then
4 zenity --no-wrap --no-markup --error --title "OpenRA - @title@" --text "$1" 2>/dev/null
5 else
6 printf "$1\n" >&2
7 fi
8 exit 1
11 cd "@out@/lib/openra-@name@"
13 # Check for missing assets
14 assetsError='@assetsError@'
15 if [[ -n "$assetsError" && ! -d "$HOME/.openra/Content/@name@" ]]; then
16 show_error "$assetsError"
19 # Run the game
20 mono --debug OpenRA.Game.exe Game.Mod=@name@ Engine.LaunchPath="@out@/bin/openra-@name@" Engine.ModSearchPaths="@out@/lib/openra-@name@/mods" "$@"
22 # Show a crash dialog if something went wrong
23 if (( $? != 0 && $? != 1 )); then
24 show_error $'OpenRA - @title@ has encountered a fatal error.\nPlease refer to the crash logs for more information.\n\nLog files are located in ~/.openra/Logs'