mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-05 15:59:50 +07:00
3.16.13-windows64NewPackrTest
This commit is contained in:
@ -68,6 +68,21 @@ for (platform in PackrConfig.Platform.values()) {
|
|||||||
tasks.create("packr${platformName}") {
|
tasks.create("packr${platformName}") {
|
||||||
dependsOn(tasks.getByName("dist"))
|
dependsOn(tasks.getByName("dist"))
|
||||||
|
|
||||||
|
// Needs to be here and not in doLast because the zip task depends on the outDir
|
||||||
|
val jarFile = "$rootDir/desktop/build/libs/${BuildConfig.appName}.jar"
|
||||||
|
val config = PackrConfig()
|
||||||
|
config.platform = platform
|
||||||
|
|
||||||
|
config.apply {
|
||||||
|
executable = "Unciv"
|
||||||
|
classpath = listOf(jarFile)
|
||||||
|
removePlatformLibs = config.classpath
|
||||||
|
mainClass = mainClassName
|
||||||
|
vmArgs = listOf("Xmx1G")
|
||||||
|
minimizeJre = "desktop/packrConfig.json"
|
||||||
|
outDir = file("packr")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
// https://gist.github.com/seanf/58b76e278f4b7ec0a2920d8e5870eed6
|
// https://gist.github.com/seanf/58b76e278f4b7ec0a2920d8e5870eed6
|
||||||
@ -89,20 +104,6 @@ for (platform in PackrConfig.Platform.values()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val jarFile = "$rootDir/desktop/build/libs/${BuildConfig.appName}.jar"
|
|
||||||
val config = PackrConfig()
|
|
||||||
config.platform = platform
|
|
||||||
|
|
||||||
config.apply {
|
|
||||||
executable = "Unciv"
|
|
||||||
classpath = listOf(jarFile)
|
|
||||||
removePlatformLibs = config.classpath
|
|
||||||
mainClass = mainClassName
|
|
||||||
vmArgs = listOf("Xmx1G")
|
|
||||||
minimizeJre = "desktop/packrConfig.json"
|
|
||||||
outDir = file("packr")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.outDir.exists()) delete(config.outDir)
|
if (config.outDir.exists()) delete(config.outDir)
|
||||||
|
|
||||||
// Requires that both packr and the jre are downloaded, as per buildAndDeploy.yml, "Upload to itch.io"
|
// Requires that both packr and the jre are downloaded, as per buildAndDeploy.yml, "Upload to itch.io"
|
||||||
|
Reference in New Issue
Block a user