Skip to content

Commit

Permalink
build.gradle: fix the packaging of win rcp
Browse files Browse the repository at this point in the history
  • Loading branch information
danielratiu committed Nov 23, 2024
1 parent d953d58 commit 3db9110
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -386,24 +386,33 @@ 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)
}
}

val package_fasten_safety_distribution_win by registering(Zip::class) {
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")
}
Expand Down

0 comments on commit 3db9110

Please sign in to comment.