From bd0a8a853fe1f782eedf9ffad1913f2321ced0f9 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Sun, 5 Apr 2020 10:50:12 +0100 Subject: [PATCH] JAL-3577 Changed Windows internal ID to a new value which is backward compatible with the 2.11.0 installation. i.e. release versions will have internal ID 'Jalview' --- build.gradle | 28 +++++++++++++++------- gradle.properties | 2 +- utils/install4j/install4j8_template.install4j | 32 +++++++------------------ 3 files changed, 29 insertions(+), 33 deletions(-) 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 diff --git a/gradle.properties b/gradle.properties index 790d17f..832026c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -113,7 +113,7 @@ j11modules = com.sun.istack.runtime,com.sun.xml.bind,com.sun.xml.fastinfoset,com install4j_home_dir = ~/buildtools/install4j8 install4j_copyright_message = ... -install4j_macOS_bundle_id = org.jalview.jalview-desktop +install4j_bundle_id = org.jalview.jalview-desktop install4j_utils_dir = utils/install4j install4j_template = install4j8_template.install4j install4j_info_plist_file_associations = file_associations_auto-Info_plist.xml diff --git a/utils/install4j/install4j8_template.install4j b/utils/install4j/install4j8_template.install4j index 8e9a22c..0b6cf77 100644 --- a/utils/install4j/install4j8_template.install4j +++ b/utils/install4j/install4j8_template.install4j @@ -1,7 +1,7 @@ - + - + @@ -9,6 +9,7 @@ + @@ -28,7 +29,8 @@ - + + @@ -113,9 +115,9 @@ - + - + @@ -132,6 +134,7 @@ 2350 2450 + 2641 ${compiler:UNIX_DESKTOP_ADDITIONS} ${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")} @@ -874,7 +877,7 @@ return console.askYesNo(message, true); - + @@ -1091,23 +1094,6 @@ return console.askYesNo(message, true); - - - - - - - - - - - - - - - - - -- 1.7.10.2