JAL-3577 Changed Windows internal ID to a new value which is backward compatible...
authorBen Soares <b.soares@dundee.ac.uk>
Sun, 5 Apr 2020 09:50:12 +0000 (10:50 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Sun, 5 Apr 2020 09:50:12 +0000 (10:50 +0100)
build.gradle
gradle.properties
utils/install4j/install4j8_template.install4j

index 69a7fb6..6129170 100644 (file)
@@ -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
 
index 790d17f..832026c 100644 (file)
@@ -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
index 8e9a22c..0b6cf77 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<install4j version="8.0.5" transformSequenceNumber="8">
+<install4j version="8.0.4" transformSequenceNumber="8">
   <directoryPresets config="." />
-  <application name="${compiler:JALVIEW_NAME}" applicationId="6595-2347-1923-0725" mediaDir="${compiler:BUILD_DIR}" lzmaCompression="true" shortName="${compiler:JALVIEW_NAME}" publisher="University of Dundee" publisherWeb="https://www.jalview.org/" version="${compiler:JALVIEW_VERSION}" allPathsRelative="true" macVolumeId="5aac4968c304f65" javaMinVersion="${compiler:JAVA_MIN_VERSION}" javaMaxVersion="9999999999${compiler:JAVA_MAX_VERSION}" allowBetaVM="true" jdkMode="jdk" jdkName="JDK 11.0">
+  <application name="${compiler:JALVIEW_APPLICATION_NAME}" applicationId="6595-2347-1923-0725" mediaDir="${compiler:BUILD_DIR}" lzmaCompression="true" shortName="${compiler:JALVIEW_NAME}" publisher="University of Dundee" publisherWeb="https://www.jalview.org/" version="${compiler:JALVIEW_VERSION}" allPathsRelative="true" macVolumeId="5aac4968c304f65" javaMinVersion="${compiler:JAVA_MIN_VERSION}" javaMaxVersion="9999999999${compiler:JAVA_MAX_VERSION}" allowBetaVM="true" jdkMode="jdk" jdkName="JDK 11.0">
     <searchSequence>
       <directory location="${compiler:JRE_DIR}" />
       <registry />
@@ -9,6 +9,7 @@
     </searchSequence>
     <variables>
       <variable name="JALVIEW_NAME" value="Jalview" />
+      <variable name="JALVIEW_APPLICATION_NAME" value="Jalview" />
       <variable name="JALVIEW_DIR" value="../.." />
       <variable name="BUILD_DIR" value="${compiler:JALVIEW_DIR}/build/install4j" />
       <variable name="OSX_KEYSTORE" />
@@ -28,7 +29,8 @@
       <variable name="WINDOWS_JAVA_VM_TGZ" value="~/buildtools/jre/tgz/jre-${compiler:JAVA_INTEGER_VERSION}-windows-x64.tar.gz" />
       <variable name="LINUX_JAVA_VM_TGZ" value="~/buildtools/jre/tgz/jre-${compiler:JAVA_INTEGER_VERSION}-linux-x64.tar.gz" />
       <variable name="COPYRIGHT_MESSAGE" value="..." />
-      <variable name="MACOS_BUNDLE_ID" value="org.jalview.jalview-desktop" />
+      <variable name="BUNDLE_ID" value="org.jalview.jalview-desktop" />
+      <variable name="INTERNAL_ID" value="Jalview" />
       <variable name="MACOS_DS_STORE" value="DS_Store" />
       <variable name="MACOS_DMG_BG_IMAGE" />
       <variable name="INSTALLER_NAME" value="Jalview Installer" />
     </components>
   </files>
   <launchers>
-    <launcher name="Offline Jalview Launcher" id="737" menuName="${compiler:sys.shortName}" icnsFile="${compiler:JALVIEW_DIR}/resources/images/jalview_logos.icns" customMacBundleIdentifier="true" macBundleIdentifier="${compiler:MACOS_BUNDLE_ID}" fileset="734" useCustomMacosExecutableName="true" customMacosExecutableName="${compiler:sys.shortName}">
+    <launcher name="Offline Jalview Launcher" id="737" menuName="${compiler:JALVIEW_APPLICATION_NAME}" icnsFile="${compiler:JALVIEW_DIR}/resources/images/jalview_logos.icns" customMacBundleIdentifier="true" macBundleIdentifier="${compiler:BUNDLE_ID}" fileset="734" useCustomMacosExecutableName="true" customMacosExecutableName="${compiler:JALVIEW_APPLICATION_NAME}">
       <executable name="${compiler:EXECUTABLE_NAME}" iconSet="true" iconFile="${compiler:JALVIEW_DIR}/resources/images/jalview_logos.ico" redirectStdout="true" executableMode="gui" changeWorkingDirectory="false" singleInstance="true" checkConsoleParameter="true">
-        <versionInfo include="true" fileDescription="${compiler:sys.shortName}" legalCopyright="${compiler:COPYRIGHT_MESSAGE}" internalName="${compiler:sys.shortName}" productName="${compiler:sys.shortName}" />
+        <versionInfo include="true" fileDescription="${compiler:sys.fullName}" legalCopyright="${compiler:COPYRIGHT_MESSAGE}" internalName="${compiler:INTERNAL_ID}" productName="${compiler:sys.fullName}" />
       </executable>
       <splashScreen width="640" height="480" bitmapFile="${compiler:JALVIEW_DIR}/resources/images/jalview_logo_background_fade-640x480.png" textOverlay="true">
         <text>
       <macStaticAssociationActions mode="selected">
         <id>2350</id>
         <id>2450</id>
+        <id>2641</id>
       </macStaticAssociationActions>
       <desktopFile>${compiler:UNIX_DESKTOP_ADDITIONS}</desktopFile>
       <infoPlist>${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")}</infoPlist>
@@ -874,7 +877,7 @@ return console.askYesNo(message, true);
             </serializedBean>
             <beans>
               <formComponent id="38" beanClass="com.install4j.runtime.beans.styles.ContentComponent" insetTop="10" insetLeft="20" insetBottom="10" insetRight="20" />
-              <formComponent name="Watermark" id="39" beanClass="com.install4j.runtime.beans.formcomponents.SeparatorComponent" insetTop="0" insetLeft="5" insetBottom="0" useExternalParametrization="true" externalParametrizationName="${compiler:JALVIEW_NAME}" externalParametrizationMode="include">
+              <formComponent name="Watermark" id="39" beanClass="com.install4j.runtime.beans.formcomponents.SeparatorComponent" insetTop="0" insetLeft="5" insetBottom="0" useExternalParametrization="true" externalParametrizationName="${compiler:JALVIEW_APPLICATION_NAME}" externalParametrizationMode="include">
                 <serializedBean>
                   <property name="enabledTitleText" type="boolean" value="false" />
                 </serializedBean>
@@ -1091,23 +1094,6 @@ return console.askYesNo(message, true);
       </exclude>
       <jreBundle jreBundleSource="preCreated" includedJre="${compiler:WINDOWS_JAVA_VM_TGZ}" manualJreEntry="true" />
     </windows>
-    <windows name="Windows x64 MSI Installer" id="2446" mediaFileName="${compiler:APPLICATION_FOLDER}-${compiler:JALVIEW_VERSION}-${compiler:sys.platform}-java_${compiler:JAVA_INTEGER_VERSION}" installDir="${compiler:APPLICATION_FOLDER}" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" customInstallBaseDir="~/AppData/Local" msi="true" msiScope="perUser">
-      <excludedComponents>
-        <component id="1155" />
-        <component id="1156" />
-        <component id="1276" />
-        <component id="1881" />
-        <component id="2110" />
-      </excludedComponents>
-      <exclude>
-        <entry defaultFileset="true" />
-        <entry filesetId="880" />
-        <entry filesetId="882" />
-        <entry filesetId="1873" />
-        <entry filesetId="2105" />
-      </exclude>
-      <jreBundle jreBundleSource="preCreated" includedJre="${compiler:WINDOWS_JAVA_VM_TGZ}" manualJreEntry="true" />
-    </windows>
     <macosArchive name="macOS Disk Image" id="878" mediaFileName="${compiler:APPLICATION_FOLDER}-${compiler:JALVIEW_VERSION}-${compiler:sys.platform}-java_${compiler:JAVA_INTEGER_VERSION}" volumeName="${compiler:INSTALLER_NAME}" launcherId="737">
       <excludedComponents>
         <component id="1156" />