--- 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
- }
-}
-
--- 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")
--- 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 */
--- 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