JAL-3394 A little streamlining and fixing of helper script
authorBen Soares <bsoares@dundee.ac.uk>
Fri, 14 Feb 2020 17:09:08 +0000 (17:09 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Fri, 14 Feb 2020 17:09:08 +0000 (17:09 +0000)
build.gradle
gradle.properties
utils/dev_macos_install.sh
utils/install4j/install4j8_template.install4j

index 84c38db..522ce38 100644 (file)
@@ -1227,6 +1227,14 @@ task copyInstall4jTemplate {
       }
     }
 
+    // turn off checksum creation for LOCAL channel
+    def e = install4jConfigXml.application[0]
+    if (CHANNEL == "LOCAL") {
+      e.'@createChecksums' = "false"
+    } else {
+      e.'@createChecksums' = "true"
+    }
+
     // put file association actions where placeholder action is
     def install4jFileAssociationsText = install4jFileAssociationsFile.text
     def fileAssociationActions = new XmlParser().parseText("<actions>${install4jFileAssociationsText}</actions>")
@@ -1279,6 +1287,7 @@ task installers(type: com.install4j.gradle.Install4jTask) {
   def install4jBuildDir = "${install4j_build_dir}/${JAVA_VERSION}"
 
   variables = [
+    'JALVIEW_NAME': getdown_txt_title,
     'JALVIEW_DIR': "../..",
     'OSX_KEYSTORE': OSX_KEYSTORE,
     'JSIGN_SH': JSIGN_SH,
@@ -1298,6 +1307,7 @@ task installers(type: com.install4j.gradle.Install4jTask) {
     'LINUX_JAVA_VM_TGZ': linuxJavaVMTgz,
     'COPYRIGHT_MESSAGE': install4j_copyright_message,
     'MACOS_BUNDLE_ID': install4j_macOS_bundle_id,
+    'INSTALLER_NAME': install4j_installer_name,
     'INSTALL4J_UTILS_DIR': install4j_utils_dir,
     'GETDOWN_WEBSITE_DIR': getdown_website_dir,
     'GETDOWN_FILES_DIR': getdown_files_dir,
@@ -1312,8 +1322,7 @@ task installers(type: com.install4j.gradle.Install4jTask) {
   destination = "${jalviewDir}/${install4jBuildDir}"
   buildSelected = true
 
-  if (install4j_faster.equals("true") || CHANNEL.startsWith("DEVELOP") || CHANNEL.startsWith("LOCAL")) {
-    // this doesn't seem to work
+  if (install4j_faster.equals("true") || CHANNEL.startsWith("LOCAL")) {
     faster = true
     disableSigning = true
   }
index 51a37ac..c1aece3 100644 (file)
@@ -63,7 +63,6 @@ getdown_launcher_new = getdown-launcher-new.jar
 getdown_core = getdown/lib/getdown-core.jar
 getdown_launch_jvl = channel_launch.jvl
 getdown_build_properties = build_properties
-getdown_txt_title = Jalview
 getdown_txt_allow_offline = true
 getdown_txt_max_concurrent_downloads = 10
 # now got better defaults when not set
@@ -118,6 +117,7 @@ install4j_installer_file_associations = file_associations_auto-install4j8.xml
 install4j_build_dir = build/install4j
 install4j_media_types = windows,macosArchive,linuxRPM,linuxDeb,unixArchive,unixInstaller
 install4j_faster = false
+install4j_installer_name = Jalview Installer
 
 OSX_KEYSTORE =
 OSX_KEYPASS =
index d75bf58..6f17315 100755 (executable)
@@ -9,7 +9,7 @@ CHANNEL=NOCHANNEL
 DMG=build/install4j/11/Jalview-OFFLINE_macos-app_DEVELOPMENT-j11.dmg
 
 if [ x$1 != "xnogradle" ]; then
-  gradle installers -Pgetdown_channel_name=NOCHANNEL -Pinstall4jMediaTypes=macosArchive -Pgetdown_local=true -Pdev=true
+  gradle installers -PCHANNEL=LOCAL -Pinstall4j_media_types=macosArchive
 else
   echo "Not running gradle installers"
 fi
index 321abc4..f7cab3d 100644 (file)
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <install4j version="8.0.4" transformSequenceNumber="8">
   <directoryPresets config="." />
-  <application name="Jalview" applicationId="6595-2347-1923-0725" mediaDir="${compiler:BUILD_DIR}" lzmaCompression="true" shortName="Jalview" 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_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 />
       <envVar name="JAVA_HOME" />
     </searchSequence>
     <variables>
+      <variable name="JALVIEW_NAME" value="Jalview" />
       <variable name="JALVIEW_DIR" value="../.." />
       <variable name="BUILD_DIR" value="${compiler:JALVIEW_DIR}/build/install4j" />
       <variable name="OSX_KEYSTORE" />
@@ -28,6 +29,7 @@
       <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="INSTALLER_NAME" value="Jalview Installer" />
       <variable name="INSTALL4J_UTILS_DIR" value="utils/install4j" />
       <variable name="GETDOWN_WEBSITE_DIR" value="getdown/website" />
       <variable name="GETDOWN_FILES_DIR" value="getdown/files" />
   </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}">
-      <executable name="${compiler:sys.shortName}" iconSet="true" iconFile="${compiler:JALVIEW_DIR}/resources/images/jalview_logos.ico" redirectStdout="true" executableMode="gui" changeWorkingDirectory="false" workingDirectory="" singleInstance="true" checkConsoleParameter="true">
+      <executable name="${compiler:sys.shortName}" 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}" />
       </executable>
       <splashScreen width="640" height="480" bitmapFile="${compiler:JALVIEW_DIR}/resources/images/jalview_logo_background_fade-640x480.png" textOverlay="true">
       </splashScreen>
       <java mainClass="com.threerings.getdown.launcher.GetdownApp" vmParameters="-Dinstaller_template_version=${compiler:INSTALLER_TEMPLATE_VERSION}" arguments="${launcher:sys.launcherDirectory} jalview">
         <classPath>
-          <archive location="getdown-launcher.jar" failOnError="false" />
+          <archive location="getdown-launcher.jar" />
           <archive location="${compiler:GETDOWN_INSTALL_DIR}/getdown-launcher.jar" failOnError="false" />
         </classPath>
       </java>
         <file path="${compiler:JALVIEW_DIR}/resources/images/JalviewLogo_Huge.png" />
       </iconImageFiles>
     </launcher>
-    <launcher name="Jalview 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" workingDirectory="" singleInstance="true" />
+    <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" />
@@ -874,7 +876,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="Jalview" 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_NAME}" externalParametrizationMode="include">
                 <serializedBean>
                   <property name="enabledTitleText" type="boolean" value="false" />
                 </serializedBean>