diff --git a/build.gradle.kts b/build.gradle.kts index c33898f..1ece506 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import java.io.FileInputStream +import java.util.Properties plugins { kotlin("jvm") version "1.5.31" @@ -63,12 +65,16 @@ application { mainClass.set("incamoon.eso.adeps2.Main") } +val versionPropertyFile = FileInputStream("src/main/resources/version.properties") +val buildProperties = Properties() +buildProperties.load(versionPropertyFile) + jlink { options.addAll("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages") addExtraDependencies("javafx") launcher { name = "eso-addon-deps-2" - version = "${project.version}" + version = buildProperties.getProperty("version") } jpackage { imageOptions.addAll(arrayOf("--resource-dir", "${projectDir}\\jpackage", "--verbose")) diff --git a/jpackage/esoAddonDeps.ico b/jpackage/eso-addon-deps-2.ico similarity index 100% rename from jpackage/esoAddonDeps.ico rename to jpackage/eso-addon-deps-2.ico diff --git a/src/main/kotlin/incamoon/eso/adeps2/Main.kt b/src/main/kotlin/incamoon/eso/adeps2/Main.kt index 1f72295..74d079e 100644 --- a/src/main/kotlin/incamoon/eso/adeps2/Main.kt +++ b/src/main/kotlin/incamoon/eso/adeps2/Main.kt @@ -4,6 +4,7 @@ import javafx.application.Application import javafx.fxml.FXMLLoader import javafx.scene.Parent import javafx.scene.Scene +import javafx.scene.image.Image import javafx.scene.text.Font import javafx.stage.Stage import javafx.stage.StageStyle @@ -33,14 +34,13 @@ class Main : Application() { val root = loader.load() -// val controller: Controller = loader.getController() - val scene = Scene(root) -// val props = Properties() - stage.title = "The Elder Scrolls Online Addon Dependency Analyser by fr33r4ng3r)" + val props = Properties() + props.load(javaClass.getResourceAsStream("/version.properties")) + stage.title = "The Elder Scrolls Online Addon Dependency Analyser by fr33r4ng3r version ${props.getProperty("version")})" stage.scene = scene -// stage.icons.add(Image(Mayhem::class.java.getResourceAsStream("/fr33r4ng3r.png"))) + stage.icons.add(Image(Main::class.java.getResourceAsStream("/fr33r4ng3r.png"))) ResizeHelper.addResizeListener(stage) diff --git a/src/main/resources/fr33r4ng3r.png b/src/main/resources/fr33r4ng3r.png new file mode 100644 index 0000000..275a6eb Binary files /dev/null and b/src/main/resources/fr33r4ng3r.png differ diff --git a/src/main/resources/version.properties b/src/main/resources/version.properties new file mode 100644 index 0000000..0ca44e8 --- /dev/null +++ b/src/main/resources/version.properties @@ -0,0 +1 @@ +version=1.0.2 \ No newline at end of file