if (install4jSuffix == "") {
install4jApplicationName = "${jalview_name}"
install4jBundleId = "${install4j_bundle_id}"
+ install4jWinApplicationId = install4j_release_win_application_id
} else {
install4jApplicationName = "${jalview_name} ${install4jSuffix}"
install4jBundleId = "${install4j_bundle_id}-" + install4jSuffix.toLowerCase()
+ // add int hash of install4jSuffix to the last part of the application_id
+ def id = install4j_release_win_application_id
+ def idsplitreverse = id.split("-").reverse()
+ idsplitreverse[0] = idsplitreverse[0].toInteger() + install4jSuffix.hashCode()
+ install4jWinApplicationId = idsplitreverse.reverse().join("-")
}
// sanitise folder and id names
// install4jApplicationFolder = e.g. "Jalview Build"
install4jApplicationFolder = install4jApplicationName
- .replaceAll("[\"'~:/\\\\]", "_") // replace all awkward filename chars " ' ~ : / \
+ .replaceAll("[\"'~:/\\\\\\s]", "_") // replace all awkward filename chars " ' ~ : / \
.replaceAll("_+", "_") // collapse __
- install4jInternalId = install4jApplicationFolder
+ install4jInternalId = install4jApplicationName
.replaceAll(" ","_")
.replaceAll("[^\\w\\-\\.]", "_") // replace other non [alphanumeric,_,-,.]
- .replaceAll("_+", "_") // collapse __
- .replaceAll("_*-_*", "-") // collapse _-_
+ .replaceAll("_+", "") // collapse __
+ //.replaceAll("_*-_*", "-") // collapse _-_
install4jUnixApplicationFolder = install4jInternalId
.toLowerCase()
'COPYRIGHT_MESSAGE': install4j_copyright_message,
'BUNDLE_ID': install4jBundleId,
'INTERNAL_ID': install4jInternalId,
+ 'WINDOWS_APPLICATION_ID': install4jWinApplicationId,
'MACOS_DS_STORE': install4jDSStore,
'MACOS_DMG_BG_IMAGE': install4jDMGBackgroundImage,
'INSTALLER_NAME': install4jInstallerName,
'EXTRA_SCHEME': install4jExtraScheme,
]
- //println("INSTALL4J VARIABLES:")
- //variables.each{k,v->println("${k}=${v}")}
+ println("INSTALL4J VARIABLES:")
+ variables.each{k,v->println("${k}=${v}")}
destination = "${jalviewDir}/${install4jBuildDir}"
buildSelected = true