From 3db911064cbf8e5c3ca345d6f6c3bb34a38d7c9f Mon Sep 17 00:00:00 2001 From: danielratiu Date: Sat, 23 Nov 2024 17:21:10 +0100 Subject: [PATCH] build.gradle: fix the packaging of win rcp --- build.gradle.kts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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") }