mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-12-25 16:21:50 +01:00
add launch4j
This commit is contained in:
parent
98bd664ab6
commit
1ea51bb9df
@ -6,6 +6,7 @@ plugins {
|
|||||||
application
|
application
|
||||||
id("com.github.johnrengelman.shadow") version "6.1.0"
|
id("com.github.johnrengelman.shadow") version "6.1.0"
|
||||||
id("org.jmailen.kotlinter") version "3.3.0"
|
id("org.jmailen.kotlinter") version "3.3.0"
|
||||||
|
id("edu.sc.seis.launch4j") version "2.4.9"
|
||||||
}
|
}
|
||||||
|
|
||||||
val TachideskVersion = "v0.1.5"
|
val TachideskVersion = "v0.1.5"
|
||||||
@ -85,7 +86,6 @@ dependencies {
|
|||||||
implementation("com.dorkbox:SystemTray:3.17")
|
implementation("com.dorkbox:SystemTray:3.17")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// AndroidCompat
|
// AndroidCompat
|
||||||
implementation(project(":AndroidCompat"))
|
implementation(project(":AndroidCompat"))
|
||||||
implementation(project(":AndroidCompat:Config"))
|
implementation(project(":AndroidCompat:Config"))
|
||||||
@ -95,8 +95,8 @@ dependencies {
|
|||||||
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
|
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
|
||||||
}
|
}
|
||||||
|
|
||||||
application {
|
|
||||||
val name = "ir.armor.tachidesk.Main"
|
val name = "ir.armor.tachidesk.Main"
|
||||||
|
application {
|
||||||
mainClass.set(name)
|
mainClass.set(name)
|
||||||
|
|
||||||
// Required by ShadowJar.
|
// Required by ShadowJar.
|
||||||
@ -143,6 +143,63 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
launch4j { //used for windows
|
||||||
|
mainClassName = name
|
||||||
|
bundledJrePath = "jre"
|
||||||
|
bundledJre64Bit = true
|
||||||
|
jreMinVersion = "8"
|
||||||
|
outputDir = "Tachidesk-$TachideskVersion-$TachideskRevision-win32"
|
||||||
|
icon = "${projectDir}/src/main/resources/icon/icon_round.ico"
|
||||||
|
jar = "${projectDir}/build/Tachidesk-$TachideskVersion-$TachideskRevision.jar"
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<Zip>("windowsPackage") {
|
||||||
|
from(fileTree("$buildDir/Tachidesk-$TachideskVersion-$TachideskRevision-win32"))
|
||||||
|
destinationDirectory.set(File("$buildDir"))
|
||||||
|
archiveFileName.set("Tachidesk-$TachideskVersion-$TachideskRevision-win32.zip")
|
||||||
|
dependsOn("windowsPackageWorkaround2")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<Delete>("windowsPackageWorkaround2") {
|
||||||
|
delete(
|
||||||
|
"$buildDir/Tachidesk-$TachideskVersion-$TachideskRevision-win32/jre",
|
||||||
|
"$buildDir/Tachidesk-$TachideskVersion-$TachideskRevision-win32/lib",
|
||||||
|
"$buildDir/Tachidesk-$TachideskVersion-$TachideskRevision-win32/server.exe",
|
||||||
|
"$buildDir/Tachidesk-$TachideskVersion-$TachideskRevision-win32/Tachidesk-$TachideskVersion-$TachideskRevision-win32/Tachidesk-$TachideskVersion-$TachideskRevision-win32"
|
||||||
|
)
|
||||||
|
dependsOn("windowsPackageWorkaround")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<Copy>("windowsPackageWorkaround") {
|
||||||
|
from("$buildDir/Tachidesk-$TachideskVersion-$TachideskRevision-win32")
|
||||||
|
into("$buildDir/Tachidesk-$TachideskVersion-$TachideskRevision-win32/Tachidesk-$TachideskVersion-$TachideskRevision-win32")
|
||||||
|
dependsOn("deleteUnwantedJreDir")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<Delete>("deleteUnwantedJreDir") {
|
||||||
|
delete(
|
||||||
|
"$buildDir/Tachidesk-$TachideskVersion-$TachideskRevision-win32/jdk8u282-b08-jre"
|
||||||
|
)
|
||||||
|
dependsOn("addJreToDistributable")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<Copy>("addJreToDistributable") {
|
||||||
|
from(zipTree("$buildDir/OpenJDK8U-jre_x86-32_windows_hotspot_8u282b08.zip"))
|
||||||
|
into("$buildDir/Tachidesk-$TachideskVersion-$TachideskRevision-win32")
|
||||||
|
eachFile {
|
||||||
|
path = path.replace(".*-jre".toRegex(),"jre")
|
||||||
|
}
|
||||||
|
dependsOn("downloadJre")
|
||||||
|
dependsOn("createExe")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<de.undercouch.gradle.tasks.download.Download>("downloadJre") {
|
||||||
|
src("https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jre_x86-32_windows_hotspot_8u282b08.zip")
|
||||||
|
dest(buildDir)
|
||||||
|
overwrite(false)
|
||||||
|
onlyIfModified(true)
|
||||||
|
}
|
||||||
|
|
||||||
tasks.withType<ShadowJar> {
|
tasks.withType<ShadowJar> {
|
||||||
destinationDir = File("$rootDir/server/build")
|
destinationDir = File("$rootDir/server/build")
|
||||||
dependsOn("lintKotlin")
|
dependsOn("lintKotlin")
|
||||||
|
BIN
server/src/main/resources/icon/icon_round.ico
Normal file
BIN
server/src/main/resources/icon/icon_round.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 149 KiB |
Loading…
Reference in New Issue
Block a user