JAL-3631 Allow -Pinstall4j_build_ids=MACOS-AARCH64-DMG for specific installer build...
authorBen Soares <b.soares@dundee.ac.uk>
Fri, 14 Jun 2024 09:40:37 +0000 (10:40 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Fri, 14 Jun 2024 09:40:37 +0000 (10:40 +0100)
build.gradle
gradle.properties
utils/channels/default/images/jalview_installer.png
utils/channels/develop/images/jalview_develop_installer.png
utils/channels/release/images/jalview_installer.png
utils/channels/test-release/images/jalview_installer.png
utils/dev_macos_install.sh
utils/install4j/install4j10_template.install4j

index 52ab39f..18276a2 100644 (file)
@@ -54,7 +54,7 @@ plugins {
   id 'eclipse'
   id "com.diffplug.gradle.spotless" version "3.28.0"
   id 'com.github.johnrengelman.shadow' version '6.0.0'
-  id 'com.install4j.gradle' version '10.0.3'
+  id 'com.install4j.gradle' version '10.0.8'
   id 'com.dorongold.task-tree' version '2.1.1' // only needed to display task dependency tree with  gradle task1 [task2 ...] taskTree
   id 'com.palantir.git-version' version '0.13.0' apply false
   id 'ru.vyarus.use-python' version '4.0.0'
@@ -2709,8 +2709,6 @@ install4j {
     install4jHomeDir = "/Applications/install4j.app/Contents/Resources/app"
   }
   installDir(file(install4jHomeDir))
-
-  mediaTypes = Arrays.asList(install4j_media_types.split(","))
 }
 
 
@@ -3004,11 +3002,18 @@ task installerFiles(type: com.install4j.gradle.Install4jTask) {
     'MACOSARCHIVE_X64_DMG_FILENAME': install4jmacOSArchiveX64DMGFilename,
     'MACOSARCHIVE_AARCH64_DMG_FILENAME': install4jmacOSArchiveAarch64DMGFilename,
     'MACOSARCHIVE_VOLUMEICON': install4jDMGVolumeIcon,
-    'INSTALLER_ICON': "${install4j_images_dir}/${install4j_installer_icon}",
-    'INSTALLER_MAC_ICON': "${install4j_images_dir}/${install4j_installer_mac_icon}",
-    'INSTALLER_WINDOWS_ICON': "${install4j_images_dir}/${install4j_installer_windows_icon}",
+    'INSTALLER_ICON': "${getdownImagesDir}/${install4j_installer_icon}",
+    'INSTALLER_MAC_ICON': "${getdownImagesDir}/${install4j_installer_mac_icon}",
+    'INSTALLER_WINDOWS_ICON': "${getdownImagesDir}/${install4j_installer_windows_icon}",
   ]
 
+  if (project.hasProperty("install4j_build_ids")) {
+    buildIds = Arrays.asList(install4j_build_ids.split(","))
+  } else if (project.hasProperty("install4j_media_types")) {
+    buildSelected = true
+    mediaTypes = Arrays.asList(install4j_media_types.split(","))
+  }
+
   def varNameMap = [
     'mac': 'MACOS',
     'windows': 'WINDOWS',
@@ -3035,7 +3040,6 @@ task installerFiles(type: com.install4j.gradle.Install4jTask) {
   //variables.each{k,v->println("${k}=${v}")}
 
   destination = "${jalviewDir}/${install4jBuildDir}"
-  buildSelected = true
 
   if (install4j_faster.equals("true") || CHANNEL.startsWith("LOCAL")) {
     faster = true
index 448cbdd..5183062 100644 (file)
@@ -143,7 +143,8 @@ install4j_installer_file_associations = file_associations_auto-install4j10.xml
 install4j_build_dir = build/install4j
 install4j_executable_name = jalviewg
 install4j_user_executable_name = jalviewu
-install4j_media_types = windows,macosArchive,unixArchive,unixInstaller
+#install4j_media_types = windows,macosArchive,unixArchive,unixInstaller
+#install4j_build_ids = WINDOWS-X64-EXE,MACOS-X64-DMG,MACOS-AARCH64-DMG,LINUX-X64-SH,LINUX-AARCH-SH,UNIX--SH,UNIX--TGZ
 install4j_faster = false
 install4j_application_categories = Science;Biology;Java;
 install4j_release_win_application_id = 6595-2347-1923-0725
index 231137e..b757813 100644 (file)
Binary files a/utils/channels/default/images/jalview_installer.png and b/utils/channels/default/images/jalview_installer.png differ
index 99b15da..e08bf6e 100644 (file)
Binary files a/utils/channels/develop/images/jalview_develop_installer.png and b/utils/channels/develop/images/jalview_develop_installer.png differ
index 231137e..b757813 100644 (file)
Binary files a/utils/channels/release/images/jalview_installer.png and b/utils/channels/release/images/jalview_installer.png differ
index 231137e..b757813 100644 (file)
Binary files a/utils/channels/test-release/images/jalview_installer.png and b/utils/channels/test-release/images/jalview_installer.png differ
index 1bdcc94..1e6885a 100755 (executable)
@@ -8,13 +8,13 @@ CHANNEL="LOCAL"
 DMG=build/install4j/11/Jalview_Local-TEST-macos-java_11.dmg
 GRADLE=""
 APPBASEOVERRIDEARG=""
-MEDIA=macosArchive
+BUILDID=MACOS-AARCH64-DMG
 CLEAN="clean"
 JAVA=11
 x=$(grep jalview.version= RELEASE)
 VERSION=${x#*=}
 
-while getopts ":i:n:a:c:d:go:m:j:l" opt; do
+while getopts ":i:n:a:c:d:go:b:j:l" opt; do
   case ${opt} in
     i)
       INSTALLERVOL="${OPTARG}"
@@ -37,8 +37,8 @@ while getopts ":i:n:a:c:d:go:m:j:l" opt; do
     o)
       APPBASEOVERRIDEARG="-Pgetdown_appbase_override=${OPTARG}"
       ;;
-    m)
-      MEDIA="${OPTARG}"
+    b)
+      BUILDID="${OPTARG}"
       ;;
     j)
       JAVA="${OPTARG}"
@@ -99,8 +99,8 @@ if [ -z $INSTALLERVOL ]; then
 fi
 
 if [ "${GRADLE}" = 1 ]; then
-  echo "Running: gradle ${CLEAN} installers -PCHANNEL="${CHANNEL}" -Pinstall4j_media_types="${MEDIA}" ${APPBASEOVERRIDEARG} -PJAVA_VERSION=${JAVA}"
-  gradle ${CLEAN} installers -PCHANNEL="${CHANNEL}" -Pinstall4j_media_types="${MEDIA}" ${APPBASEOVERRIDEARG} -PJAVA_VERSION=${JAVA}
+  echo "Running: gradle ${CLEAN} installers -PCHANNEL="${CHANNEL}" -Pinstall4j_build_ids="${BUILDID}" ${APPBASEOVERRIDEARG} -PJAVA_VERSION=${JAVA}"
+  gradle ${CLEAN} installers -PCHANNEL="${CHANNEL}" -Pinstall4j_build_ids="${BUILDID}" ${APPBASEOVERRIDEARG} -PJAVA_VERSION=${JAVA}
 else
   echo "Not running gradle installers"
 fi
index 08d9b1c..5c76953 100644 (file)
                 <property name="imageEdgeBorderWidth" type="int" value="2" />
                 <property name="imageFile">
                   <object class="com.install4j.api.beans.ExternalFile">
-                    <string>icon:${installer:sys.installerApplicationMode}_header.png</string>
+                    <string>${compiler:JALVIEW_DIR}/${compiler:INSTALLER_ICON}</string>
                   </object>
                 </property>
                 <property name="imageInsets">