Merge branch 'develop' into improvement/JAL-3394_added_categories_to_unix_shell_insta...
authorBen Soares <bsoares@dundee.ac.uk>
Thu, 12 Mar 2020 13:49:51 +0000 (13:49 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Thu, 12 Mar 2020 13:49:51 +0000 (13:49 +0000)
Merging on develop

build.gradle
gradle.properties
utils/download_jres.sh
utils/install4j/install4j8_template.install4j

index ca73859..0afdbf4 100644 (file)
@@ -1363,6 +1363,7 @@ task installers(type: com.install4j.gradle.Install4jTask) {
     'GETDOWN_INSTALL_DIR': getdown_install_dir,
     'INFO_PLIST_FILE_ASSOCIATIONS_FILE': install4j_info_plist_file_associations,
     'BUILD_DIR': install4jBuildDir,
+    'UNIX_DESKTOP_ADDITIONS': install4j_unix_desktop_additions,
   ]
 
   destination = "${jalviewDir}/${install4jBuildDir}"
index e4f0ebf..74685aa 100644 (file)
@@ -119,9 +119,10 @@ install4j_info_plist_file_associations = file_associations_auto-Info_plist.xml
 install4j_installer_file_associations = file_associations_auto-install4j8.xml
 #install4j_DMG_uninstaller_app_files = uninstall_old_jalview_files.xml
 install4j_build_dir = build/install4j
-install4j_media_types = windows,macosArchive,linuxRPM,linuxDeb,unixArchive,unixInstaller
+install4j_media_types = windows,macosArchive,unixArchive,unixInstaller
 install4j_faster = false
 install4j_installer_name = Jalview Installer
+install4j_unix_desktop_additions = Categories=Science;Biology;Java;
 
 OSX_KEYSTORE =
 OSX_KEYPASS =
index 5bfc26d..89ed8fc 100755 (executable)
@@ -18,6 +18,9 @@ JVM_IMPL=hotspot
 HEAP_SIZE=normal
 VENDOR=adoptopenjdk
 IMAGE_TYPE=jre
+TAR=tar
+ZIP=zip
+UNZIP=unzip
 
 STRIP_MAC_APP_BUNDLING=false
 CREATE_ARCHIVES="zip tgz"
@@ -29,7 +32,7 @@ RM=/bin/rm
 unzip-strip() (
   local zip=$1
   local dest=${2:-.}
-  local temp=$(mktemp -d) && unzip -qq -d "$temp" "$zip" && mkdir -p "$dest" &&
+  local temp=$(mktemp -d) && $UNZIP -qq -d "$temp" "$zip" && mkdir -p "$dest" &&
   shopt -s dotglob && local f=("$temp"/*) &&
   if (( ${#f[@]} == 1 )) && [[ -d "${f[0]}" ]] ; then
     mv "$temp"/*/* "$dest"
@@ -63,10 +66,10 @@ for FEATURE_VERSION in 8 11; do
       else
         echo "using tar"
         if [ x$OS = xmac -a x$STRIP_MAC_APP_BUNDLING = xtrue ]; then
-          tar --strip-components=3 -C "${JREDIR}" -zxf "${TARFILE}" "*/Contents/Home"
+          $TAR --strip-components=3 -C "${JREDIR}" -zxf "${TARFILE}" "*/Contents/Home"
           RET=$?
         else
-          tar --strip-components=1 -C "${JREDIR}" -zxf "${TARFILE}"
+          $TAR --strip-components=1 -C "${JREDIR}" -zxf "${TARFILE}"
           RET=$?
         fi
       fi
@@ -87,14 +90,14 @@ for FEATURE_VERSION in 8 11; do
               ZIPFILE="${ABSARCHIVEDIR}/${NAME}.${CREATEARCHIVE}"
               [ -e "${ZIPFILE}" ] && $RM "${ZIPFILE}"
               cd ${NAME}
-              zip -X -r "${ZIPFILE}" "${IMAGE_TYPE}"
+              $ZIP -X -r "${ZIPFILE}" "${IMAGE_TYPE}"
               cd -
               ;;
             tgz)
               EXT=tar.gz
               echo "Creating ${NAME}.${EXT} for install4j bundling"
               [ \! -d ${ARCHIVEDIR} ] && mkdir -p "${ARCHIVEDIR}"
-              tar -C "${JREDIR}" -zcf "${ARCHIVEDIR}/${NAME}.${EXT}" .
+              $TAR -C "${JREDIR}" -zcf "${ARCHIVEDIR}/${NAME}.${EXT}" .
               ;;
             *)
               echo "Archiving as '${CREATEARCHIVE}' file not supported"
index 4f37185..961c5c0 100644 (file)
@@ -38,6 +38,7 @@
       <variable name="GETDOWN_ALT_DIR" value="alt" />
       <variable name="GETDOWN_INSTALL_DIR" value="install" />
       <variable name="INFO_PLIST_FILE_ASSOCIATIONS_FILE" value="file_associations_auto-Info_plist.xml" />
+      <variable name="UNIX_DESKTOP_ADDITIONS" value="Categories=Science;Biology;Java;" />
     </variables>
     <codeSigning macEnabled="true" macPkcs12File="${compiler:OSX_KEYSTORE}" />
   </application>
         <id>2350</id>
         <id>2450</id>
       </macStaticAssociationActions>
-      <infoPlist>${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")}</infoPlist>
-      <iconImageFiles>
-        <file path="${compiler:JALVIEW_DIR}/resources/images/JalviewLogo_Huge.png" />
-      </iconImageFiles>
-    </launcher>
-    <launcher name="${compiler:JALVIEW_NAME} package" id="1876" menuName="${compiler:sys.shortName} ${compiler:JALVIEW_VERSION}" fileset="1873">
-      <executable name="${compiler:sys.shortName}" iconSet="true" redirectStderr="false" failOnStderrOutput="false" executableMode="gui" changeWorkingDirectory="false" singleInstance="true" />
-      <java mainClass="jalview.bin.Launcher" vmParameters="-Dinstaller_template_version=${compiler:INSTALLER_TEMPLATE_VERSION}">
-        <classPath>
-          <scanDirectory location="${compiler:GETDOWN_DIST_DIR}" failOnError="false" />
-        </classPath>
-      </java>
-      <macStaticAssociationActions mode="selected">
-        <id>2350</id>
-        <id>2450</id>
-      </macStaticAssociationActions>
+      <desktopFile>${compiler:UNIX_DESKTOP_ADDITIONS}</desktopFile>
       <infoPlist>${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")}</infoPlist>
       <iconImageFiles>
         <file path="${compiler:JALVIEW_DIR}/resources/images/JalviewLogo_Huge.png" />
@@ -1076,42 +1062,6 @@ return console.askYesNo(message, true);
     </styles>
   </installerGui>
   <mediaSets>
-    <linuxDeb name="Jalview .deb Package" id="153" mediaFileName="jalview-${compiler:JALVIEW_VERSION}" dependencies="openjdk-8-jre" bzip="true" description="Jalview Desktop" maintainerEmail="help@jalview.org">
-      <excludedComponents>
-        <component id="1031" />
-        <component id="1155" />
-        <component id="1156" />
-        <component id="1276" />
-        <component id="2110" />
-      </excludedComponents>
-      <excludedLaunchers>
-        <launcher id="737" />
-      </excludedLaunchers>
-      <exclude>
-        <entry defaultFileset="true" />
-        <entry filesetId="734" />
-        <entry filesetId="880" />
-        <entry filesetId="882" />
-      </exclude>
-    </linuxDeb>
-    <linuxRPM name="Jalview RPM Package" id="570" mediaFileName="jalview-${compiler:JALVIEW_VERSION}" dependencies="java-1.8.0-openjdk" arch="noarch">
-      <excludedComponents>
-        <component id="1031" />
-        <component id="1155" />
-        <component id="1156" />
-        <component id="1276" />
-        <component id="2110" />
-      </excludedComponents>
-      <excludedLaunchers>
-        <launcher id="737" />
-      </excludedLaunchers>
-      <exclude>
-        <entry defaultFileset="true" />
-        <entry filesetId="734" />
-        <entry filesetId="880" />
-        <entry filesetId="882" />
-      </exclude>
-    </linuxRPM>
     <windows name="Windows x64 EXE Installer" id="743" mediaFileName="${compiler:sys.shortName}-${compiler:JALVIEW_VERSION}-${compiler:sys.platform}-java_${compiler:JAVA_INTEGER_VERSION}" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" customInstallBaseDir="~/AppData/Local">
       <excludedComponents>
         <component id="1155" />
@@ -1166,7 +1116,7 @@ return console.askYesNo(message, true);
         <symlink name="Uninstall Old Jalview (optional).app" target="Jalview.app/Contents/Resources/app/Uninstall Old Jalview.app" />
       </topLevelFiles>
     </macosArchive>
-    <unixInstaller name="Unix Shell Installer" id="1595" mediaFileName="${compiler:sys.shortName}-${compiler:JALVIEW_VERSION}-${compiler:sys.platform}-java_${compiler:JAVA_INTEGER_VERSION}" customInstallBaseDir="~/opt/">
+    <unixInstaller name="Linux x64 Shell Installer" id="1595" mediaFileName="${compiler:sys.shortName}-${compiler:JALVIEW_VERSION}-linux_x64-java_${compiler:JAVA_INTEGER_VERSION}" customInstallBaseDir="~/opt/">
       <excludedComponents>
         <component id="1155" />
         <component id="1156" />
@@ -1196,9 +1146,27 @@ return console.askYesNo(message, true);
         <entry filesetId="880" />
         <entry filesetId="882" />
         <entry filesetId="1873" />
+        <entry filesetId="2105" />
       </exclude>
-      <jreBundle jreBundleSource="preCreated" includedJre="${compiler:LINUX_JAVA_VM_TGZ}" manualJreEntry="true" />
+      <jreBundle includedJre="${compiler:LINUX_JAVA_VM_TGZ}" manualJreEntry="true" />
     </unixArchive>
+    <unixInstaller name="Unix Shell Installer" id="2639" mediaFileName="${compiler:sys.shortName}-${compiler:JALVIEW_VERSION}-${compiler:sys.platform}-java_${compiler:JAVA_INTEGER_VERSION}" customInstallBaseDir="~/opt/">
+      <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 includedJre="${compiler:LINUX_JAVA_VM_TGZ}" manualJreEntry="true" />
+    </unixInstaller>
   </mediaSets>
   <buildIds>
     <mediaSet refId="153" />
@@ -1208,5 +1176,6 @@ return console.askYesNo(message, true);
     <mediaSet refId="878" />
     <mediaSet refId="1595" />
     <mediaSet refId="1596" />
+    <mediaSet refId="2639" />
   </buildIds>
 </install4j>