src/Pure/Admin/build_release.scala
changeset 69390 46f484b1d6f2
parent 69388 fc58534bc475
child 69391 a3c776b9d3dd
--- a/src/Pure/Admin/build_release.scala	Sun Dec 02 16:21:35 2018 +0100
+++ b/src/Pure/Admin/build_release.scala	Sun Dec 02 17:53:47 2018 +0100
@@ -143,6 +143,28 @@
 
   /** build_release **/
 
+  def distribution_classpath(
+    components_base: Path,
+    isabelle_home: Path,
+    isabelle_classpath: String): List[Path] =
+  {
+    val base = isabelle_home.absolute
+    val contrib_base = components_base.absolute
+
+    Path.split(isabelle_classpath).map(path =>
+    {
+      val abs_path = path.absolute
+      File.relative_path(base, abs_path) match {
+        case Some(rel_path) => rel_path
+        case None =>
+          File.relative_path(contrib_base, abs_path) match {
+            case Some(rel_path) => Path.explode("contrib") + rel_path
+            case None => error("Bad ISABELLE_CLASSPATH element: " + path)
+          }
+      }
+    }) ::: List(Path.explode("src/Tools/jEdit/dist/jedit.jar"))
+  }
+
   private def execute(dir: Path, script: String): Unit =
     Isabelle_System.bash(script, cwd = dir.file).check