mirror of
https://gitlab.com/2009scape/09launcher.git
synced 2025-12-09 16:45:54 -07:00
Autobuild a zip for windows with a bundled exe and jre.
This commit is contained in:
parent
b649477898
commit
744bcfcf42
2 changed files with 32 additions and 1 deletions
|
|
@ -18,9 +18,12 @@ build:
|
||||||
script:
|
script:
|
||||||
- ./gradlew jar
|
- ./gradlew jar
|
||||||
- mv build/libs/*.jar build/libs/2009scape.jar
|
- mv build/libs/*.jar build/libs/2009scape.jar
|
||||||
|
- ./gradlew packageExecutableDistribution
|
||||||
|
- mv build/distExecutable/*.zip build/libs/2009scape.zip
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build/libs/*.jar
|
- build/libs/*.jar
|
||||||
|
- build/libs/*.zip
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
|
||||||
28
build.gradle
28
build.gradle
|
|
@ -1,5 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.jetbrains.kotlin.jvm' version '1.4.32'
|
id 'org.jetbrains.kotlin.jvm' version '1.4.32'
|
||||||
|
id 'edu.sc.seis.launch4j' version '2.5.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'org.rs09'
|
group 'org.rs09'
|
||||||
|
|
@ -20,3 +21,30 @@ jar {
|
||||||
}
|
}
|
||||||
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
launch4j {
|
||||||
|
mainClassName = "MainWindow"
|
||||||
|
icon = "${projectDir}/src/main/resources/09logo.ico"
|
||||||
|
jarTask = project.tasks.jar
|
||||||
|
bundledJre64Bit = false
|
||||||
|
bundledJrePath = "jre"
|
||||||
|
downloadUrl = "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jre_x86-32_windows_hotspot_8u292b10.msi"
|
||||||
|
outfile = "2009scape.exe"
|
||||||
|
copyright = "2009scape"
|
||||||
|
companyName = "2009scape"
|
||||||
|
}
|
||||||
|
|
||||||
|
task packageExecutableDistribution(type: Zip) {
|
||||||
|
archiveName = "2009scape.zip"
|
||||||
|
destinationDir = file("$buildDir/distExecutable")
|
||||||
|
|
||||||
|
from "$buildDir/launch4j"
|
||||||
|
}
|
||||||
|
|
||||||
|
task addJreToDistributable(type: Copy) {
|
||||||
|
from files("${projectDir}/launch4j")
|
||||||
|
destinationDir = file("$buildDir/launch4j")
|
||||||
|
}
|
||||||
|
|
||||||
|
packageExecutableDistribution.dependsOn createExe
|
||||||
|
packageExecutableDistribution.dependsOn addJreToDistributable
|
||||||
Loading…
Add table
Add a link
Reference in a new issue