--- a/src/Pure/System/cygwin_init.scala Thu Sep 05 21:11:16 2013 +0200
+++ b/src/Pure/System/cygwin_init.scala Thu Sep 05 21:37:32 2013 +0200
@@ -100,6 +100,8 @@
private def init_filesystem(isabelle_home: String, echo: String => Unit)
{
+ val cygwin_root = isabelle_home + "\\contrib\\cygwin"
+
def execute(args: String*): Int =
{
val cwd = new JFile(isabelle_home)
@@ -125,7 +127,7 @@
echo("symlinks ...")
val symlinks =
{
- val path = (new JFile("contrib\\cygwin\\isabelle\\symlinks")).toPath
+ val path = (new JFile(cygwin_root + "\\isabelle\\symlinks")).toPath
Files.readAllLines(path, UTF8.charset).toArray.toList.asInstanceOf[List[String]]
}
@tailrec def recover_symlinks(list: List[String]): Unit =
@@ -148,10 +150,10 @@
recover_symlinks(symlinks)
echo("rebaseall ...")
- execute("contrib\\cygwin\\bin\\dash.exe", "/isabelle/rebaseall")
+ execute(cygwin_root + "\\bin\\dash.exe", "/isabelle/rebaseall")
echo("postinstall ...")
- execute("contrib\\cygwin\\bin\\bash.exe", "/isabelle/postinstall")
+ execute(cygwin_root + "\\bin\\bash.exe", "/isabelle/postinstall")
echo("init ...")
Isabelle_System.init()
--- a/src/Pure/Tools/main.scala Thu Sep 05 21:11:16 2013 +0200
+++ b/src/Pure/Tools/main.scala Thu Sep 05 21:37:32 2013 +0200
@@ -47,10 +47,11 @@
if (!(new JFile(isabelle_home)).isDirectory)
error("Bad Isabelle home directory: " + quote(isabelle_home))
- System.setProperty("cygwin.root", isabelle_home + "\\contrib\\cygwin")
+ val cygwin_root = isabelle_home + "\\contrib\\cygwin"
+ if ((new JFile(cygwin_root)).isDirectory)
+ System.setProperty("cygwin.root", cygwin_root)
- val uninitialized_file =
- new JFile(isabelle_home, "contrib\\cygwin\\isabelle\\uninitialized")
+ val uninitialized_file = new JFile(cygwin_root, "isabelle\\uninitialized")
val uninitialized = uninitialized_file.isFile && uninitialized_file.delete
if (uninitialized) Some(isabelle_home) else None