src/Pure/System/cygwin.scala
changeset 43520 cec9b95fa35d
parent 41333 2a12d91a6ab7
child 43650 f00da558b78e
equal deleted inserted replaced
43519:024bd7f5ee0f 43520:cec9b95fa35d
     4 Accessing the Cygwin installation.
     4 Accessing the Cygwin installation.
     5 */
     5 */
     6 
     6 
     7 package isabelle
     7 package isabelle
     8 
     8 
       
     9 import java.lang.System
     9 import java.lang.reflect.Method
    10 import java.lang.reflect.Method
    10 import java.io.File
    11 import java.io.File
    11 import java.net.URL
    12 import java.net.URL
    12 import java.awt.Component
    13 import java.awt.Component
    13 
    14 
    89       error("Bad Cygwin installation: " + root.toString)
    90       error("Bad Cygwin installation: " + root.toString)
    90   }
    91   }
    91 
    92 
    92   def check_root(): String =
    93   def check_root(): String =
    93   {
    94   {
    94     val this_cygwin = java.lang.System.getenv("THIS_CYGWIN")
    95     val this_cygwin = System.getenv("THIS_CYGWIN")
    95     val root =
    96     val root =
    96       if (this_cygwin != null && this_cygwin != "") this_cygwin
    97       if (this_cygwin != null && this_cygwin != "") this_cygwin
    97       else
    98       else
    98         query_registry(CYGWIN_SETUP1, "rootdir") orElse
    99         query_registry(CYGWIN_SETUP1, "rootdir") orElse
    99         query_registry(CYGWIN_SETUP2, "rootdir") getOrElse
   100         query_registry(CYGWIN_SETUP2, "rootdir") getOrElse