- install4jApplicationName = "${getdown_txt_title} ${install4jSuffix}"
- install4jApplicationFolder = "${getdown_txt_title} ${install4jSuffix}"
- // sanitise folder names
- install4jApplicationFolder = install4jApplicationFolder.replaceAll("[\"'~\\.]", "_")
- install4jUnixApplicationFolder = install4jApplicationFolder.toLowerCase().replaceAll(" ","-")
- }
+ install4jApplicationName = "${jalview_name} ${install4jSuffix}"
+ install4jBundleId = "${install4j_bundle_id}-" + install4jSuffix.toLowerCase()
+ }
+ // sanitise folder and id names
+ // install4jApplicationFolder = e.g. "Jalview Build"
+ install4jApplicationFolder = install4jApplicationName
+ .replaceAll("[\"'~:/\\\\]", "_") // replace all awkward filename chars " ' ~ : / \
+ .replaceAll("_+", "_") // collapse __
+ install4jInternalId = install4jApplicationFolder
+ .replaceAll(" ","_")
+ .replaceAll("[^\\w\\-\\.]", "_") // replace other non [alphanumeric,_,-,.]
+ .replaceAll("_+", "_") // collapse __
+ .replaceAll("_*-_*", "-") // collapse _-_
+ install4jUnixApplicationFolder = install4jInternalId
+ .toLowerCase()