support Cygwin cold-start via Isabelle.exe, assuming layout of bundle;
authorwenzelm
Sun, 22 Apr 2012 21:43:57 +0200
changeset 47679 93e0dada1266
parent 47678 c04b223d661e
child 47681 d9a1b706d569
support Cygwin cold-start via Isabelle.exe, assuming layout of bundle;
Admin/launch4j/isabelle.xml
src/Pure/System/cygwin.scala
--- a/Admin/launch4j/isabelle.xml	Sun Apr 22 19:44:40 2012 +0200
+++ b/Admin/launch4j/isabelle.xml	Sun Apr 22 21:43:57 2012 +0200
@@ -24,6 +24,6 @@
     <minVersion></minVersion>
     <maxVersion></maxVersion>
     <jdkPreference>jdkOnly</jdkPreference>
-    <opt>-Disabelle.home=&quot;%EXEDIR%&quot;</opt>
+    <opt>-Disabelle.home=&quot;%EXEDIR%&quot; -Dcygwin.root=&quot;%EXEDIR%\\contrib\\cygwin-1.7.9&quot;</opt>
   </jre>
 </launch4jConfig>
\ No newline at end of file
--- a/src/Pure/System/cygwin.scala	Sun Apr 22 19:44:40 2012 +0200
+++ b/src/Pure/System/cygwin.scala	Sun Apr 22 21:43:57 2012 +0200
@@ -94,12 +94,14 @@
   def check_root(): String =
   {
     val this_cygwin = System.getenv("THIS_CYGWIN")
+    val cygwin_root = System.getProperty("cygwin.root")
     val root =
       if (this_cygwin != null && this_cygwin != "") this_cygwin
+      else if (cygwin_root != null && cygwin_root != "") cygwin_root
       else
         query_registry(CYGWIN_SETUP1, "rootdir") orElse
         query_registry(CYGWIN_SETUP2, "rootdir") getOrElse
-        error("Failed to determine Cygwin installation -- version 1.7 required")
+        error("Failed to determine Cygwin installation -- version 1.7.x required")
     sanity_check(new File(root))
     root
   }