From b823597d0e542709125290092ccec34b70cf4a0c Mon Sep 17 00:00:00 2001 From: Voomra Date: Thu, 27 Feb 2025 19:40:18 +0300 Subject: [PATCH] =?UTF-8?q?build:=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=B4=20windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 08eeca6..a130823 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ plugins { id("application") id("org.openjfx.javafxplugin") version("0.1.0") id("com.github.johnrengelman.shadow") version("8.1.1") + id("edu.sc.seis.launch4j") version("3.0.6") } wrapper { @@ -22,23 +23,44 @@ repositories { mavenCentral() } +ext { + lombokVersion = "1.18.34" + javaFxVersion = "21" +} + dependencies { compileOnly("org.jetbrains:annotations:23.0.0") - annotationProcessor("org.projectlombok:lombok:1.18.34") - compileOnly("org.projectlombok:lombok:1.18.34") + annotationProcessor("org.projectlombok:lombok:$lombokVersion") + compileOnly("org.projectlombok:lombok:$lombokVersion") + + ["linux", "win"].forEach { + implementation("org.openjfx:javafx-base:$javaFxVersion:$it") + implementation("org.openjfx:javafx-controls:$javaFxVersion:$it") + implementation("org.openjfx:javafx-fxml:$javaFxVersion:$it") + implementation("org.openjfx:javafx-graphics:$javaFxVersion:$it") + } implementation("org.xerial:sqlite-jdbc:3.49.1.0") implementation("com.github.luben:zstd-jni:1.5.7-1") } -javafx { - version = "21" - modules = [ "javafx.controls", "javafx.fxml" ] +application { + mainClass = "ru.di9.ss14.extractor.Launcher" } shadowJar { - mainClassName = "ru.di9.ss14.extractor.Launcher" + mainClassName = application.mainClass archiveBaseName.set(project.name) archiveVersion.set(project.version.toString()) archiveClassifier.set("") } + +launch4j { + headerType = "gui" + outfile = "${project.name}-${project.version.toString()}.exe" + mainClassName = application.mainClass + copyConfigurable = [] + jarTask = project.tasks.shadowJar + bundledJrePath = "jre" + downloadUrl = "https://adoptium.net/temurin/releases/?os=windows&arch=x64&package=jre" +}