getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher}")
getdownAppDistDir = getdown_app_dir_alt
buildProperties = string("${classesDir}/${build_properties_file}")
- reportRsyncCmd = false
+ reportRsyncCommand = false
jvlChannelName = CHANNEL.toLowerCase()
+ install4jSuffix = CHANNEL.substring(0, 1).toUpperCase() + CHANNEL.substring(1).toLowerCase(); // BUILD -> Build
switch (CHANNEL) {
case "BUILD":
case "RELEASE":
getdownAppDistDir = getdown_app_dir_release
reportRsyncCommand = true
+ install4jSuffix = ""
break
case "ARCHIVE":
}
reportRsyncCommand = true
getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
+ install4jSuffix = "Archive"
break
case "DEVELOP":
case "TEST-RELEASE":
reportRsyncCommand = true
+ install4jSuffix = "Test"
+ JALVIEW_VERSION = "TEST"
break
case ~/^SCRATCH(|-[-\w]*)$/:
getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
reportRsyncCommand = true
+ install4jSuffix = "Scratch"
break
case "TEST-LOCAL":
getdownAppBase = file(file("${LOCALDIR}").getAbsolutePath()).toURI().toString()
getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
}
+ install4jSuffix = "Test-Local"
+ JALVIEW_VERSION = "TEST"
break
case "LOCAL":
println("Overriding getdown appbase with '${getdownAppBase}'")
}
// sanitise file name for jalview launcher file for this channel
- jvlChannelName = jvlChannelName.replaceAll(/[^\w\-]/,"_")
+ jvlChannelName = jvlChannelName.replaceAll("[^\\w\\-]", "_")
+ // install4j application and folder names
+ if (install4jSuffix == "") {
+ install4jApplicationName = "${getdown_txt_title}"
+ install4jApplicationFolder = "${getdown_txt_title}"
+ install4jUnixApplicationFolder = install4jApplicationFolder.toLowerCase()
+ } else {
+ install4jApplicationName = "${getdown_txt_title} ${install4jSuffix}"
+ install4jApplicationFolder = "${getdown_txt_title} ${install4jSuffix}"
+ // sanitise folder names
+ install4jApplicationFolder = install4jApplicationFolder.replaceAll("[\"'~\\.]", "_")
+ install4jUnixApplicationFolder = install4jApplicationFolder.toLowerCase().replaceAll(" ","-")
+ }
getdownAppDir = string("${getdownWebsiteDir}/${getdownAppDistDir}")
//getdownJ11libDir = "${getdownWebsiteDir}/${getdown_j11lib_dir}"
def install4jBuildDir = "${install4j_build_dir}/${JAVA_VERSION}"
variables = [
- 'JALVIEW_NAME': getdown_txt_title,
+ 'JALVIEW_NAME': install4jApplicationName,
'JALVIEW_DIR': "../..",
'OSX_KEYSTORE': OSX_KEYSTORE,
'JSIGN_SH': JSIGN_SH,
'INFO_PLIST_FILE_ASSOCIATIONS_FILE': install4j_info_plist_file_associations,
'BUILD_DIR': install4jBuildDir,
'UNIX_DESKTOP_ADDITIONS': install4j_unix_desktop_additions,
+ 'APPLICATION_FOLDER': install4jApplicationFolder,
+ 'UNIX_APPLICATION_FOLDER': install4jUnixApplicationFolder,
]
destination = "${jalviewDir}/${install4jBuildDir}"