X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;fp=build.gradle;h=6129170b0419497df0be26ae39f1a32ead85c02b;hb=bd0a8a853fe1f782eedf9ffad1913f2321ced0f9;hp=69a7fb6e6d4e00c20e5974c10230255a1c9d8555;hpb=8f88ecf0e8a1cde5df1e5a2e81a2b03c61c370a8;p=jalview.git diff --git a/build.gradle b/build.gradle index 69a7fb6..6129170 100644 --- a/build.gradle +++ b/build.gradle @@ -259,18 +259,23 @@ ext { // install4j application and folder names if (install4jSuffix == "") { install4jApplicationName = "${jalview_name}" + install4jBundleId = "${install4j_bundle_id}" } else { install4jApplicationName = "${jalview_name} ${install4jSuffix}" + install4jBundleId = "${install4j_bundle_id}-" + install4jSuffix.toLowerCase() } - // sanitise folder names + // sanitise folder and id names + // install4jApplicationFolder = e.g. "Jalview Build" install4jApplicationFolder = install4jApplicationName - .replaceAll("[\"'~:\\\\]+", "_") // replace all awkward filename chars - install4jUnixApplicationFolder = install4jApplicationFolder - .toLowerCase() + .replaceAll("[\"'~:/\\\\]", "_") // replace all awkward filename chars " ' ~ : / \ + .replaceAll("_+", "_") // collapse __ + install4jInternalId = install4jApplicationFolder .replaceAll(" ","_") - .replaceAll("[^\\w\\-\\.]+", "_") // replace other non [alphanumeric,_,-,.] - .replaceAll("_+", "_") - .replaceAll("_*-_*", "-") + .replaceAll("[^\\w\\-\\.]", "_") // replace other non [alphanumeric,_,-,.] + .replaceAll("_+", "_") // collapse __ + .replaceAll("_*-_*", "-") // collapse _-_ + install4jUnixApplicationFolder = install4jInternalId + .toLowerCase() getdownAppDir = string("${getdownWebsiteDir}/${getdownAppDistDir}") //getdownJ11libDir = "${getdownWebsiteDir}/${getdown_j11lib_dir}" @@ -1407,7 +1412,8 @@ task installers(type: com.install4j.gradle.Install4jTask) { def install4jBuildDir = "${install4j_build_dir}/${JAVA_VERSION}" variables = [ - 'JALVIEW_NAME': install4jApplicationName, + 'JALVIEW_NAME': jalview_name, + 'JALVIEW_APPLICATION_NAME': install4jApplicationName, 'JALVIEW_DIR': "../..", 'OSX_KEYSTORE': OSX_KEYSTORE, 'JSIGN_SH': JSIGN_SH, @@ -1426,7 +1432,8 @@ task installers(type: com.install4j.gradle.Install4jTask) { 'WINDOWS_JAVA_VM_TGZ': windowsJavaVMTgz, 'LINUX_JAVA_VM_TGZ': linuxJavaVMTgz, 'COPYRIGHT_MESSAGE': install4j_copyright_message, - 'MACOS_BUNDLE_ID': install4j_macOS_bundle_id, + 'BUNDLE_ID': install4jBundleId, + 'INTERNAL_ID': install4jInternalId, 'MACOS_DS_STORE': install4jDSStore, 'MACOS_DMG_BG_IMAGE': install4jDMGBackgroundImage, 'INSTALLER_NAME': install4jInstallerName, @@ -1446,6 +1453,9 @@ task installers(type: com.install4j.gradle.Install4jTask) { 'EXTRA_SCHEME': install4jExtraScheme, ] + println("INSTALL4J VARIABLES:") + variables.each{k,v->println("${k}=${v}")} + destination = "${jalviewDir}/${install4jBuildDir}" buildSelected = true