Admin/MacOS/App1/script
changeset 44880 9fb612890ad9
parent 41644 a6c45c8d52fc
child 44881 ca2f585d1ebe
equal deleted inserted replaced
44879:3b6613366dd7 44880:9fb612890ad9
    71 
    71 
    72 # run interface with error feedback
    72 # run interface with error feedback
    73 
    73 
    74 OUTPUT="/tmp/isabelle$$.out"
    74 OUTPUT="/tmp/isabelle$$.out"
    75 
    75 
    76 # ( "$ISABELLE_TOOL" jedit "$@" ) > "$OUTPUT" 2>&1
    76 declare -a CHOICE
    77 ( "$ISABELLE_TOOL" emacs "${EMACS_OPTIONS[@]}" "$@" ) > "$OUTPUT" 2>&1
    77 CHOICE=($("$THIS/CocoaDialog.app/Contents/MacOS/CocoaDialog" dropdown \
    78 RC=$?
    78   --title Isabelle \
       
    79   --text "Which Isabelle interface?" \
       
    80   --items "Emacs / Proof General" "Isabelle/jEdit PIDE" \
       
    81   --button1 "OK"))
       
    82 
       
    83 if [ "${CHOICE[1]}" = 0 ]; then
       
    84   ( "$ISABELLE_TOOL" emacs "${EMACS_OPTIONS[@]}" "$@" ) > "$OUTPUT" 2>&1
       
    85   RC=$?
       
    86 else
       
    87   ( "$ISABELLE_TOOL" jedit "$@" ) > "$OUTPUT" 2>&1
       
    88   RC=$?
       
    89 fi
    79 
    90 
    80 if [ "$RC" != 0 ]; then
    91 if [ "$RC" != 0 ]; then
    81   echo >> "$OUTPUT"
    92   echo >> "$OUTPUT"
    82   echo "Return code: $RC" >> "$OUTPUT"
    93   echo "Return code: $RC" >> "$OUTPUT"
    83 fi
    94 fi