From 19a222f2118e9373f71440e2be69dbde2c85261e Mon Sep 17 00:00:00 2001 From: Josh Larson Date: Wed, 9 Oct 2019 01:41:15 -0400 Subject: [PATCH] Got jlink to create something runnable --- build.gradle | 14 ++++++++++---- client-holocore | 2 +- forwarder | 2 +- .../launcher/core/resources/gui/ServerListView.kt | 2 +- .../core/resources/gui/servers/ServerPlayCell.kt | 9 +++++---- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index ac59cbe..c60ec84 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ plugins { id 'org.jetbrains.kotlin.jvm' version '1.3.50' id "com.github.johnrengelman.shadow" version "5.1.0" id "org.openjfx.javafxplugin" version "0.0.7" - id "org.beryx.jlink" version "2.15.1" + id "org.beryx.jlink" version "2.16.0" id "org.javamodularity.moduleplugin" version "1.5.0" } @@ -18,9 +18,12 @@ plugins { group = 'com.projectswg.launcher' version = '1.3.2' -mainClassName = "com.projectswg.launcher.core.LauncherKt" sourceCompatibility = 12 +application { + mainClassName = "com.projectswg.launcher/com.projectswg.launcher.core.LauncherKt" +} + sourceSets { main {} utility {} @@ -41,7 +44,7 @@ jlink { javafx { version = "12.0.1" - modules = ['javafx.controls', 'javafx.fxml', 'javafx.media', 'javafx.swing', 'javafx.web'] + modules = ['javafx.controls', 'javafx.fxml', 'javafx.web', 'javafx.media'] } shadowJar { @@ -63,8 +66,11 @@ dependencies { compile 'net.openhft:zero-allocation-hashing:0.8' compile group: 'me.joshlarson', name: 'fast-json', version: '2.2.3' compile group: 'me.joshlarson', name: 'jlcommon-fx', version: '1.0.3' - compile group: 'no.tornado', name: 'tornadofx', version: '2.0.0-SNAPSHOT' + compile(group: 'no.tornado', name: 'tornadofx', version: '2.0.0-SNAPSHOT') { + exclude group: "org.jetbrains.kotlin" + } compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: '1.3.50' + compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: '1.3.50' compile 'de.jensd:fontawesomefx-fontawesome:4.7.0-9.1.2' utilityCompile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.60' diff --git a/client-holocore b/client-holocore index 1fb38ec..42894ee 160000 --- a/client-holocore +++ b/client-holocore @@ -1 +1 @@ -Subproject commit 1fb38ecf37d9b79b782dda87dec65e277c532a61 +Subproject commit 42894ee7e1bab447eb9d669b6314e3feffcaf02d diff --git a/forwarder b/forwarder index f84b584..2e48e15 160000 --- a/forwarder +++ b/forwarder @@ -1 +1 @@ -Subproject commit f84b584572a802206b217f19ee42a5710581297e +Subproject commit 2e48e155776ff0d9b8ef3ea21fbebf81c6dbe9e5 diff --git a/src/main/java/com/projectswg/launcher/core/resources/gui/ServerListView.kt b/src/main/java/com/projectswg/launcher/core/resources/gui/ServerListView.kt index 9c56e72..590b9e0 100644 --- a/src/main/java/com/projectswg/launcher/core/resources/gui/ServerListView.kt +++ b/src/main/java/com/projectswg/launcher/core/resources/gui/ServerListView.kt @@ -42,7 +42,7 @@ class ServerListView : View() { placeholder = label(messages["noServers"]) setSortPolicy { _ -> Comparator.comparing { it.name }; true } - column(messages["servers.column.name"], LoginServer::nameProperty) { + column(messages["servers.column.name"], valueProvider={cellDataFeatures:TableColumn.CellDataFeatures -> ReadOnlyStringWrapper(cellDataFeatures.value?.name) }).apply { prefWidth = COL_WIDTH_LARGE styleClass += "center-table-cell" } diff --git a/src/main/java/com/projectswg/launcher/core/resources/gui/servers/ServerPlayCell.kt b/src/main/java/com/projectswg/launcher/core/resources/gui/servers/ServerPlayCell.kt index d77b026..07ad9a7 100644 --- a/src/main/java/com/projectswg/launcher/core/resources/gui/servers/ServerPlayCell.kt +++ b/src/main/java/com/projectswg/launcher/core/resources/gui/servers/ServerPlayCell.kt @@ -79,10 +79,11 @@ class ServerPlayCell : TableCellFragment() { gameInstance.start() GameLaunchedIntent(gameInstance).broadcast() gameInstance - } ui { - if (LauncherData.INSTANCE.general.isAdmin) { - find(AdminDisplay::forwarder to it.forwarder).openWindow() - } +// } ui { +// if (LauncherData.INSTANCE.general.isAdmin) { +// find(AdminDisplay::forwarder to it.forwarder).openWindow() + // TODO: Fix admin display +// } } } REQUIRES_DOWNLOAD -> DownloadPatchIntent(updateServerProperty.value ?: return).broadcast()