summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/support
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-07-11 21:18:13 +0000
committerKarl Berry <karl@freefriends.org>2019-07-11 21:18:13 +0000
commitd9fdc45f38b6a264acb0f5ecbfc1a68e900cb0dd (patch)
treebc45fe62a79d344332af3c779fdf9555b9c633d2 /Master/texmf-dist/source/support
parent98f89874f52c2e28da43ff4b4583d1900dcbed31 (diff)
tlcockpit (11jul19)
git-svn-id: svn://tug.org/texlive/trunk@51620 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/support')
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/TODO11
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk1155
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk1255
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk8 (renamed from Master/texmf-dist/source/support/tlcockpit/build.sbt)17
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/project/build.properties2
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/project/plugins.sbt1
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/ApplicationMain.scala8
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/LocationDialog.scala2
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/OptionsDialog.scala2
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PaperDialog.scala2
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PkgInfoDialog.scala2
11 files changed, 146 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/support/tlcockpit/TODO b/Master/texmf-dist/source/support/tlcockpit/TODO
index 8597b267987..74b5fe33364 100644
--- a/Master/texmf-dist/source/support/tlcockpit/TODO
+++ b/Master/texmf-dist/source/support/tlcockpit/TODO
@@ -1,4 +1,13 @@
TODO
====
-(see TODOs in the code)
+
+JDK11 support
+-------------
+
+* sbt build and assembly works
+ if we do NOT include javafx in the fat jar (see build.sbt) then
+ we the user needs javafx installed, we need to search for it,
+ and add it to the java call:
+ java -p /usr/share/openjfx/lib/ --add-modules javafx.controls,javafx.web -jar jar/tlcockpit-jdk11.jar
+
diff --git a/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk11 b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk11
new file mode 100644
index 00000000000..bf490132f5c
--- /dev/null
+++ b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk11
@@ -0,0 +1,55 @@
+name := "tlcockpit"
+
+version := "1.1"
+
+scalaVersion := "2.12.7"
+
+val javaVersion:Int = 11
+
+libraryDependencies += "io.spray" %% "spray-json" % "1.3.3"
+libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.7.2"
+libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"
+libraryDependencies += "org.json4s" %% "json4s-native" % "3.6.0-M3"
+libraryDependencies += "org.json4s" %% "json4s-jackson" % "3.6.0-M3"
+
+// Add dependency on ScalaFX library
+// libraryDependencies += "org.scalafx" %% "scalafx" % "11-R16"
+libraryDependencies += "org.scalafx" % "scalafx_2.12" % "12.0.1-R17"
+
+lazy val root = (project in file(".")).
+ enablePlugins(BuildInfoPlugin).
+ settings(
+ buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, BuildInfoKey(("javaVersion", javaVersion))),
+ buildInfoPackage := "TLCockpit"
+ )
+
+
+// Determine OS version of JavaFX binaries
+lazy val osName = System.getProperty("os.name") match {
+ case n if n.startsWith("Linux") => "linux"
+ case n if n.startsWith("Mac") => "mac"
+ case n if n.startsWith("Windows") => "win"
+ case _ => throw new Exception("Unknown platform!")
+}
+
+lazy val javaFXModules = Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
+libraryDependencies ++= javaFXModules.map( m =>
+ // with this the modules will NOT be included in the fat jar!
+ // "org.openjfx" % s"javafx-$m" % javaVersion % "provided" classifier osName
+ "org.openjfx" % s"javafx-$m" % javaVersion.toString classifier osName
+)
+
+assemblyMergeStrategy in assembly := {
+ case PathList("module-info.class", xs @ _*) => MergeStrategy.discard
+ case PathList("META-INF", "MANIFEST.MF", xs @ _*) => MergeStrategy.discard
+ case x => MergeStrategy.first
+}
+
+mainClass in assembly := Some("TLCockpit.ApplicationMain")
+
+assemblyJarName in assembly := "tlcockpit-jdk11.jar"
+assemblyOutputPath in assembly := file("jar/tlcockpit-jdk11.jar")
+
+
+// for scalafx
+fork := true
diff --git a/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk12 b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk12
new file mode 100644
index 00000000000..0e31eb34239
--- /dev/null
+++ b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk12
@@ -0,0 +1,55 @@
+name := "tlcockpit"
+
+version := "1.1"
+
+scalaVersion := "2.12.7"
+
+val javaVersion:Int = 12
+
+libraryDependencies += "io.spray" %% "spray-json" % "1.3.3"
+libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.7.2"
+libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"
+libraryDependencies += "org.json4s" %% "json4s-native" % "3.6.0-M3"
+libraryDependencies += "org.json4s" %% "json4s-jackson" % "3.6.0-M3"
+
+// Add dependency on ScalaFX library
+// libraryDependencies += "org.scalafx" %% "scalafx" % "11-R16"
+libraryDependencies += "org.scalafx" % "scalafx_2.12" % "12.0.1-R17"
+
+lazy val root = (project in file(".")).
+ enablePlugins(BuildInfoPlugin).
+ settings(
+ buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, BuildInfoKey(("javaVersion", javaVersion))),
+ buildInfoPackage := "TLCockpit"
+ )
+
+
+// Determine OS version of JavaFX binaries
+lazy val osName = System.getProperty("os.name") match {
+ case n if n.startsWith("Linux") => "linux"
+ case n if n.startsWith("Mac") => "mac"
+ case n if n.startsWith("Windows") => "win"
+ case _ => throw new Exception("Unknown platform!")
+}
+
+lazy val javaFXModules = Seq("base", "controls", "fxml", "graphics", "media", "swing", "web")
+libraryDependencies ++= javaFXModules.map( m =>
+ // with this the modules will NOT be included in the fat jar!
+ // "org.openjfx" % s"javafx-$m" % javaVersion % "provided" classifier osName
+ "org.openjfx" % s"javafx-$m" % javaVersion.toString classifier osName
+)
+
+assemblyMergeStrategy in assembly := {
+ case PathList("module-info.class", xs @ _*) => MergeStrategy.discard
+ case PathList("META-INF", "MANIFEST.MF", xs @ _*) => MergeStrategy.discard
+ case x => MergeStrategy.first
+}
+
+mainClass in assembly := Some("TLCockpit.ApplicationMain")
+
+assemblyJarName in assembly := "tlcockpit-jdk12.jar"
+assemblyOutputPath in assembly := file("jar/tlcockpit-jdk12.jar")
+
+
+// for scalafx
+fork := true
diff --git a/Master/texmf-dist/source/support/tlcockpit/build.sbt b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk8
index 737ee577c2b..ac19d090776 100644
--- a/Master/texmf-dist/source/support/tlcockpit/build.sbt
+++ b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk8
@@ -1,20 +1,29 @@
name := "tlcockpit"
-version := "1.0"
+version := "1.1"
scalaVersion := "2.12.7"
-libraryDependencies += "org.scalafx" % "scalafx_2.12" % "8.0.181-R13"
+val javaVersion:Int = 8
+
+libraryDependencies += "org.scalafx" %% "scalafx" % "8.0.181-R13"
libraryDependencies += "io.spray" %% "spray-json" % "1.3.3"
libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.7.2"
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"
libraryDependencies += "org.json4s" %% "json4s-native" % "3.6.0-M3"
libraryDependencies += "org.json4s" %% "json4s-jackson" % "3.6.0-M3"
+lazy val root = (project in file(".")).
+ enablePlugins(BuildInfoPlugin).
+ settings(
+ buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, BuildInfoKey(("javaVersion", javaVersion))),
+ buildInfoPackage := "TLCockpit"
+ )
+
mainClass in assembly := Some("TLCockpit.ApplicationMain")
-assemblyJarName in assembly := "tlcockpit.jar"
-assemblyOutputPath in assembly := file("jar/tlcockpit.jar")
+assemblyJarName in assembly := "tlcockpit-jdk8.jar"
+assemblyOutputPath in assembly := file("jar/tlcockpit-jdk8.jar")
// for scalafx
diff --git a/Master/texmf-dist/source/support/tlcockpit/project/build.properties b/Master/texmf-dist/source/support/tlcockpit/project/build.properties
index 826c0bd95ca..091249b92ed 100644
--- a/Master/texmf-dist/source/support/tlcockpit/project/build.properties
+++ b/Master/texmf-dist/source/support/tlcockpit/project/build.properties
@@ -1 +1 @@
-sbt.version = 0.13.16 \ No newline at end of file
+sbt.version = 1.2.6
diff --git a/Master/texmf-dist/source/support/tlcockpit/project/plugins.sbt b/Master/texmf-dist/source/support/tlcockpit/project/plugins.sbt
new file mode 100644
index 00000000000..15fe71aab1e
--- /dev/null
+++ b/Master/texmf-dist/source/support/tlcockpit/project/plugins.sbt
@@ -0,0 +1 @@
+addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
diff --git a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/ApplicationMain.scala b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/ApplicationMain.scala
index 8ba576002bd..4574ac4966e 100644
--- a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/ApplicationMain.scala
+++ b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/ApplicationMain.scala
@@ -105,13 +105,19 @@ object ApplicationMain extends JFXApp with LazyLogging {
logger.error(s"Java version ${javaVersion} too old, need >= 1.8, terminating!")
Platform.exit()
sys.exit(1)
+ } else if (minor.get == 8) {
+ if (BuildInfo.javaVersion != 8) {
+ logger.warn(s"Build and run versions disagree: build: ${BuildInfo.javaVersion}, run: ${major.get}.${minor.get}, trying anyway!")
+ }
}
case None =>
logger.warn(s"Cannot find Java version from ${javaVersion}, continuing anyway!")
}
} else {
if (major.get > 9) {
- logger.warn(s"Currently Java versions > 8 (1.8) are not supported (${javaVersion}), trying anyway!")
+ if (major.get != BuildInfo.javaVersion) {
+ logger.warn(s"Build and run versions disagree: build: ${BuildInfo.javaVersion}, run: ${major.get}, trying anyway!")
+ }
} else {
logger.warn(s"Strange version number, please report: ${javaVersion}, continuing anyway!")
}
diff --git a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/LocationDialog.scala b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/LocationDialog.scala
index b762a811a05..647e0cc0389 100644
--- a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/LocationDialog.scala
+++ b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/LocationDialog.scala
@@ -106,7 +106,7 @@ class LocationDialog(locs: Map[String,String]) extends LazyLogging {
// val changedValues = scala.collection.mutable.Map[String,String]()
- grid.columnConstraints = Seq(new ColumnConstraints(100, 100, 200), new ColumnConstraints(250, 250, 5000, Priority.Always, new HPos(HPos.Left), true))
+ grid.columnConstraints = Seq(new ColumnConstraints(100, 100, 200), new ColumnConstraints(250, 250, 5000, Priority.Always, HPos.LEFT, true))
dialog.dialogPane().content = grid
dialog.width = 500
dialog.height = 1500
diff --git a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/OptionsDialog.scala b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/OptionsDialog.scala
index 497a5cb20de..52a9d5d0ce1 100644
--- a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/OptionsDialog.scala
+++ b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/OptionsDialog.scala
@@ -106,7 +106,7 @@ class OptionsDialog(opts: List[TLOption]) extends LazyLogging {
(tlopt.name, nd)
}).toMap
- grid.columnConstraints = Seq(new ColumnConstraints(300, 300, 500), new ColumnConstraints(200, 200, 5000, Priority.Always, new HPos(HPos.Left), true))
+ grid.columnConstraints = Seq(new ColumnConstraints(300, 300, 500), new ColumnConstraints(200, 200, 5000, Priority.Always, HPos.LEFT, true))
dialog.dialogPane().content = grid
dialog.width = 500
dialog.height = 1500
diff --git a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PaperDialog.scala b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PaperDialog.scala
index 0b4f7edf63f..3d7a2e84031 100644
--- a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PaperDialog.scala
+++ b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PaperDialog.scala
@@ -61,7 +61,7 @@ class PaperDialog(paperconf: Map[String, TLPaperConf]) extends LazyLogging {
(prog, cb)
}
- grid.columnConstraints = Seq(new ColumnConstraints(100, 100, 150), new ColumnConstraints(150, 150, 5000, Priority.Always, new HPos(HPos.Left), true))
+ grid.columnConstraints = Seq(new ColumnConstraints(100, 100, 150), new ColumnConstraints(150, 150, 5000, Priority.Always, HPos.LEFT, true))
dialog.dialogPane().content = grid
dialog.width = 300
dialog.height = 1500
diff --git a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PkgInfoDialog.scala b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PkgInfoDialog.scala
index cc417b68f97..89ba164de20 100644
--- a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PkgInfoDialog.scala
+++ b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PkgInfoDialog.scala
@@ -113,7 +113,7 @@ class PkgInfoDialog(tlp: TLPackage) extends Dialog {
grid.add(doListView(binFiles.flatMap(_._2).toSeq.map(s => s.replaceFirst("RELOC", "texmf-dist")), false), 1, crow)
crow += 1
}
- grid.columnConstraints = Seq(new ColumnConstraints(100, 200, 200), new ColumnConstraints(100, 400, 5000, Priority.Always, new HPos(HPos.Left), true))
+ grid.columnConstraints = Seq(new ColumnConstraints(100, 200, 200), new ColumnConstraints(100, 400, 5000, Priority.Always, HPos.LEFT, true))
dialog.dialogPane().content = grid
dialog.width = 600
dialog.height = 1500