changeset 154:c549fd4ff4bf

Re #417: Improve install process * Add error messages with Zenity, in case user just double-clicks .sh file from Nautilus
author IBBoard <dev@ibboard.co.uk>
date Thu, 10 May 2012 21:01:42 +0100
parents 87fda1e6d4d3
children 7b091ea86819
files WarFoundry.sh gtk-gui/objects.xml
diffstat 2 files changed, 34 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/WarFoundry.sh	Tue May 08 21:01:57 2012 +0100
+++ b/WarFoundry.sh	Thu May 10 21:01:42 2012 +0100
@@ -1,9 +1,16 @@
 #! /bin/bash
 
-command -v mono >/dev/null 2>&1
+function reportError {
+	echo "ERROR: $1" >&2
+	command -v zenity >/dev/null 2>&1
+	if [[ $? == 0 ]]; then
+		zenity --error --text="$1"
+	fi
+}
+
+command -v monoo >/dev/null 2>&1
 if [[ $? != 0 ]]; then
-	##TODO Try using Zenity or similar, in case the user is running from a GUI and not seeing our output
-	echo "WarFoundry requires Mono to run - please install it from your package manager" >&2
+	reportError "WarFoundry requires Mono to run - please install it from your package manager"
 	exit 3
 fi
 
--- a/gtk-gui/objects.xml	Tue May 08 21:01:57 2012 +0100
+++ b/gtk-gui/objects.xml	Thu May 10 21:01:42 2012 +0100
@@ -15,4 +15,28 @@
     <itemgroups />
     <signals />
   </object>
+  <object type="IBBoard.GtkSharp.Translatable.TranslatableLabel" palette-category="General" allow-children="false" base-type="Gtk.Label">
+    <itemgroups>
+      <itemgroup label="ITranslatable Properties">
+        <property name="Text" />
+      </itemgroup>
+    </itemgroups>
+    <signals />
+  </object>
+  <object type="IBBoard.GtkSharp.Translatable.TranslatableButton" palette-category="General" allow-children="false" base-type="Gtk.Button">
+    <itemgroups>
+      <itemgroup label="ITranslatable Properties">
+        <property name="Text" />
+      </itemgroup>
+    </itemgroups>
+    <signals />
+  </object>
+  <object type="IBBoard.GtkSharp.Translatable.TranslatableCheckButton" palette-category="General" allow-children="false" base-type="Gtk.CheckButton">
+    <itemgroups>
+      <itemgroup label="ITranslatable Properties">
+        <property name="Text" />
+      </itemgroup>
+    </itemgroups>
+    <signals />
+  </object>
 </objects>
\ No newline at end of file