# HG changeset patch # User wenzelm # Date 1337895856 -7200 # Node ID 969457d93f752d6acb834986a4cb37122a1a03ad # Parent 0a43fc778cd25d18281d5ba12d84b48032340561 discontinued obsolete Cygwin module; diff -r 0a43fc778cd2 -r 969457d93f75 src/Pure/System/cygwin.scala --- a/src/Pure/System/cygwin.scala Thu May 24 23:28:58 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* Title: Pure/System/cygwin.scala - Module: PIDE - Author: Makarius - -Accessing the Cygwin installation. -*/ - -package isabelle - -import java.lang.System -import java.io.File -import java.net.URL -import java.awt.Component - - -object Cygwin -{ - /* Cygwin installation */ - - private def sanity_check(root: File) - { - if (!new File(root, "bin\\bash.exe").isFile || - !new File(root, "bin\\env.exe").isFile || - !new File(root, "bin\\tar.exe").isFile) - error("Bad Cygwin installation: " + root.toString) - } - - def check_root(): String = - { - val cygwin_root1 = System.getenv("CYGWIN_ROOT") - val cygwin_root2 = System.getProperty("cygwin.root") - val root = - if (cygwin_root1 != null && cygwin_root1 != "") cygwin_root1 - else if (cygwin_root2 != null && cygwin_root2 != "") cygwin_root2 - else error("Bad Cygwin installation: unknown root") - sanity_check(new File(root)) - root - } -} - diff -r 0a43fc778cd2 -r 969457d93f75 src/Pure/System/gui_setup.scala --- a/src/Pure/System/gui_setup.scala Thu May 24 23:28:58 2012 +0200 +++ b/src/Pure/System/gui_setup.scala Thu May 24 23:44:16 2012 +0200 @@ -41,7 +41,7 @@ // values if (Platform.is_windows) - text.append("Cygwin root: " + Cygwin.check_root() + "\n") + text.append("Cygwin root: " + Standard_System.cygwin_root() + "\n") text.append("JVM name: " + Platform.jvm_name + "\n") text.append("JVM platform: " + Platform.jvm_platform + "\n") text.append("JVM home: " + java.lang.System.getProperty("java.home") + "\n") diff -r 0a43fc778cd2 -r 969457d93f75 src/Pure/System/standard_system.scala --- a/src/Pure/System/standard_system.scala Thu May 24 23:28:58 2012 +0200 +++ b/src/Pure/System/standard_system.scala Thu May 24 23:44:16 2012 +0200 @@ -269,6 +269,27 @@ proc.destroy } } + + + /* cygwin_root */ + + def cygwin_root(): String = + { + val cygwin_root1 = System.getenv("CYGWIN_ROOT") + val cygwin_root2 = System.getProperty("cygwin.root") + val root = + if (cygwin_root1 != null && cygwin_root1 != "") cygwin_root1 + else if (cygwin_root2 != null && cygwin_root2 != "") cygwin_root2 + else error("Bad Cygwin installation: unknown root") + + val root_file = new File(root) + if (!new File(root_file, "bin\\bash.exe").isFile || + !new File(root_file, "bin\\env.exe").isFile || + !new File(root_file, "bin\\tar.exe").isFile) + error("Bad Cygwin installation: " + quote(root)) + + root + } } @@ -276,7 +297,7 @@ { /* platform_root */ - val platform_root = if (Platform.is_windows) Cygwin.check_root() else "/" + val platform_root = if (Platform.is_windows) Standard_System.cygwin_root() else "/" /* jvm_path */ diff -r 0a43fc778cd2 -r 969457d93f75 src/Pure/build-jars --- a/src/Pure/build-jars Thu May 24 23:28:58 2012 +0200 +++ b/src/Pure/build-jars Thu May 24 23:44:16 2012 +0200 @@ -39,7 +39,6 @@ PIDE/text.scala PIDE/xml.scala PIDE/yxml.scala - System/cygwin.scala System/event_bus.scala System/gui_setup.scala System/invoke_scala.scala