summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk1255
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk14 (renamed from Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk11)12
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk86
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/project/build.properties2
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/ApplicationMain.scala126
-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.scala3
-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
9 files changed, 107 insertions, 103 deletions
diff --git a/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk12 b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk12
deleted file mode 100644
index 0e31eb34239..00000000000
--- a/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk12
+++ /dev/null
@@ -1,55 +0,0 @@
-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-jdk11 b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk14
index bf490132f5c..4beec43b953 100644
--- a/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk11
+++ b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk14
@@ -1,10 +1,10 @@
name := "tlcockpit"
-version := "1.1"
+version := "1.2"
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.11"
-val javaVersion:Int = 11
+val javaVersion:Int = 14
libraryDependencies += "io.spray" %% "spray-json" % "1.3.3"
libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.7.2"
@@ -14,7 +14,7 @@ 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"
+libraryDependencies += "org.scalafx" % "scalafx_2.12" % "12.0.2-R18"
lazy val root = (project in file(".")).
enablePlugins(BuildInfoPlugin).
@@ -47,8 +47,8 @@ assemblyMergeStrategy in assembly := {
mainClass in assembly := Some("TLCockpit.ApplicationMain")
-assemblyJarName in assembly := "tlcockpit-jdk11.jar"
-assemblyOutputPath in assembly := file("jar/tlcockpit-jdk11.jar")
+assemblyJarName in assembly := "tlcockpit.jar"
+assemblyOutputPath in assembly := file("jar/tlcockpit.jar")
// for scalafx
diff --git a/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk8 b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk8
index ac19d090776..026ba15e18a 100644
--- a/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk8
+++ b/Master/texmf-dist/source/support/tlcockpit/build.sbt-jdk8
@@ -1,12 +1,12 @@
name := "tlcockpit"
-version := "1.1"
+version := "1.2"
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.11"
val javaVersion:Int = 8
-libraryDependencies += "org.scalafx" %% "scalafx" % "8.0.181-R13"
+libraryDependencies += "org.scalafx" %% "scalafx" % "8.0.192-R14"
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"
diff --git a/Master/texmf-dist/source/support/tlcockpit/project/build.properties b/Master/texmf-dist/source/support/tlcockpit/project/build.properties
index 091249b92ed..77ee500d9ba 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 = 1.2.6
+sbt.version = 1.3.9
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 4574ac4966e..1864c8ab217 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
@@ -47,6 +47,10 @@ import scalafx.event.ActionEvent
import scalafx.collections.ObservableBuffer
import scalafx.collections.ObservableMap
+// configuration file handling support
+import java.util.Properties
+import java.io.{ File, FileOutputStream, FileInputStream }
+
// JSON support - important load TLPackageJsonProtocol later!
import spray.json._
import TeXLive.JsonProtocol._
@@ -88,47 +92,50 @@ object ApplicationMain extends JFXApp with LazyLogging {
logger.trace("starting program tlcockpit")
- val javaVersion = System.getProperty("java.version")
+ val javaVersion = System.getProperty("java.specification.version")
val javaVersionSplit: Array[String] = javaVersion.split('.')
logger.debug(s"Got javaVersion ${javaVersion}")
- if (javaVersionSplit.length == 1) {
- logger.warn(s"Cannot find Java version from ${javaVersion}, continuing anyway!")
- } else {
- val major = toInt(javaVersionSplit(0))
- val minor = toInt(javaVersionSplit(1))
- major match {
- case Some(i) =>
- if (major.get == 1) {
- minor match {
- case Some(j) =>
- if (minor.get < 8) {
- 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!")
- }
+ val major = toInt(javaVersionSplit(0))
+ major match {
+ case Some(i) =>
+ if (major.get == 1) {
+ val minor = toInt(javaVersionSplit(1))
+ minor match {
+ case Some(j) =>
+ if (minor.get < 8) {
+ 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) {
- 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!")
+ case None =>
+ logger.warn(s"Cannot find Java version from ${javaVersion}, continuing anyway!")
+ }
+ } else {
+ if (major.get > 9) {
+ 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!")
}
- case None =>
- logger.warn(s"Cannot find Java version from ${javaVersion}, continuing anyway!")
- }
- // in all other cases just hope it is fine
- logger.info(s"Running on Java Version ${javaVersion}")
+ }
+ case None =>
+ logger.warn(s"Cannot find Java version from ${javaVersion}, continuing anyway!")
}
+ logger.info(s"Running on Java Version ${javaVersion}")
+
+ val userHomeDirectory = System.getProperty("user.home")
+ val confPath = userHomeDirectory + "/.tlcockpit.conf"
+ val props = new Properties()
+ val propsFile = new File(confPath)
+ if (propsFile.exists()) {
+ props.load(new FileInputStream(propsFile))
+ }
var tlmgrBusy = BooleanProperty(false)
@@ -362,7 +369,7 @@ object ApplicationMain extends JFXApp with LazyLogging {
title = "About TLCockpit"
graphic = new ImageView(logoImage)
headerText = "TLCockpit version " + version + "\n\nManage your TeX Live with speed!"
- contentText = "Copyright 2017-2018 Norbert Preining\nLicense: GPL3+\nSources: https://github.com/TeX-Live/tlcockpit"
+ contentText = "Copyright 2017-2020 Norbert Preining\nLicense: GPL3+\nSources: https://github.com/TeX-Live/tlcockpit"
}.showAndWait()
}
@@ -1068,10 +1075,39 @@ tlmgr>
})
}
+ def save_properties(): Unit = {
+ props.store(new FileOutputStream(confPath), null)
+ }
+ val StartTabPkgs = new RadioMenuItem("Packages") {
+ onAction = (ae) => {
+ props.setProperty("StartupTab", "packages")
+ save_properties()
+ }
+ }
+ val StartTabUpds = new RadioMenuItem("Updates") {
+ onAction = (ae) => {
+ props.setProperty("StartupTab","updates")
+ save_properties()
+ }
+ }
+ val StartTabBcks = new RadioMenuItem("Backups") {
+ onAction = (ae) => {
+ props.setProperty("StartupTab","backups")
+ save_properties()
+ }
+ }
+
+ val startupTabMenu: Menu = new Menu("Startup Tab") {
+ val foo = new ToggleGroup
+ foo.toggles = Seq(StartTabPkgs, StartTabUpds, StartTabBcks)
+ items = List(StartTabPkgs, StartTabUpds, StartTabBcks)
+ }
+
val optionsMenu: Menu = new Menu("Options") {
items = List(
new MenuItem("General ...") { onAction = (ae) => callback_general_options() },
new MenuItem("Paper ...") { onAction = (ae) => callback_paper() },
+ startupTabMenu
/* new MenuItem("Platforms ...") { disable = true; onAction = (ae) => not_implemented_info() },
new SeparatorMenuItem,
new CheckMenuItem("Expert options") { disable = true },
@@ -1415,6 +1451,27 @@ tlmgr>
stage.width = 800
+ val selectedTab = props.getOrDefault("StartupTab", "packages")
+ StartTabPkgs.selected = true
+ StartTabUpds.selected = false
+ StartTabBcks.selected = false
+ var StartupTab = 0
+ selectedTab match {
+ case "packages" => {}
+ case "updates" => {
+ StartTabPkgs.selected = false
+ StartTabUpds.selected = true
+ StartupTab = 1
+ }
+ case "backups" => {
+ StartTabPkgs.selected = false
+ StartTabBcks.selected = true
+ StartupTab = 2
+ }
+ case _ => {
+ logger.warn(s"Unrecognized setting for StartupTab in config file: $selectedTab")
+ }
+ }
var currentPromise = Promise[(String,Array[String])]()
val pendingJobs = scala.collection.mutable.Queue[(String,(String, Array[String]) => Unit)]()
@@ -1567,6 +1624,7 @@ tlmgr>
logger.debug("Before loading tlpdb")
load_tlpdb_update_pkgs_view_no_json()
logger.debug("after loading tlpdb")
+ pkgstabs.selectionModel().select(StartupTab)
})
}
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 647e0cc0389..2a45fb3db51 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
@@ -109,7 +109,7 @@ class LocationDialog(locs: Map[String,String]) extends LazyLogging {
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
+ // dialog.height = 1500
dialog.resultConverter = dialogButton =>
if (dialogButton == ButtonType.OK) {
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 52a9d5d0ce1..3e23270d95b 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
@@ -109,7 +109,8 @@ class OptionsDialog(opts: List[TLOption]) extends LazyLogging {
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
+ // This seems to be necessary for some old versions of ScalaFX or JavaFX or Java??
+ // dialog.height = 1500
dialog.resultConverter = dialogButton =>
if (dialogButton == ButtonType.OK) {
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 3d7a2e84031..cb3e28907ca 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
@@ -64,7 +64,7 @@ class PaperDialog(paperconf: Map[String, TLPaperConf]) extends LazyLogging {
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
+ // dialog.height = 1500
dialog.resultConverter = dialogButton =>
if (dialogButton == ButtonType.OK)
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 89ba164de20..fbea1ecd62d 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
@@ -116,7 +116,7 @@ class PkgInfoDialog(tlp: TLPackage) extends Dialog {
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
+ // dialog.height = 1500
// dialog
def showAndWait(): Unit = this.dialog.showAndWait()