diff --git a/build.gradle.kts b/build.gradle.kts index a8346fc2..f1aa9d44 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -386,16 +386,25 @@ tasks { } } + var directory_containing_unpacked_jbr_win = ""; val unpack_windows_JBR by registering(Copy::class) { dependsOn(resolveJBR_Win, fix_JNA_and_fix_BIN) from(tarTree("$jdkDir/jbr_jcef-windows-x64.tgz")) into("$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp") doLast { - System.err.println("--------- win jbr unpacked in " + "$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp") - File("$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp/").walk().forEach { - println(it) + //System.err.println("--------- win jbr unpacked in " + "$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp") + //File("$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp/").walk().forEach { + // println(it) + //} + val path_tmp = File("$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp/").listFiles { file -> + file.isDirectory && file.name.startsWith("jbr") + }?.first()?.absolutePath + + if (path_tmp != null) { + directory_containing_unpacked_jbr_win = path_tmp; } + System.err.println("--------- win jbr unpacked in " + directory_containing_unpacked_jbr_win) } } @@ -403,7 +412,7 @@ tasks { dependsOn(resolveJBR_Win, build_fasten_safety_distribution, unpack_windows_JBR) archiveBaseName.set("fasten-${version}-Win") from("$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp/fasten-${version}/") - from("$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp/jbr_jcef-windows-x64") { + from(directory_containing_unpacked_jbr_win /*"$artifactsDir/com.mbeddr.formal.safetyDistribution/tmp/jbr_jcef-windows-x64"*/) { include("**/*.*") into("jbr") }