# HG changeset patch # User wenzelm # Date 1373976610 -7200 # Node ID f3a6b1d0915e6903f6fb63dd0e472f60e081e074 # Parent 563b7c8279f9480094b7e39167954109edbb99c0 more self-contained application, with side-entry for init; diff -r 563b7c8279f9 -r f3a6b1d0915e Isabelle --- a/Isabelle Tue Jul 16 13:44:52 2013 +0200 +++ b/Isabelle Tue Jul 16 14:10:10 2013 +0200 @@ -4,5 +4,5 @@ # # Default Isabelle application wrapper. -exec "$(dirname "$0")"/bin/isabelle jedit -s "$@" +exec "$(dirname "$0")"/bin/isabelle jedit -s -- "$@" diff -r 563b7c8279f9 -r f3a6b1d0915e src/Pure/Tools/main.scala --- a/src/Pure/Tools/main.scala Tue Jul 16 13:44:52 2013 +0200 +++ b/src/Pure/Tools/main.scala Tue Jul 16 14:10:10 2013 +0200 @@ -13,19 +13,25 @@ { def main(args: Array[String]) { - val (out, rc) = - try { - GUI.init_laf() - Isabelle_System.init() - Isabelle_System.isabelle_tool("jedit", ("-s" :: args.toList): _*) - } - catch { case exn: Throwable => (Exn.message(exn), 2) } + args.toList match { + case "-i" :: rest => + if (Platform.is_windows) Cygwin_Init.main(rest.toArray) - if (rc != 0) - GUI.dialog(null, "Isabelle", "Isabelle output", - GUI.scrollable_text(out + "\nReturn code: " + rc)) + case _ => + val (out, rc) = + try { + GUI.init_laf() + Isabelle_System.init() + Isabelle_System.isabelle_tool("jedit", ("-s" :: "--" :: args.toList): _*) + } + catch { case exn: Throwable => (Exn.message(exn), 2) } - sys.exit(rc) + if (rc != 0) + GUI.dialog(null, "Isabelle", "Isabelle output", + GUI.scrollable_text(out + "\nReturn code: " + rc)) + + sys.exit(rc) + } } }