src/Pure/System/cygwin_init.scala
changeset 53460 6015a663b889
parent 53459 33f773731f0c
equal deleted inserted replaced
53459:33f773731f0c 53460:6015a663b889
    22 
    22 
    23     def execute(args: String*): Int =
    23     def execute(args: String*): Int =
    24     {
    24     {
    25       val cwd = new JFile(isabelle_home)
    25       val cwd = new JFile(isabelle_home)
    26       val env = Map("CYGWIN" -> "nodosfilewarning")
    26       val env = Map("CYGWIN" -> "nodosfilewarning")
    27       val proc = Isabelle_System.raw_execute(cwd, env, true, args: _*)
    27       system_dialog.execute(cwd, env, args: _*)
    28       proc.getOutputStream.close
       
    29 
       
    30       val stdout = new BufferedReader(new InputStreamReader(proc.getInputStream, UTF8.charset))
       
    31       try {
       
    32         var line = stdout.readLine
       
    33         while (line != null) {
       
    34           system_dialog.echo(line)
       
    35           line = stdout.readLine
       
    36         }
       
    37       }
       
    38       finally { stdout.close }
       
    39 
       
    40       proc.waitFor
       
    41     }
    28     }
    42 
    29 
    43     val cygwin_root = isabelle_home + "\\contrib\\cygwin"
    30     val cygwin_root = isabelle_home + "\\contrib\\cygwin"
    44 
    31 
    45     system_dialog.echo("symlinks ...")
    32     system_dialog.echo("symlinks ...")