view WarFoundry.sh @ 165:dc13cef2bc2b

Re #420: Saved army does not save "contained" structure * Make sure GTK# UI loads nesting correctly
author IBBoard <dev@ibboard.co.uk>
date Sat, 01 Sep 2012 15:29:15 +0100
parents 4149dbdf042f
children
line wrap: on
line source

#! /bin/bash

function reportError {
	echo "ERROR: $1" >&2
	command -v zenity >/dev/null 2>&1
	if [[ $? == 0 ]]; then
		zenity --error --text="$1"
		return
	fi

	command -v kdialog >/dev/null 2>&1
	if [[ $? == 0 ]]; then
		kdialog --error "$1"
	fi
}

command -v mono >/dev/null 2>&1
if [[ $? != 0 ]]; then
	reportError "WarFoundry requires Mono to run - please install it from your package manager"
	exit 3
fi

MONO_ARGS=''

command -v lsb_release >/dev/null 2>&1
if [[ $? == 0 ]]; then
	if [[ `lsb_release -is` == "Ubuntu" && `lsb_release -rs` > 12 ]]; then
		MONO_ARGS=' --runtime=v4.0'
	fi
fi

mono $MONO_ARGS WarFoundry-GTK.exe $@