explicit choice of interface;
authorwenzelm
Sun, 11 Sep 2011 19:52:09 +0200
changeset 44880 9fb612890ad9
parent 44879 3b6613366dd7
child 44881 ca2f585d1ebe
explicit choice of interface;
Admin/MacOS/App1/README
Admin/MacOS/App1/script
--- a/Admin/MacOS/App1/README	Sun Sep 11 17:30:01 2011 +0200
+++ b/Admin/MacOS/App1/README	Sun Sep 11 19:52:09 2011 +0200
@@ -3,7 +3,7 @@
 
 Requirements:
 
-* CocoaDialog 2.2.1 http://cocoadialog.sourceforge.net/
+* CocoaDialog 2.1.1 http://cocoadialog.sourceforge.net/
 
 * Platypus 4.0 http://www.sveinbjorn.org/platypus
 
--- a/Admin/MacOS/App1/script	Sun Sep 11 17:30:01 2011 +0200
+++ b/Admin/MacOS/App1/script	Sun Sep 11 19:52:09 2011 +0200
@@ -73,9 +73,20 @@
 
 OUTPUT="/tmp/isabelle$$.out"
 
-# ( "$ISABELLE_TOOL" jedit "$@" ) > "$OUTPUT" 2>&1
-( "$ISABELLE_TOOL" emacs "${EMACS_OPTIONS[@]}" "$@" ) > "$OUTPUT" 2>&1
-RC=$?
+declare -a CHOICE
+CHOICE=($("$THIS/CocoaDialog.app/Contents/MacOS/CocoaDialog" dropdown \
+  --title Isabelle \
+  --text "Which Isabelle interface?" \
+  --items "Emacs / Proof General" "Isabelle/jEdit PIDE" \
+  --button1 "OK"))
+
+if [ "${CHOICE[1]}" = 0 ]; then
+  ( "$ISABELLE_TOOL" emacs "${EMACS_OPTIONS[@]}" "$@" ) > "$OUTPUT" 2>&1
+  RC=$?
+else
+  ( "$ISABELLE_TOOL" jedit "$@" ) > "$OUTPUT" 2>&1
+  RC=$?
+fi
 
 if [ "$RC" != 0 ]; then
   echo >> "$OUTPUT"