mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-16 10:49:17 +07:00
Only run packr if jar exists
This commit is contained in:
@ -43,18 +43,20 @@ task dist(dependsOn: classes, type: Jar) {
|
||||
}
|
||||
|
||||
task packrWindows(dependsOn: dist){
|
||||
def jarFile = "desktop/build/libs/${appName}.jar".toString()
|
||||
PackrConfig config = new PackrConfig()
|
||||
config.platform = PackrConfig.Platform.Windows64
|
||||
config.jdk = "https://github.com/ojdkbuild/ojdkbuild/releases/download/java-1.8.0-openjdk-1.8.0.232-1.b09/java-1.8.0-openjdk-1.8.0.232-1.b09.ojdkbuild.windows.x86_64.zip"
|
||||
config.executable = "Unciv"
|
||||
config.classpath = Arrays.asList("desktop/build/libs/${appName}.jar".toString())
|
||||
config.classpath = Arrays.asList(jarFile)
|
||||
config.removePlatformLibs = config.classpath
|
||||
config.mainClass = project.ext.mainClassName
|
||||
config.vmArgs = Arrays.asList("Xmx1G")
|
||||
config.minimizeJre = "soft"
|
||||
config.outDir = new File("desktop/packr")
|
||||
|
||||
new Packr().pack(config)
|
||||
if (new File(jarFile).exists())
|
||||
new Packr().pack(config)
|
||||
}
|
||||
|
||||
eclipse {
|
||||
@ -73,4 +75,4 @@ task afterEclipseImport(description: "Post processing after project generation",
|
||||
printer.setPreserveWhitespace(true)
|
||||
printer.print(classpath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user