Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
annotate WarFoundry.sh @ 156:08b30dc56af4
Re #417: Improve WarFoundry installation experience
* Make it more obvious how to get data files in GTK# UI
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 12 May 2012 20:11:33 +0100 |
parents | c549fd4ff4bf |
children | b926b1b0ed79 |
rev | line source |
---|---|
112
9a93ae9ad956
* Add simple shell script to make sure that we run through Mono and not Wine (Not necessary, but useful to save confusion)
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 #! /bin/bash |
152
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
2 |
154
c549fd4ff4bf
Re #417: Improve install process
IBBoard <dev@ibboard.co.uk>
parents:
152
diff
changeset
|
3 function reportError { |
c549fd4ff4bf
Re #417: Improve install process
IBBoard <dev@ibboard.co.uk>
parents:
152
diff
changeset
|
4 echo "ERROR: $1" >&2 |
c549fd4ff4bf
Re #417: Improve install process
IBBoard <dev@ibboard.co.uk>
parents:
152
diff
changeset
|
5 command -v zenity >/dev/null 2>&1 |
c549fd4ff4bf
Re #417: Improve install process
IBBoard <dev@ibboard.co.uk>
parents:
152
diff
changeset
|
6 if [[ $? == 0 ]]; then |
c549fd4ff4bf
Re #417: Improve install process
IBBoard <dev@ibboard.co.uk>
parents:
152
diff
changeset
|
7 zenity --error --text="$1" |
c549fd4ff4bf
Re #417: Improve install process
IBBoard <dev@ibboard.co.uk>
parents:
152
diff
changeset
|
8 fi |
c549fd4ff4bf
Re #417: Improve install process
IBBoard <dev@ibboard.co.uk>
parents:
152
diff
changeset
|
9 } |
c549fd4ff4bf
Re #417: Improve install process
IBBoard <dev@ibboard.co.uk>
parents:
152
diff
changeset
|
10 |
c549fd4ff4bf
Re #417: Improve install process
IBBoard <dev@ibboard.co.uk>
parents:
152
diff
changeset
|
11 command -v monoo >/dev/null 2>&1 |
152
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
12 if [[ $? != 0 ]]; then |
154
c549fd4ff4bf
Re #417: Improve install process
IBBoard <dev@ibboard.co.uk>
parents:
152
diff
changeset
|
13 reportError "WarFoundry requires Mono to run - please install it from your package manager" |
152
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
14 exit 3 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
15 fi |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
16 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
17 MONO_ARGS='' |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
18 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
19 command -v lsb_release >/dev/null 2>&1 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
20 if [[ $? == 0 ]]; then |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
21 if [[ `lsb_release -is` == "Ubuntu" && `lsb_release -rs` > 12 ]]; then |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
22 MONO_ARGS=' --runtime=v4.0' |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
23 fi |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
24 fi |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
25 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
26 mono $MONO_ARGS WarFoundry-GTK.exe $@ |