install4jWindowsIconsFile = string("${install4j_images_dir}/${install4j_windows_icons_file}")
install4jPngIconFile = string("${install4j_images_dir}/${install4j_png_icon_file}")
install4jBackground = string("${install4j_images_dir}/${install4j_background}")
+ install4jBuildDir = "${install4j_build_dir}/${JAVA_VERSION}"
+ install4jCheckSums = true
switch (CHANNEL) {
case "BUILD":
getdownAppBase = file(getdownWebsiteDir).toURI().toString()
getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
install4jExtraScheme = "jalviewl"
+ install4jCheckSums = false
break
default: // something wrong specified
// turn off checksum creation for LOCAL channel
def e = install4jConfigXml.application[0]
- if (CHANNEL == "LOCAL") {
- e.'@createChecksums' = "false"
- } else {
- e.'@createChecksums' = "true"
- }
+ e.'@createChecksums' = string(install4jCheckSums)
// put file association actions where placeholder action is
def install4jFileAssociationsText = install4jFileAssociationsFile.text
filesMd5 = filesMd5.substring(0,8)
}
def install4jTemplateVersion = "${JALVIEW_VERSION}_F${filesMd5}_C${gitHash}"
- // make install4jBuildDir relative to jalviewDir
- def install4jBuildDir = "${install4j_build_dir}/${JAVA_VERSION}"
variables = [
'JALVIEW_NAME': jalview_name,
outputs.dir("${jalviewDir}/${install4j_build_dir}/${JAVA_VERSION}")
}
-task copyInstallersOutputTxt {
+task addVersionToInstallersDataFiles {
dependsOn installerFiles
- def install4jBuildDir = "${jalviewDir}/${install4j_build_dir}/${JAVA_VERSION}"
- def installersOutputTxt = "${install4jBuildDir}/output.txt"
- def installersOutputVersionTxt = "${install4jBuildDir}/output-${JALVIEW_VERSION}.txt"
+ def installersOutputTxt = "${jalviewDir}/${install4jBuildDir}/output.txt"
+ def installersOutputVersionTxt = "${jalviewDir}/${install4jBuildDir}/output-${JALVIEW_VERSION}.txt"
+ def installersSha256 = "${jalviewDir}/${install4jBuildDir}/sha256sums"
+ def installersSha256Version = "${jalviewDir}/${install4jBuildDir}/sha256sums-${JALVIEW_VERSION}"
inputs.file(installersOutputTxt)
- outputs.file("${install4jBuildDir}/${installersOutputVersionTxt}")
+ outputs.file(installersOutputVersionTxt)
+ if (install4jCheckSums) {
+ inputs.file(installersSha256)
+ outputs.file(installersSha256Version)
+ }
doFirst {
file(installersOutputVersionTxt).write(file(installersOutputTxt).text)
+ if (install4jCheckSums) {
+ file(installersSha256Version).write(file(installersSha256).text)
+ }
}
}
task installers {
dependsOn installerFiles
- dependsOn copyInstallersOutputTxt
+ dependsOn addVersionToInstallersDataFiles
}