diff --git a/app/build.gradle b/app/build.gradle index 9d46a4d..dec3174 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,6 +6,15 @@ * User Manual available at https://docs.gradle.org/8.0.2/userguide/building_java_projects.html */ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'io.github.fvarrui:javapackager:1.7.2' + } +} + plugins { // Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin. id 'org.jetbrains.kotlin.jvm' version '1.8.0' @@ -17,6 +26,8 @@ plugins { id 'distribution' } +apply plugin: 'io.github.fvarrui.javapackager.plugin' + repositories { // Use Maven Central for resolving dependencies. mavenCentral() @@ -43,28 +54,53 @@ dependencies { application { // Define the main class for the application. mainClass = 'xyz.brysonsteck.servercraft.MainKt' + applicationName = "ServerCraft" } distTar { compression = Compression.GZIP - archiveFileName = 'ServerCraft.tar.gz' -} - -distZip { - archiveFileName = 'ServerCraft.zip' } jar { archiveFileName = 'ServerCraft.jar' + manifest { attributes 'Main-Class': application.mainClass } + duplicatesStrategy = DuplicatesStrategy.INCLUDE from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } } +task pack(type: io.github.fvarrui.javapackager.gradle.PackageTask, dependsOn: build) { + mainClass = 'xyz.brysonsteck.servercraft.MainKt' + bundleJre = true + generateInstaller = true + administratorRequired = false + + linuxConfig { + pngFile = 'file:app/src/main/resources/icon.png' + } + + macConfig { + icnsFile = app/src/main/resources/icon.icns + volumeIcon = 'app/src/main/resources/icon.icns' + backgroundImage = 'app/src/main/resources/dmg.png' + developerId = 'Bryson Steck' + appId = 'xyz.brysonsteck.ServerCraft' + } + + winConfig { + icoFile = app/src/main/resources/icon.ico + setupMode = 'askTheUser' + disableDirPage = false + disableFinishedPage = false + disableWelcomePage = false + } +} + tasks.named('test') { // Use JUnit Platform for unit tests. useJUnitPlatform() diff --git a/app/src/main/kotlin/xyz/brysonsteck/servercraft/App.kt b/app/src/main/kotlin/xyz/brysonsteck/ServerCraft/App.kt similarity index 100% rename from app/src/main/kotlin/xyz/brysonsteck/servercraft/App.kt rename to app/src/main/kotlin/xyz/brysonsteck/ServerCraft/App.kt diff --git a/app/src/main/kotlin/xyz/brysonsteck/servercraft/Main.kt b/app/src/main/kotlin/xyz/brysonsteck/ServerCraft/Main.kt similarity index 100% rename from app/src/main/kotlin/xyz/brysonsteck/servercraft/Main.kt rename to app/src/main/kotlin/xyz/brysonsteck/ServerCraft/Main.kt diff --git a/app/src/main/kotlin/xyz/brysonsteck/servercraft/controllers/InfoController.kt b/app/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/InfoController.kt similarity index 100% rename from app/src/main/kotlin/xyz/brysonsteck/servercraft/controllers/InfoController.kt rename to app/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/InfoController.kt diff --git a/app/src/main/kotlin/xyz/brysonsteck/servercraft/controllers/PrimaryController.kt b/app/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt similarity index 100% rename from app/src/main/kotlin/xyz/brysonsteck/servercraft/controllers/PrimaryController.kt rename to app/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt diff --git a/app/src/main/kotlin/xyz/brysonsteck/servercraft/server/Download.kt b/app/src/main/kotlin/xyz/brysonsteck/ServerCraft/server/Download.kt similarity index 100% rename from app/src/main/kotlin/xyz/brysonsteck/servercraft/server/Download.kt rename to app/src/main/kotlin/xyz/brysonsteck/ServerCraft/server/Download.kt diff --git a/app/src/main/kotlin/xyz/brysonsteck/servercraft/server/Server.kt b/app/src/main/kotlin/xyz/brysonsteck/ServerCraft/server/Server.kt similarity index 100% rename from app/src/main/kotlin/xyz/brysonsteck/servercraft/server/Server.kt rename to app/src/main/kotlin/xyz/brysonsteck/ServerCraft/server/Server.kt diff --git a/app/src/main/resources/dmg.png b/app/src/main/resources/dmg.png new file mode 100644 index 0000000..5c33572 Binary files /dev/null and b/app/src/main/resources/dmg.png differ diff --git a/app/src/main/resources/icon.icns b/app/src/main/resources/icon.icns new file mode 100644 index 0000000..fe1d98a Binary files /dev/null and b/app/src/main/resources/icon.icns differ diff --git a/app/src/main/resources/icon.ico b/app/src/main/resources/icon.ico new file mode 100644 index 0000000..4968f64 Binary files /dev/null and b/app/src/main/resources/icon.ico differ diff --git a/app/src/main/resources/icon.png b/app/src/main/resources/icon.png new file mode 100644 index 0000000..a24c362 Binary files /dev/null and b/app/src/main/resources/icon.png differ diff --git a/app/src/main/resources/xyz/brysonsteck/servercraft/app.png b/app/src/main/resources/xyz/brysonsteck/ServerCraft/app.png similarity index 100% rename from app/src/main/resources/xyz/brysonsteck/servercraft/app.png rename to app/src/main/resources/xyz/brysonsteck/ServerCraft/app.png diff --git a/app/src/main/resources/xyz/brysonsteck/servercraft/css/info-tabs.css b/app/src/main/resources/xyz/brysonsteck/ServerCraft/css/info-tabs.css similarity index 100% rename from app/src/main/resources/xyz/brysonsteck/servercraft/css/info-tabs.css rename to app/src/main/resources/xyz/brysonsteck/ServerCraft/css/info-tabs.css diff --git a/app/src/main/resources/xyz/brysonsteck/servercraft/icons/info.png b/app/src/main/resources/xyz/brysonsteck/ServerCraft/icons/info.png similarity index 100% rename from app/src/main/resources/xyz/brysonsteck/servercraft/icons/info.png rename to app/src/main/resources/xyz/brysonsteck/ServerCraft/icons/info.png diff --git a/app/src/main/resources/xyz/brysonsteck/servercraft/icons/warning.png b/app/src/main/resources/xyz/brysonsteck/ServerCraft/icons/warning.png similarity index 100% rename from app/src/main/resources/xyz/brysonsteck/servercraft/icons/warning.png rename to app/src/main/resources/xyz/brysonsteck/ServerCraft/icons/warning.png diff --git a/app/src/main/resources/xyz/brysonsteck/servercraft/info.fxml b/app/src/main/resources/xyz/brysonsteck/ServerCraft/info.fxml similarity index 100% rename from app/src/main/resources/xyz/brysonsteck/servercraft/info.fxml rename to app/src/main/resources/xyz/brysonsteck/ServerCraft/info.fxml diff --git a/app/src/main/resources/xyz/brysonsteck/servercraft/primary.fxml b/app/src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml similarity index 100% rename from app/src/main/resources/xyz/brysonsteck/servercraft/primary.fxml rename to app/src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml diff --git a/settings.gradle b/settings.gradle index 2d69564..0347dfc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,5 +7,5 @@ * in the user manual at https://docs.gradle.org/8.0.2/userguide/multi_project_builds.html */ -rootProject.name = 'servercraft' +rootProject.name = 'ServerCraft' include('app')