clarified ISABELLE_ROOT (platform path) vs. ISABELLE_HOME (standard path);
authorwenzelm
Wed Sep 30 21:05:14 2015 +0200 (2015-09-30)
changeset 61293876e7eae22be
parent 61292 ca76026ed7cc
child 61294 2d3d26e9b191
clarified ISABELLE_ROOT (platform path) vs. ISABELLE_HOME (standard path);
Admin/Windows/launch4j/isabelle.xml
lib/scripts/getsettings
src/Pure/System/cygwin.scala
src/Pure/System/isabelle_system.scala
     1.1 --- a/Admin/Windows/launch4j/isabelle.xml	Wed Sep 30 20:48:59 2015 +0200
     1.2 +++ b/Admin/Windows/launch4j/isabelle.xml	Wed Sep 30 21:05:14 2015 +0200
     1.3 @@ -30,7 +30,7 @@
     1.4      <maxVersion></maxVersion>
     1.5      <jdkPreference>jdkOnly</jdkPreference>
     1.6      <runtimeBits>{PLATFORM_BITS}</runtimeBits>
     1.7 -    <opt>-Disabelle.home=&quot;%EXEDIR%&quot; -Dcygwin.root=&quot;%EXEDIR%\\contrib\\cygwin&quot;</opt>
     1.8 +    <opt>-Disabelle.root=&quot;%EXEDIR%&quot; -Dcygwin.root=&quot;%EXEDIR%\\contrib\\cygwin&quot;</opt>
     1.9    </jre>
    1.10    <splash>
    1.11      <file>{SPLASH}</file>
     2.1 --- a/lib/scripts/getsettings	Wed Sep 30 20:48:59 2015 +0200
     2.2 +++ b/lib/scripts/getsettings	Wed Sep 30 21:05:14 2015 +0200
     2.3 @@ -38,6 +38,7 @@
     2.4  
     2.5    function jvmpath() { cygpath -i -C UTF8 -w -p "$@"; }
     2.6    CYGWIN_ROOT="$(jvmpath "/")"
     2.7 +  ISABELLE_ROOT="$(jvmpath "$ISABELLE_HOME")"
     2.8  
     2.9    ISABELLE_CLASSPATH="$(cygpath -i -u -p "$CLASSPATH")"
    2.10    unset CLASSPATH
    2.11 @@ -46,6 +47,8 @@
    2.12      USER_HOME="$HOME"
    2.13    fi
    2.14  
    2.15 +  ISABELLE_ROOT="$ISABELLE_HOME"
    2.16 +
    2.17    function jvmpath() { echo "$@"; }
    2.18  
    2.19    ISABELLE_CLASSPATH="$CLASSPATH"
     3.1 --- a/src/Pure/System/cygwin.scala	Wed Sep 30 20:48:59 2015 +0200
     3.2 +++ b/src/Pure/System/cygwin.scala	Wed Sep 30 21:05:14 2015 +0200
     3.3 @@ -17,13 +17,13 @@
     3.4  {
     3.5    /* init (e.g. after extraction via 7zip) */
     3.6  
     3.7 -  def init(isabelle_home: String, cygwin_root: String)
     3.8 +  def init(isabelle_root: String, cygwin_root: String)
     3.9    {
    3.10      require(Platform.is_windows)
    3.11  
    3.12      def execute(args: String*)
    3.13      {
    3.14 -      val cwd = new JFile(isabelle_home)
    3.15 +      val cwd = new JFile(isabelle_root)
    3.16        val env = Map("CYGWIN" -> "nodosfilewarning")
    3.17        val proc = Isabelle_System.raw_execute(cwd, env, true, args: _*)
    3.18        val (output, rc) = Isabelle_System.process_output(proc)
    3.19 @@ -44,7 +44,7 @@
    3.20          list match {
    3.21            case Nil | List("") =>
    3.22            case link :: content :: rest =>
    3.23 -            val path = (new JFile(isabelle_home, link)).toPath
    3.24 +            val path = (new JFile(isabelle_root, link)).toPath
    3.25  
    3.26              val writer = Files.newBufferedWriter(path, UTF8.charset)
    3.27              try { writer.write("!<symlink>" + content + "\u0000") }
     4.1 --- a/src/Pure/System/isabelle_system.scala	Wed Sep 30 20:48:59 2015 +0200
     4.2 +++ b/src/Pure/System/isabelle_system.scala	Wed Sep 30 21:05:14 2015 +0200
     4.3 @@ -57,12 +57,12 @@
     4.4      _settings.get
     4.5    }
     4.6  
     4.7 -  def init(isabelle_home: String = "", cygwin_root: String = ""): Unit = synchronized {
     4.8 +  def init(isabelle_root: String = "", cygwin_root: String = ""): Unit = synchronized {
     4.9      if (_settings.isEmpty) {
    4.10        import scala.collection.JavaConversions._
    4.11  
    4.12 -      val isabelle_home1 =
    4.13 -        bootstrap_directory(isabelle_home, "ISABELLE_HOME", "isabelle.home", "Isabelle home")
    4.14 +      val isabelle_root1 =
    4.15 +        bootstrap_directory(isabelle_root, "ISABELLE_ROOT", "isabelle.root", "Isabelle root")
    4.16  
    4.17        val cygwin_root1 =
    4.18          if (Platform.is_windows)
    4.19 @@ -104,11 +104,13 @@
    4.20          val dump = JFile.createTempFile("settings", null)
    4.21          dump.deleteOnExit
    4.22          try {
    4.23 -          val shell_prefix =
    4.24 +          val cmd1 =
    4.25              if (Platform.is_windows) List(cygwin_root1 + "\\bin\\bash", "-l") else Nil
    4.26 -          val cmdline =
    4.27 -            shell_prefix ::: List(isabelle_home1 + "/bin/isabelle", "getenv", "-d", dump.toString)
    4.28 -          val (output, rc) = process_output(raw_execute(null, env, true, cmdline: _*))
    4.29 +          val cmd2 =
    4.30 +            List(isabelle_root1 + JFile.separator + "bin" + JFile.separator + "isabelle",
    4.31 +              "getenv", "-d", dump.toString)
    4.32 +
    4.33 +          val (output, rc) = process_output(raw_execute(null, env, true, (cmd1 ::: cmd2): _*))
    4.34            if (rc != 0) error(output)
    4.35  
    4.36            val entries =