JAL-4467 Take account of presource and xresource in the getdownArchiveBuild task bug/JAL-4467_getdownArchive_task_fails
authorBen Soares <b.soares@dundee.ac.uk>
Fri, 20 Sep 2024 15:42:53 +0000 (16:42 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Fri, 20 Sep 2024 15:42:53 +0000 (16:42 +0100)
build.gradle

index 1cd0565..4a7c921 100644 (file)
@@ -2667,13 +2667,13 @@ task getdownArchiveBuild() {
 
     getdownTextLines.each { line ->
       line = line.replaceAll("^(?<s>appbase\\s*=\\s*).*", '${s}'+getdownFullArchiveAppBase)
-      line = line.replaceAll("^(?<s>(resource|code)\\s*=\\s*)${getdownAppDistDir}/", '${s}'+vAltDir+"/")
+      line = line.replaceAll("^(?<s>([px]?resource|code)\\s*=\\s*)${getdownAppDistDir}/", '${s}'+vAltDir+"/")
       line = line.replaceAll("^(?<s>ui.background_image\\s*=\\s*).*\\.png", '${s}'+"${getdown_resource_dir}/jalview_archive_getdown_background.png")
       line = line.replaceAll("^(?<s>ui.instant_background_image\\s*=\\s*).*\\.png", '${s}'+"${getdown_resource_dir}/jalview_archive_getdown_background_initialising.png")
       line = line.replaceAll("^(?<s>ui.error_background\\s*=\\s*).*\\.png", '${s}'+"${getdown_resource_dir}/jalview_archive_getdown_background_error.png")
       line = line.replaceAll("^(?<s>ui.progress_image\\s*=\\s*).*\\.png", '${s}'+"${getdown_resource_dir}/jalview_archive_getdown_progress_bar.png")
       // remove the existing resource = resource/ or bin/ lines
-      if (! line.matches("resource\\s*=\\s*(resource|bin)/.*")) {
+      if (! line.matches("[px]?resource\\s*=\\s*(resource|bin)/.*")) {
         getdownArchiveTextLines += line
       }
     }
@@ -2683,7 +2683,7 @@ task getdownArchiveBuild() {
       from "${archiveImagesDir}"
       into "${getdownFullArchiveDir}/${getdown_resource_dir}"
       eachFile { file ->
-        getdownArchiveTextLines += "resource = ${getdown_resource_dir}/${file.getName()}"
+        getdownArchiveTextLines += "presource = ${getdown_resource_dir}/${file.getName()}"
       }
     }