src/Pure/Tools/main.scala
changeset 53423 b5a279c7d7f3
parent 53422 ec97451fdf2e
child 53445 811db2b751ed
equal deleted inserted replaced
53422:ec97451fdf2e 53423:b5a279c7d7f3
    45             if (isabelle_home == null || isabelle_home == "")
    45             if (isabelle_home == null || isabelle_home == "")
    46               error("Unknown Isabelle home directory")
    46               error("Unknown Isabelle home directory")
    47             if (!(new JFile(isabelle_home)).isDirectory)
    47             if (!(new JFile(isabelle_home)).isDirectory)
    48               error("Bad Isabelle home directory: " + quote(isabelle_home))
    48               error("Bad Isabelle home directory: " + quote(isabelle_home))
    49 
    49 
    50             System.setProperty("cygwin.root", isabelle_home + "\\contrib\\cygwin")
    50             val cygwin_root = isabelle_home + "\\contrib\\cygwin"
       
    51             if ((new JFile(cygwin_root)).isDirectory)
       
    52               System.setProperty("cygwin.root", cygwin_root)
    51 
    53 
    52             val uninitialized_file =
    54             val uninitialized_file = new JFile(cygwin_root, "isabelle\\uninitialized")
    53               new JFile(isabelle_home, "contrib\\cygwin\\isabelle\\uninitialized")
       
    54             val uninitialized = uninitialized_file.isFile && uninitialized_file.delete
    55             val uninitialized = uninitialized_file.isFile && uninitialized_file.delete
    55 
    56 
    56             if (uninitialized) Some(isabelle_home) else None
    57             if (uninitialized) Some(isabelle_home) else None
    57           }
    58           }
    58         }
    59         }