1.1 --- a/src/Pure/System/cygwin.scala Thu May 24 23:28:58 2012 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,40 +0,0 @@
1.4 -/* Title: Pure/System/cygwin.scala
1.5 - Module: PIDE
1.6 - Author: Makarius
1.7 -
1.8 -Accessing the Cygwin installation.
1.9 -*/
1.10 -
1.11 -package isabelle
1.12 -
1.13 -import java.lang.System
1.14 -import java.io.File
1.15 -import java.net.URL
1.16 -import java.awt.Component
1.17 -
1.18 -
1.19 -object Cygwin
1.20 -{
1.21 - /* Cygwin installation */
1.22 -
1.23 - private def sanity_check(root: File)
1.24 - {
1.25 - if (!new File(root, "bin\\bash.exe").isFile ||
1.26 - !new File(root, "bin\\env.exe").isFile ||
1.27 - !new File(root, "bin\\tar.exe").isFile)
1.28 - error("Bad Cygwin installation: " + root.toString)
1.29 - }
1.30 -
1.31 - def check_root(): String =
1.32 - {
1.33 - val cygwin_root1 = System.getenv("CYGWIN_ROOT")
1.34 - val cygwin_root2 = System.getProperty("cygwin.root")
1.35 - val root =
1.36 - if (cygwin_root1 != null && cygwin_root1 != "") cygwin_root1
1.37 - else if (cygwin_root2 != null && cygwin_root2 != "") cygwin_root2
1.38 - else error("Bad Cygwin installation: unknown root")
1.39 - sanity_check(new File(root))
1.40 - root
1.41 - }
1.42 -}
1.43 -
2.1 --- a/src/Pure/System/gui_setup.scala Thu May 24 23:28:58 2012 +0200
2.2 +++ b/src/Pure/System/gui_setup.scala Thu May 24 23:44:16 2012 +0200
2.3 @@ -41,7 +41,7 @@
2.4
2.5 // values
2.6 if (Platform.is_windows)
2.7 - text.append("Cygwin root: " + Cygwin.check_root() + "\n")
2.8 + text.append("Cygwin root: " + Standard_System.cygwin_root() + "\n")
2.9 text.append("JVM name: " + Platform.jvm_name + "\n")
2.10 text.append("JVM platform: " + Platform.jvm_platform + "\n")
2.11 text.append("JVM home: " + java.lang.System.getProperty("java.home") + "\n")
3.1 --- a/src/Pure/System/standard_system.scala Thu May 24 23:28:58 2012 +0200
3.2 +++ b/src/Pure/System/standard_system.scala Thu May 24 23:44:16 2012 +0200
3.3 @@ -269,6 +269,27 @@
3.4 proc.destroy
3.5 }
3.6 }
3.7 +
3.8 +
3.9 + /* cygwin_root */
3.10 +
3.11 + def cygwin_root(): String =
3.12 + {
3.13 + val cygwin_root1 = System.getenv("CYGWIN_ROOT")
3.14 + val cygwin_root2 = System.getProperty("cygwin.root")
3.15 + val root =
3.16 + if (cygwin_root1 != null && cygwin_root1 != "") cygwin_root1
3.17 + else if (cygwin_root2 != null && cygwin_root2 != "") cygwin_root2
3.18 + else error("Bad Cygwin installation: unknown root")
3.19 +
3.20 + val root_file = new File(root)
3.21 + if (!new File(root_file, "bin\\bash.exe").isFile ||
3.22 + !new File(root_file, "bin\\env.exe").isFile ||
3.23 + !new File(root_file, "bin\\tar.exe").isFile)
3.24 + error("Bad Cygwin installation: " + quote(root))
3.25 +
3.26 + root
3.27 + }
3.28 }
3.29
3.30
3.31 @@ -276,7 +297,7 @@
3.32 {
3.33 /* platform_root */
3.34
3.35 - val platform_root = if (Platform.is_windows) Cygwin.check_root() else "/"
3.36 + val platform_root = if (Platform.is_windows) Standard_System.cygwin_root() else "/"
3.37
3.38
3.39 /* jvm_path */
4.1 --- a/src/Pure/build-jars Thu May 24 23:28:58 2012 +0200
4.2 +++ b/src/Pure/build-jars Thu May 24 23:44:16 2012 +0200
4.3 @@ -39,7 +39,6 @@
4.4 PIDE/text.scala
4.5 PIDE/xml.scala
4.6 PIDE/yxml.scala
4.7 - System/cygwin.scala
4.8 System/event_bus.scala
4.9 System/gui_setup.scala
4.10 System/invoke_scala.scala