diff options
author | Karl Berry <karl@freefriends.org> | 2019-07-11 21:18:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-07-11 21:18:13 +0000 |
commit | d9fdc45f38b6a264acb0f5ecbfc1a68e900cb0dd (patch) | |
tree | bc45fe62a79d344332af3c779fdf9555b9c633d2 /Master | |
parent | 98f89874f52c2e28da43ff4b4583d1900dcbed31 (diff) |
tlcockpit (11jul19)
git-svn-id: svn://tug.org/texlive/trunk@51620 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
19 files changed, 251 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/man/man1/tlcockpit.1 b/Master/texmf-dist/doc/man/man1/tlcockpit.1 new file mode 100644 index 00000000000..b2b9febe65c --- /dev/null +++ b/Master/texmf-dist/doc/man/man1/tlcockpit.1 @@ -0,0 +1,32 @@ +.\" Hey, EMACS: -*- nroff -*- +.TH TLCOCKPIT 1x "1 Nov 2018" +.SH NAME +tlcockpit \- GUI frontend for the TeX Live Manager tlmgr +.SH SYNOPSIS +.B tlcockpit +.RI " [-d] [-dd] [-q] [-qq]" +.SH DESCRIPTION +TLCockpit aims at being a GUI for tlmgr, the +TeX Live Manager, with a modern look and feel. We take inspiration +from the TeX Live Utility. + +.SH OPTIONS +.TP +.B \-d +be verbose +.TP +.B \-dd +be even more verbose +.TP +.B \-q +be quiet +.TP +.B \-qq +be even more quiet + +.SH AUTHOR +TLCockpit was written by Norbert Preining. + +.SH LICENSE +TLCockpit is licensed under the GNU General Public License version 3+. + diff --git a/Master/texmf-dist/doc/man/man1/tlcockpit.man1.pdf b/Master/texmf-dist/doc/man/man1/tlcockpit.man1.pdf Binary files differnew file mode 100644 index 00000000000..94efaad3be3 --- /dev/null +++ b/Master/texmf-dist/doc/man/man1/tlcockpit.man1.pdf diff --git a/Master/texmf-dist/doc/support/tlcockpit/ChangeLog b/Master/texmf-dist/doc/support/tlcockpit/ChangeLog index 789fc2b265a..662d0a6d4c0 100644 --- a/Master/texmf-dist/doc/support/tlcockpit/ChangeLog +++ b/Master/texmf-dist/doc/support/tlcockpit/ChangeLog @@ -1,6 +1,54 @@ +2019-07-11 Norbert Preining <norbert@preining.info> + + * Release 1.1 (HEAD -> master) [c62030d] + +2019-07-11 Norbert Preining <norbert@preining.info> + + * ship both jdk8 and jdk11 jars, wrapper checks version (origin/master, origin/HEAD) [cf285a0] + +2019-07-11 Norbert Preining <norbert@preining.info> + + * add build.sbt to ignored file [bcf2603] + +2019-07-11 Norbert Preining <norbert@preining.info> + + * update NEWS [1b8cda4] + +2019-07-11 Norbert Preining <norbert@preining.info> + + * bump version to 1.1 [3408f09] + +2019-07-11 Norbert Preining <norbert@preining.info> + + * add jdk12 build file, update jdk11 [48193b7] + +2018-11-01 Norbert Preining <norbert@preining.info> + + * add man page [6cf8607] + +2018-10-19 Norbert Preining <norbert@preining.info> + + * add jdk11 todo items [1cbac0f] + +2018-10-19 Norbert Preining <norbert@preining.info> + + * pass javaVersion from sbt to ApplicationMain and check for it [6598f3b] + +2018-10-19 Norbert Preining <norbert@preining.info> + + * build.sbt for jdk8 and jdk11 [7581ca9] + +2018-10-19 Norbert Preining <norbert@preining.info> + + * use sbt 1.2.6 [69433fd] + +2018-10-19 Norbert Preining <norbert@preining.info> + + * fixes for HPos usage [6eb0073] + 2018-10-06 Norbert Preining <norbert@preining.info> - * Release 1.0 (HEAD -> master) [e71fb0e] + * Release 1.0 (tag: v1.0) [e71fb0e] 2018-10-06 Norbert Preining <norbert@preining.info> @@ -8,7 +56,7 @@ 2018-10-06 Norbert Preining <norbert@preining.info> - * update jar (origin/master, origin/HEAD) [3633ea4] + * update jar [3633ea4] 2018-10-06 Norbert Preining <norbert@preining.info> @@ -120,7 +168,7 @@ 2018-04-08 Norbert Preining <norbert@preining.info> - * update jar and runner to add exec [d8bfe81] + * update jar and runner to add exec (tag: v0.9) [d8bfe81] 2018-04-08 Norbert Preining <norbert@preining.info> diff --git a/Master/texmf-dist/doc/support/tlcockpit/NEWS b/Master/texmf-dist/doc/support/tlcockpit/NEWS index 8534c067fdd..e84482445fe 100644 --- a/Master/texmf-dist/doc/support/tlcockpit/NEWS +++ b/Master/texmf-dist/doc/support/tlcockpit/NEWS @@ -1,5 +1,12 @@ NEWS for tlcockpit +version 1.1 (20190711) +---------------------- +- build jdk8 and jdk11 versions - jdk11 includes javafx + default is jdk11 version, but Unix starter script tries + to deduce the correct version. + On Windows JDK11 or above is expected + version 1.0 (20181006) ---------------------- - check for used Java version and abort if less than < 1.8 (Java 8) diff --git a/Master/texmf-dist/scripts/tlcockpit/tlcockpit-jdk8.jar b/Master/texmf-dist/scripts/tlcockpit/tlcockpit-jdk8.jar Binary files differnew file mode 100755 index 00000000000..90b12ad2f47 --- /dev/null +++ b/Master/texmf-dist/scripts/tlcockpit/tlcockpit-jdk8.jar diff --git a/Master/texmf-dist/scripts/tlcockpit/tlcockpit.jar b/Master/texmf-dist/scripts/tlcockpit/tlcockpit.jar Binary files differindex 4ccd7cb962e..6a3f93fbebd 100644 --- a/Master/texmf-dist/scripts/tlcockpit/tlcockpit.jar +++ b/Master/texmf-dist/scripts/tlcockpit/tlcockpit.jar diff --git a/Master/texmf-dist/scripts/tlcockpit/tlcockpit.sh b/Master/texmf-dist/scripts/tlcockpit/tlcockpit.sh index 56333fb47b4..1b2e8d9cb04 100755 --- a/Master/texmf-dist/scripts/tlcockpit/tlcockpit.sh +++ b/Master/texmf-dist/scripts/tlcockpit/tlcockpit.sh @@ -1,8 +1,12 @@ -#!/bin/sh -# Public domain. Originally written by Norbert Preining and Karl Berry, 2018. +#!/bin/bash +# Public domain. Originally written by Norbert Preining and Karl Berry, 2018-2019. scriptname=`basename "$0"` -jar="$scriptname.jar" +javaVersion=$(java -version 2>&1 | head -1) +case "$javaVersion" in + *"1.8"*) jar="$scriptname-jdk8".jar ;; + *) jar="$scriptname.jar" ;; +esac jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"` kernel=`uname -s 2>/dev/null` 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 diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 7d234903c79..a8fa9231386 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -1515,6 +1515,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'thumbpdf' => '&POST_preserve_man', 'tikz-cd' => '&POSTtikz_cd', 'tipa-de' => '&POST_rmsymlink', + 'tlcockpit' => '&POST_do_man', 'tudscr' => '&POSTtudscr', 'uplatex' => '&POST_preserve_man', 'velthuis' => '&POSTvelthuis', @@ -3180,6 +3181,7 @@ $standardttf = '\.ttf|\.TTC'; 'texdoc' => '\.1$', 'texfot' => '\.1$', 'texdirflatten' => 'texdirflatten.1', + 'tlcockpit' => '\.man$', 'webquiz' => '\.1$', 'wheretotrim' => '\.1$', ); @@ -3956,10 +3958,15 @@ sub doscripts { next; # no wrapper } + # next bit of ugliness: can be better to use the GUI wrapper + # wrunscript.exe (which only exists in Master/bin/win32) instead + # of the usual runscript.exe + my $w32_wrapper = "$Master/bin/win32/" + . ($s eq "tlcockpit.sh" ? "wrunscript.exe" : "runscript.exe"); + # # xx here too, should merge with bin_links in # Build/source/texk/texlive/linked_scripts/Makefile.am, # or at least with above duplicated code. - my $w32_wrapper = "$Build/$build_tldir/w32_wrapper/runscript.exe"; &SYSTEM ("$CP $w32_wrapper $platdir/$linkname.exe"); &SYSTEM ("$CP $w32_wrapper $platdir/r$linkname.exe") if $linkname =~ /^(pdfcrop|epstopdf)/; # r{pdfcrop,epstopdf}.exe |