JAL-3594 New way for build.gradle to override properties with channel based propertie...
authorBen Soares <b.soares@dundee.ac.uk>
Thu, 3 Dec 2020 22:51:23 +0000 (22:51 +0000)
committerBen Soares <b.soares@dundee.ac.uk>
Thu, 3 Dec 2020 22:51:23 +0000 (22:51 +0000)
61 files changed:
build.gradle
gradle.properties
resources/images/JalviewDevelopLogo_Huge.png [deleted file]
utils/channels/develop/channel_gradle.properties [new file with mode: 0644]
utils/channels/develop/getdown/resource/jalview_develop_getdown_background.png [new file with mode: 0644]
utils/channels/develop/getdown/resource/jalview_develop_getdown_background_error.png [new file with mode: 0644]
utils/channels/develop/getdown/resource/jalview_develop_getdown_background_initialising.png [new file with mode: 0644]
utils/channels/develop/getdown/resource/jalview_develop_getdown_progress_bar.png [moved from utils/getdown/develop/jalview_logo_background_getdown-progress.png with 52% similarity]
utils/channels/develop/getdown/resource/jalview_develop_logo.png [moved from utils/getdown/develop/Jalview-Logo.png with 100% similarity]
utils/channels/develop/images/jalview_develop_getdown_background.png [new file with mode: 0644]
utils/channels/develop/images/jalview_develop_getdown_background_error.png [new file with mode: 0644]
utils/channels/develop/images/jalview_develop_getdown_background_initialising.png [new file with mode: 0644]
utils/channels/develop/images/jalview_develop_getdown_progress_bar.png [new file with mode: 0644]
utils/channels/develop/images/jalview_develop_logo.icns [moved from utils/install4j/develop/jalview_logos.icns with 100% similarity]
utils/channels/develop/images/jalview_develop_logo.ico [moved from utils/install4j/develop/jalview_logos.ico with 100% similarity]
utils/channels/develop/images/jalview_develop_logo.png [moved from utils/install4j/develop/Jalview-Logo.png with 100% similarity]
utils/channels/develop/install4j/jalview_develop_logo.icns [new file with mode: 0644]
utils/channels/develop/install4j/jalview_develop_logo.ico [new file with mode: 0644]
utils/channels/develop/install4j/jalview_develop_logo.png [moved from utils/install4j/develop/jalview_develop/jalview_logos_512x512x32.png with 100% similarity]
utils/channels/develop/jalview_develop_logo.svg [moved from utils/install4j/develop/jalview_develop/JalviewDevelopLogo.svg with 100% similarity]
utils/channels/develop/resources/channel_properties [moved from utils/channels/develop_properties with 100% similarity]
utils/channels/develop/resources/images/jalview_develop_logo-128.png [moved from utils/install4j/develop/jalview_develop/jalview_logos_128x128x32.png with 100% similarity]
utils/channels/develop/resources/images/jalview_develop_logo-16.png [moved from utils/install4j/develop/jalview_develop/jalview_logos_16x16x32.png with 100% similarity]
utils/channels/develop/resources/images/jalview_develop_logo-256.png [moved from utils/install4j/develop/jalview_develop/jalview_logos_256x256x32.png with 100% similarity]
utils/channels/develop/resources/images/jalview_develop_logo-32.png [moved from utils/install4j/develop/jalview_develop/jalview_logos_32x32x32.png with 100% similarity]
utils/channels/develop/resources/images/jalview_develop_logo-48.png [moved from utils/install4j/develop/jalview_develop/jalview_logos_48x48x32.png with 100% similarity]
utils/channels/develop/resources/images/jalview_develop_logo-512.png [new file with mode: 0644]
utils/channels/develop/resources/images/jalview_develop_logo-64.png [new file with mode: 0644]
utils/channels/release/channel_properties [new file with mode: 0644]
utils/channels/release/images/jalview_banner.png [new file with mode: 0644]
utils/channels/release/images/jalview_logo-128.png [new file with mode: 0644]
utils/channels/release/images/jalview_logo-16.png [new file with mode: 0644]
utils/channels/release/images/jalview_logo-256.png [new file with mode: 0644]
utils/channels/release/images/jalview_logo-32.png [new file with mode: 0644]
utils/channels/release/images/jalview_logo-48.png [new file with mode: 0644]
utils/channels/release/images/jalview_logo-512.png [new file with mode: 0644]
utils/channels/release/images/jalview_logo-64.png [new file with mode: 0644]
utils/channels/release/temp/jalview_logo-128.png [new file with mode: 0644]
utils/channels/release/temp/jalview_logo-16.png [new file with mode: 0644]
utils/channels/release/temp/jalview_logo-256.png [new file with mode: 0644]
utils/channels/release/temp/jalview_logo-32.png [new file with mode: 0644]
utils/channels/release/temp/jalview_logo-48.png [new file with mode: 0644]
utils/channels/release/temp/jalview_logo-512.png [new file with mode: 0644]
utils/channels/release/temp/jalview_logo-64.png [new file with mode: 0644]
utils/channels/release_properties [deleted file]
utils/create_iconfiles.sh [new file with mode: 0755]
utils/getdown/develop/jalview_logo_background_blur-640x480.xcf [deleted file]
utils/getdown/develop/jalview_logo_background_getdown-640x480.png [deleted file]
utils/getdown/develop/jalview_logo_background_getdown-progress3.xcf [deleted file]
utils/getdown/develop/jalview_logo_background_getdown_error-640x480.png [deleted file]
utils/getdown/develop/jalview_logo_background_getdown_instant-640x480.png [deleted file]
utils/getdown/develop/jalview_logos.icns [deleted file]
utils/install4j/README-DMG_background_image_creation.md [moved from utils/install4j/DMG_background_image_creation_README.md with 100% similarity]
utils/install4j/README-DMG_creation.md [moved from utils/install4j/DMG_creation_README.md with 100% similarity]
utils/install4j/README_convert_PNG_to_ICNS_and_ICO [new file with mode: 0644]
utils/install4j/develop/README_convert_PNG_to_ICNS_and_ICO [deleted file]
utils/install4j/install4j8_template.install4j
utils/install4j/jalview_logo.icns [new file with mode: 0644]
utils/install4j/jalview_logo.ico [new file with mode: 0644]
utils/install4j/jalview_logos.icns [deleted file]
utils/install4j/jalview_logos.ico [deleted file]

index f9d2974..bdc50d0 100644 (file)
@@ -57,24 +57,12 @@ def string(Object o) {
   return o == null ? "" : o.toString()
 }
 
-
-ext {
-  jalviewDirAbsolutePath = file(jalviewDir).getAbsolutePath()
-  jalviewDirRelativePath = jalviewDir
-
-  // local build environment properties
-  // can be "projectDir/local.properties"
-  def localProps = "${projectDir}/local.properties"
-  def propsFile = null;
-  if (file(localProps).exists()) {
-    propsFile = localProps
-  }
-  // or "../projectDir_local.properties"
-  def dirLocalProps = projectDir.getParent() + "/" + projectDir.getName() + "_local.properties"
-  if (file(dirLocalProps).exists()) {
-    propsFile = dirLocalProps
+def overrideProperties(def propsFileName) {
+  if (propsFileName == null) {
+    return
   }
-  if (propsFile != null) {
+  def propsFile = file(propsFileName)
+  if (propsFile != null && propsFile.exists()) {
     try {
       def p = new Properties()
       def localPropsFIS = new FileInputStream(propsFile)
@@ -82,18 +70,40 @@ ext {
       localPropsFIS.close()
       p.each {
         key, val -> 
-          def oldval = findProperty(key)
-          setProperty(key, val)
-          if (oldval != null) {
+          def oldval
+          if (project.hasProperty(key)) {
+            oldval = project.findProperty(key)
+            project.setProperty(key, val)
             println("Overriding property '${key}' ('${oldval}') with ${file(propsFile).getName()} value '${val}'")
           } else {
-            println("Setting unknown property '${key}' with ${file(propsFile).getName()}s value '${val}'")
+            ext.setProperty(key, val)
+            println("Setting ext property '${key}' with ${file(propsFile).getName()}s value '${val}'")
           }
+          //true
       }
     } catch (Exception e) {
-      System.out.println("Exception reading local.properties")
+      println("Exception reading local.properties")
+      e.printStackTrace()
     }
   }
+}
+
+ext {
+  jalviewDirAbsolutePath = file(jalviewDir).getAbsolutePath()
+  jalviewDirRelativePath = jalviewDir
+
+  getdownChannelName = CHANNEL.toLowerCase()
+  // default to "release". Currently only has different cosmetics for "develop", "release"
+  propertiesChannelName = getdownChannelName == "develop" ? getdownChannelName : "release"
+  // Import channel_properties
+  channelDir = string("${jalviewDir}/${channel_properties_dir}/${propertiesChannelName}")
+  channelGradleProperties = string("${channelDir}/channel_gradle.properties")
+  overrideProperties(channelGradleProperties)
+  // local build environment properties
+  // can be "projectDir/local.properties"
+  overrideProperties("${projectDir}/local.properties")
+  // or "../projectDir_local.properties"
+  overrideProperties(projectDir.getParent() + "/" + projectDir.getName() + "_local.properties")
 
   ////  
   // Import releaseProps from the RELEASE file
@@ -172,19 +182,14 @@ ext {
 
   getdownWebsiteDir = string("${jalviewDir}/${getdown_website_dir}/${JAVA_VERSION}")
   buildDist = true
+  buildProperties = null
 
   // the following values might be overridden by the CHANNEL switch
-  channelPropertiesFile = string("${channel_properties_dir}/release_properties")
-  getdownChannelName = CHANNEL.toLowerCase()
   getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
   getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
   getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher}")
   getdownAppDistDir = getdown_app_dir_alt
-  buildProperties = string("${resourceDir}/${build_properties_file}")
-  getdownImagesDir = getdown_images_dir
-  getdownBgColour = "FFFFFF"
-  getdownFgColour = "000000"
-  getdownLightFgColour = "000066"
+  getdownImagesDir = string("${jalviewDir}/${getdown_images_dir}")
   reportRsyncCommand = false
   jvlChannelName = CHANNEL.toLowerCase()
   install4jSuffix = CHANNEL.substring(0, 1).toUpperCase() + CHANNEL.substring(1).toLowerCase(); // BUILD -> Build
@@ -193,9 +198,9 @@ ext {
   install4jInstallerName = "${jalview_name} Non-Release Installer"
   install4jExecutableName = jalview_name.replaceAll("[^\\w]+", "_").toLowerCase()
   install4jExtraScheme = "jalviewx"
-  install4jMacIconsFile = string("${install4j_utils_dir}/${install4j_mac_icons_file}")
-  install4jWindowsIconsFile = string("${install4j_utils_dir}/${install4j_windows_icons_file}")
-  install4jPngIconFile = string("${install4j_utils_dir}/${install4j_png_icon_file}")
+  install4jMacIconsFile = string("${install4j_images_dir}/${install4j_mac_icons_file}")
+  install4jWindowsIconsFile = string("${install4j_images_dir}/${install4j_windows_icons_file}")
+  install4jPngIconFile = string("${install4j_images_dir}/${install4j_png_icon_file}")
   switch (CHANNEL) {
 
     case "BUILD":
@@ -258,19 +263,11 @@ ext {
     // DEVELOP-RELEASE is usually associated with a Jalview release series so set the version
     JALVIEW_VERSION=JALVIEW_VERSION+"-develop"
     
-    channelPropertiesFile = string("${channel_properties_dir}/develop_properties")
-    getdownImagesDir = "${getdown_images_dir}/develop"
-    getdownBgColour = "000000"
-    getdownFgColour = "FFFFFF"
-    getdownLightFgColour = "CCCCFF"
     install4jSuffix = "Develop"
     install4jDSStore = "DS_Store-DEVELOP"
     install4jDMGBackgroundImage = "jalview_dmg_background-DEVELOP.png"
     install4jExtraScheme = "jalviewd"
     install4jInstallerName = "${jalview_name} Develop Installer"
-    install4jMacIconsFile = string("${install4j_utils_dir}/develop/${install4j_mac_icons_file}")
-    install4jWindowsIconsFile = string("${install4j_utils_dir}/develop/${install4j_windows_icons_file}")
-    install4jPngIconFile = string("${install4j_utils_dir}/develop/${install4j_png_icon_file}")
     break
 
     case "TEST-RELEASE":
@@ -327,7 +324,13 @@ ext {
   }
   // override getdownAppBase if requested
   if (findProperty("getdown_appbase_override") != null) {
-    getdownAppBase = string(getProperty("getdown_appbase_override"))
+    // revert to LOCAL if empty string
+    if (string(getdown_appbase_override) == "") {
+      getdownAppBase = file(getdownWebsiteDir).toURI().toString()
+      getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
+    } else {
+      getdownAppBase = string(getdown_appbase_override)
+    }
     println("Overriding getdown appbase with '${getdownAppBase}'")
   }
   // sanitise file name for jalview launcher file for this channel
@@ -458,7 +461,9 @@ ext {
   helpBuildDir = string("${resourceBuildDir}/help_build")
   docBuildDir = string("${resourceBuildDir}/doc_build")
 
-  buildProperties = string("${resourcesBuildDir}/${build_properties_file}")
+  if (buildProperties == null) {
+    buildProperties = string("${resourcesBuildDir}/${build_properties_file}")
+  }
   buildingHTML = string("${jalviewDir}/${doc_dir}/building.html")
   helpParentDir = string("${jalviewDir}/${help_parent_dir}")
   helpSourceDir = string("${helpParentDir}/${help_dir}")
@@ -1186,6 +1191,9 @@ task copyHelp(type: Copy) {
 
 
 task copyResources(type: Copy) {
+  group = "build"
+  description = "Copy (and make text substitutions in) the resources dir to the build area"
+
   def inputDir = resourceDir
   def outputDir = resourcesBuildDir
   from(inputDir) {
@@ -1213,11 +1221,19 @@ task copyResources(type: Copy) {
   inputs.dir(inputDir)
   outputs.dir(outputDir)
 }
-task copyChannelProperties(type: Copy) {
-  def propsFile = file(channelPropertiesFile)
-  rename(propsFile.getName(), "channel_properties")
-  from channelPropertiesFile
-  into resourceDir
+
+task copyChannelResources(type: Copy) {
+  dependsOn copyResources
+  group = "build"
+  description = "Copy the channel resources dir to the build resources area"
+
+  def inputDir = "${channelDir}/${resource_dir}"
+  def outputDir = resourcesBuildDir
+  from inputDir
+  into outputDir
+
+  inputs.dir(inputDir)
+  outputs.dir(outputDir)
 }
 
 task createBuildProperties(type: WriteProperties) {
@@ -1262,6 +1278,7 @@ task prepare {
   dependsOn copyDocs
   dependsOn copyHelp
   dependsOn createBuildProperties
+  dependsOn copyChannelResources
   dependsOn convertMdFiles
   dependsOn buildIndices
 }
@@ -1487,9 +1504,6 @@ task getdownWebsite() {
       props.put("getdown_txt_ui.progress_image", "${getdownImagesDir}/${getdown_progress_image}")
       props.put("getdown_txt_ui.icon", "${getdownImagesDir}/${getdown_icon}")
       props.put("getdown_txt_ui.mac_dock_icon", "${getdownImagesDir}/${getdown_mac_dock_icon}")
-      props.put("getdown_txt_ui.background", getdownBgColour)
-      props.put("getdown_txt_ui.progress_text", getdownFgColour)
-      props.put("getdown_txt_ui.status_text", getdownLightFgColour)
     }
 
     props.put("getdown_txt_title", jalview_name)
index d681630..69273fc 100644 (file)
@@ -74,7 +74,7 @@ getdown_background_image = jalview_logo_background_getdown-640x480.png
 getdown_instant_background_image = jalview_logo_background_getdown_instant-640x480.png
 getdown_error_background = jalview_logo_background_getdown_error-640x480.png
 getdown_progress_image = jalview_logo_background_getdown-progress.png
-getdown_mac_dock_icon = jalview_logos.icns
+getdown_mac_dock_icon = jalview_logo.icns
 getdown_icon = Jalview-Logo.png
 getdown_txt_allow_offline = true
 getdown_txt_max_concurrent_downloads = 10
@@ -88,7 +88,7 @@ getdown_txt_ui.progress_sync_after_shown = false
 getdown_txt_ui.keep_on_top = true
 getdown_txt_ui.display_appbase = true
 getdown_txt_ui.display_version = true
-getdown_txt_ui.min_show_seconds = 6
+getdown_txt_ui.min_show_seconds = 8
 getdown_txt_ui.background = FFFFFF
 getdown_txt_ui.progress = 20, 440, 600, 22
 getdown_txt_ui.progress_bar = AAAAFF
@@ -117,6 +117,7 @@ install4j_home_dir = ~/buildtools/install4j8
 install4j_copyright_message = ...
 install4j_bundle_id = org.jalview.jalview-desktop
 install4j_utils_dir = utils/install4j
+install4j_images_dir = utils/install4j
 install4j_template = install4j8_template.install4j
 install4j_info_plist_file_associations = file_associations_auto-Info_plist.xml
 install4j_installer_file_associations = file_associations_auto-install4j8.xml
@@ -126,8 +127,8 @@ install4j_media_types = windows,macosArchive,unixArchive,unixInstaller
 install4j_faster = false
 install4j_application_categories = Science;Biology;Java;
 install4j_release_win_application_id = 6595-2347-1923-0725
-install4j_mac_icons_file = jalview_logos.icns
-install4j_windows_icons_file = jalview_logos.ico
+install4j_mac_icons_file = jalview_logo.icns
+install4j_windows_icons_file = jalview_logo.ico
 install4j_png_icon_file = Jalview-Logo.png
 
 OSX_KEYSTORE =
diff --git a/resources/images/JalviewDevelopLogo_Huge.png b/resources/images/JalviewDevelopLogo_Huge.png
deleted file mode 100644 (file)
index 7c15561..0000000
Binary files a/resources/images/JalviewDevelopLogo_Huge.png and /dev/null differ
diff --git a/utils/channels/develop/channel_gradle.properties b/utils/channels/develop/channel_gradle.properties
new file mode 100644 (file)
index 0000000..3a4c78e
--- /dev/null
@@ -0,0 +1,31 @@
+# These properties will be read into the build.gradle REPLACING any properties with the same name in gradle.properties
+# BEFORE local_properties is read
+# The purpose of this is to change cosmetic/themed items, and use the channel specific channels_properties file in Jalview
+getdown_images_dir = utils/channels/develop/images
+getdown_background_image = jalview_develop_getdown_background.png
+getdown_instant_background_image = jalview_develop_getdown_background_initialising.png
+getdown_error_background = jalview_develop_getdown_background_error.png
+getdown_progress_image = jalview_develop_getdown_progress_bar.png
+getdown_mac_dock_icon = jalview_develop_logo.icns
+getdown_icon = jalview_develop_logo.png
+getdown_txt_allow_offline = true
+getdown_txt_max_concurrent_downloads = 10
+getdown_txt_ui.background = 000000
+getdown_txt_ui.progress = 0, 473, 640, 7
+getdown_txt_ui.progress_bar = AAAA00
+getdown_txt_ui.progress_text = 000000
+getdown_txt_ui.hide_progress_text = true
+getdown_txt_ui.status = 21, 178, 273, 194
+getdown_txt_ui.status_text = C0C0C0
+getdown_txt_ui.hide_decorations = true
+getdown_txt_ui.install_error = https://www.jalview.org/faq/getdownerror
+getdown_alt_java8_min_version  = 01080000
+getdown_alt_java8_max_version  = 01089999
+getdown_alt_java11_min_version = 11000000
+getdown_alt_java11_max_version =
+#getdown_alt_java11_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre11.jar,[linux-amd64] /getdown/jre/linux-jre11.jar,[mac os x] /getdown/jre/macos-jre11.jar
+install4j_utils_dir = utils/install4j
+install4j_images_dir = utils/channels/develop/images
+install4j_mac_icons_file = jalview_develop_logo.icns
+install4j_windows_icons_file = jalview_develop_logo.ico
+install4j_png_icon_file = jalview_develop_logo.png
diff --git a/utils/channels/develop/getdown/resource/jalview_develop_getdown_background.png b/utils/channels/develop/getdown/resource/jalview_develop_getdown_background.png
new file mode 100644 (file)
index 0000000..d6eb276
Binary files /dev/null and b/utils/channels/develop/getdown/resource/jalview_develop_getdown_background.png differ
diff --git a/utils/channels/develop/getdown/resource/jalview_develop_getdown_background_error.png b/utils/channels/develop/getdown/resource/jalview_develop_getdown_background_error.png
new file mode 100644 (file)
index 0000000..3001f46
Binary files /dev/null and b/utils/channels/develop/getdown/resource/jalview_develop_getdown_background_error.png differ
diff --git a/utils/channels/develop/getdown/resource/jalview_develop_getdown_background_initialising.png b/utils/channels/develop/getdown/resource/jalview_develop_getdown_background_initialising.png
new file mode 100644 (file)
index 0000000..b264ee5
Binary files /dev/null and b/utils/channels/develop/getdown/resource/jalview_develop_getdown_background_initialising.png differ
similarity index 52%
rename from utils/getdown/develop/jalview_logo_background_getdown-progress.png
rename to utils/channels/develop/getdown/resource/jalview_develop_getdown_progress_bar.png
index 05ac4a8..3b1cfe1 100644 (file)
Binary files a/utils/getdown/develop/jalview_logo_background_getdown-progress.png and b/utils/channels/develop/getdown/resource/jalview_develop_getdown_progress_bar.png differ
diff --git a/utils/channels/develop/images/jalview_develop_getdown_background.png b/utils/channels/develop/images/jalview_develop_getdown_background.png
new file mode 100644 (file)
index 0000000..d6eb276
Binary files /dev/null and b/utils/channels/develop/images/jalview_develop_getdown_background.png differ
diff --git a/utils/channels/develop/images/jalview_develop_getdown_background_error.png b/utils/channels/develop/images/jalview_develop_getdown_background_error.png
new file mode 100644 (file)
index 0000000..3001f46
Binary files /dev/null and b/utils/channels/develop/images/jalview_develop_getdown_background_error.png differ
diff --git a/utils/channels/develop/images/jalview_develop_getdown_background_initialising.png b/utils/channels/develop/images/jalview_develop_getdown_background_initialising.png
new file mode 100644 (file)
index 0000000..b264ee5
Binary files /dev/null and b/utils/channels/develop/images/jalview_develop_getdown_background_initialising.png differ
diff --git a/utils/channels/develop/images/jalview_develop_getdown_progress_bar.png b/utils/channels/develop/images/jalview_develop_getdown_progress_bar.png
new file mode 100644 (file)
index 0000000..3b1cfe1
Binary files /dev/null and b/utils/channels/develop/images/jalview_develop_getdown_progress_bar.png differ
diff --git a/utils/channels/develop/install4j/jalview_develop_logo.icns b/utils/channels/develop/install4j/jalview_develop_logo.icns
new file mode 100644 (file)
index 0000000..ceab689
Binary files /dev/null and b/utils/channels/develop/install4j/jalview_develop_logo.icns differ
diff --git a/utils/channels/develop/install4j/jalview_develop_logo.ico b/utils/channels/develop/install4j/jalview_develop_logo.ico
new file mode 100644 (file)
index 0000000..76e6dd6
Binary files /dev/null and b/utils/channels/develop/install4j/jalview_develop_logo.ico differ
diff --git a/utils/channels/develop/resources/images/jalview_develop_logo-512.png b/utils/channels/develop/resources/images/jalview_develop_logo-512.png
new file mode 100644 (file)
index 0000000..9a6a135
Binary files /dev/null and b/utils/channels/develop/resources/images/jalview_develop_logo-512.png differ
diff --git a/utils/channels/develop/resources/images/jalview_develop_logo-64.png b/utils/channels/develop/resources/images/jalview_develop_logo-64.png
new file mode 100644 (file)
index 0000000..55a3f12
Binary files /dev/null and b/utils/channels/develop/resources/images/jalview_develop_logo-64.png differ
diff --git a/utils/channels/release/channel_properties b/utils/channels/release/channel_properties
new file mode 100644 (file)
index 0000000..e48375a
--- /dev/null
@@ -0,0 +1,11 @@
+channel.app_name=Jalview
+channel.banner=images/jalview_banner.png
+channel.logo.512=images/jalview_logo-512.png
+channel.logo.256=images/jalview_logo-256.png
+channel.logo.128=images/jalview_logo-128.png
+channel.logo.64=images/jalview_logo-64.png
+channel.logo.48=images/jalview_logo-48.png
+channel.logo.32=images/jalview_logo-32.png
+channel.logo.16=images/jalview_logo-16.png
+channel.rotatable_logo.48=images/rotatable_jalview_logo-48.png
+channel.default_appbase=https://www.jalview.org/getdown/release/1.8
diff --git a/utils/channels/release/images/jalview_banner.png b/utils/channels/release/images/jalview_banner.png
new file mode 100644 (file)
index 0000000..8e35408
Binary files /dev/null and b/utils/channels/release/images/jalview_banner.png differ
diff --git a/utils/channels/release/images/jalview_logo-128.png b/utils/channels/release/images/jalview_logo-128.png
new file mode 100644 (file)
index 0000000..63fa253
Binary files /dev/null and b/utils/channels/release/images/jalview_logo-128.png differ
diff --git a/utils/channels/release/images/jalview_logo-16.png b/utils/channels/release/images/jalview_logo-16.png
new file mode 100644 (file)
index 0000000..9a1adfb
Binary files /dev/null and b/utils/channels/release/images/jalview_logo-16.png differ
diff --git a/utils/channels/release/images/jalview_logo-256.png b/utils/channels/release/images/jalview_logo-256.png
new file mode 100644 (file)
index 0000000..6963612
Binary files /dev/null and b/utils/channels/release/images/jalview_logo-256.png differ
diff --git a/utils/channels/release/images/jalview_logo-32.png b/utils/channels/release/images/jalview_logo-32.png
new file mode 100644 (file)
index 0000000..7af5791
Binary files /dev/null and b/utils/channels/release/images/jalview_logo-32.png differ
diff --git a/utils/channels/release/images/jalview_logo-48.png b/utils/channels/release/images/jalview_logo-48.png
new file mode 100644 (file)
index 0000000..297e6cc
Binary files /dev/null and b/utils/channels/release/images/jalview_logo-48.png differ
diff --git a/utils/channels/release/images/jalview_logo-512.png b/utils/channels/release/images/jalview_logo-512.png
new file mode 100644 (file)
index 0000000..340f8e5
Binary files /dev/null and b/utils/channels/release/images/jalview_logo-512.png differ
diff --git a/utils/channels/release/images/jalview_logo-64.png b/utils/channels/release/images/jalview_logo-64.png
new file mode 100644 (file)
index 0000000..2505ae9
Binary files /dev/null and b/utils/channels/release/images/jalview_logo-64.png differ
diff --git a/utils/channels/release/temp/jalview_logo-128.png b/utils/channels/release/temp/jalview_logo-128.png
new file mode 100644 (file)
index 0000000..63fa253
Binary files /dev/null and b/utils/channels/release/temp/jalview_logo-128.png differ
diff --git a/utils/channels/release/temp/jalview_logo-16.png b/utils/channels/release/temp/jalview_logo-16.png
new file mode 100644 (file)
index 0000000..9a1adfb
Binary files /dev/null and b/utils/channels/release/temp/jalview_logo-16.png differ
diff --git a/utils/channels/release/temp/jalview_logo-256.png b/utils/channels/release/temp/jalview_logo-256.png
new file mode 100644 (file)
index 0000000..6963612
Binary files /dev/null and b/utils/channels/release/temp/jalview_logo-256.png differ
diff --git a/utils/channels/release/temp/jalview_logo-32.png b/utils/channels/release/temp/jalview_logo-32.png
new file mode 100644 (file)
index 0000000..7af5791
Binary files /dev/null and b/utils/channels/release/temp/jalview_logo-32.png differ
diff --git a/utils/channels/release/temp/jalview_logo-48.png b/utils/channels/release/temp/jalview_logo-48.png
new file mode 100644 (file)
index 0000000..297e6cc
Binary files /dev/null and b/utils/channels/release/temp/jalview_logo-48.png differ
diff --git a/utils/channels/release/temp/jalview_logo-512.png b/utils/channels/release/temp/jalview_logo-512.png
new file mode 100644 (file)
index 0000000..340f8e5
Binary files /dev/null and b/utils/channels/release/temp/jalview_logo-512.png differ
diff --git a/utils/channels/release/temp/jalview_logo-64.png b/utils/channels/release/temp/jalview_logo-64.png
new file mode 100644 (file)
index 0000000..2505ae9
Binary files /dev/null and b/utils/channels/release/temp/jalview_logo-64.png differ
diff --git a/utils/channels/release_properties b/utils/channels/release_properties
deleted file mode 100644 (file)
index de94c3f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-app_name=Jalview
-about_logo=images/Jalview_Logo.png
-taskbar_icon=images/JalviewLogo_Huge.png
-default_channel_appbase=https://www.jalview.org/getdown/release/1.8
diff --git a/utils/create_iconfiles.sh b/utils/create_iconfiles.sh
new file mode 100755 (executable)
index 0000000..2eb3ff0
--- /dev/null
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+# given a list of differently sized png files with the size in the filename like this:
+# myiconfile-16.png myiconfile-32.png myiconfile-48.png myiconfile-64.png myiconfile-128.png myiconfile-256.png myiconfile-512.png
+# run
+# create_iconfiles.sh myiconfile-*.png
+# to create an ICO file (for Windows) myiconfile.ico and an ICNS file (for macOS) myiconfile.icns
+
+BASENAME=${1%-*}
+if [ x$BASENAME = x ]; then
+  echo "Could not calculate basename from '${1}'"
+  exit 1
+fi
+
+ICOFILE=${BASENAME}.ico
+echo "Creating ${ICOFILE}"
+convert $* ${ICOFILE}
+
+ICNSFILE=${BASENAME}.icns
+echo "Creating ${ICNSFILE}"
+# dont' include 64x64 icon (for some reason they're not allowed in icns file)
+ICNSARGS=""
+for ARG in $*; do
+  NUM=${ARG##*-}
+  NUM=${NUM%px*}
+  NUM=${NUM%x*}
+  NUM=${NUM%.*}
+  if [ x$NUM != x64 ]; then
+    ICNSARGS="${ICNSARGS} $ARG"
+  fi
+done
+png2icns ${ICNSFILE} ${ICNSARGS}
diff --git a/utils/getdown/develop/jalview_logo_background_blur-640x480.xcf b/utils/getdown/develop/jalview_logo_background_blur-640x480.xcf
deleted file mode 100644 (file)
index d0f572d..0000000
Binary files a/utils/getdown/develop/jalview_logo_background_blur-640x480.xcf and /dev/null differ
diff --git a/utils/getdown/develop/jalview_logo_background_getdown-640x480.png b/utils/getdown/develop/jalview_logo_background_getdown-640x480.png
deleted file mode 100644 (file)
index 97be8b7..0000000
Binary files a/utils/getdown/develop/jalview_logo_background_getdown-640x480.png and /dev/null differ
diff --git a/utils/getdown/develop/jalview_logo_background_getdown-progress3.xcf b/utils/getdown/develop/jalview_logo_background_getdown-progress3.xcf
deleted file mode 100644 (file)
index d0223c5..0000000
Binary files a/utils/getdown/develop/jalview_logo_background_getdown-progress3.xcf and /dev/null differ
diff --git a/utils/getdown/develop/jalview_logo_background_getdown_error-640x480.png b/utils/getdown/develop/jalview_logo_background_getdown_error-640x480.png
deleted file mode 100644 (file)
index 27a933b..0000000
Binary files a/utils/getdown/develop/jalview_logo_background_getdown_error-640x480.png and /dev/null differ
diff --git a/utils/getdown/develop/jalview_logo_background_getdown_instant-640x480.png b/utils/getdown/develop/jalview_logo_background_getdown_instant-640x480.png
deleted file mode 100644 (file)
index 8bc46a6..0000000
Binary files a/utils/getdown/develop/jalview_logo_background_getdown_instant-640x480.png and /dev/null differ
diff --git a/utils/getdown/develop/jalview_logos.icns b/utils/getdown/develop/jalview_logos.icns
deleted file mode 100644 (file)
index af93cdd..0000000
Binary files a/utils/getdown/develop/jalview_logos.icns and /dev/null differ
diff --git a/utils/install4j/README_convert_PNG_to_ICNS_and_ICO b/utils/install4j/README_convert_PNG_to_ICNS_and_ICO
new file mode 100644 (file)
index 0000000..3d2dbf4
--- /dev/null
@@ -0,0 +1,22 @@
+## Creating the .ico (Windows) and .icns (macOS) files from PNG images in linux
+
+Create multiple square versions of your icon at the following resolutions:
+16x16, 32x32, 48x48, 64x64, 128x128, 256x256, 512x512
+
+> A quick way to do this with ImageMagick is create the 512x512 logo first, saved as logo-512.png, and run
+> `for n in 16 32 48 64 128 256; do convert -geometry ${n}x${n} logo-512.png logo-${n}.png; done`
+> but note that anitaliasing can make a logo look quite blurry, especially for small resolutions.  These should
+> then be hand edited (with e.g. gimp) to neaten the edges.  A nice trick in gimp is to use the Colours->Curves->Alpha
+> and create a curve that makes mostly transparent pixels completely transparent, and slightly transparent pixels
+> completely opaque.
+
+Then use the script `jalview/utils/create_iconfiles.sh` like this:
+```
+create_iconfiles.sh logo-*.png
+```
+and it will create both `logo.ico` and `logo.icns` containing the appropriate different resolution logos.
+It is then up to the OS to display the correct one in different circumstances.
+
+This script uses the utilities convert (ImageMagick) and png2icns (icnsutils) which should be installed and in the path.
+Note that for some reason ICNS files should not contain a 64x64 pixel version of a logo, so the script removes this
+as png2icns complains if it finds one!
diff --git a/utils/install4j/develop/README_convert_PNG_to_ICNS_and_ICO b/utils/install4j/develop/README_convert_PNG_to_ICNS_and_ICO
deleted file mode 100644 (file)
index 2477ac1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-convert jalview_logos_16x16x32.png jalview_logos_32x32x32.png jalview_logos_128x128x32.png jalview_logos_256x256x32.png jalview_logos_512x512x32.png ./jalview_logos.ico
-
-png2icns ./jalview_logos.icns jalview_logos_16x16x32.png jalview_logos_32x32x32.png jalview_logos_48x48x32.png jalview_logos_128x128x32.png jalview_logos_256x256x32.png jalview_logos_512x512x32.png
index 6de9b08..33e5d09 100644 (file)
@@ -48,8 +48,8 @@
       <variable name="UNIX_APPLICATION_FOLDER" value="jalview" />
       <variable name="EXECUTABLE_NAME" value="jalview" />
       <variable name="EXTRA_SCHEME" value="jalviewx" />
-      <variable name="MAC_ICONS_FILE" value="utils/install4j/jalview_logos.icns" />
-      <variable name="WINDOWS_ICONS_FILE" value="utils/install4j/jalview_logos.ico" />
+      <variable name="MAC_ICONS_FILE" value="utils/install4j/jalview_logo.icns" />
+      <variable name="WINDOWS_ICONS_FILE" value="utils/install4j/jalview_logo.ico" />
       <variable name="PNG_ICON_FILE" value="utils/install4j/Jalview-Logo.png" />
     </variables>
     <codeSigning macEnabled="true" macPkcs12File="${compiler:OSX_KEYSTORE}" />
diff --git a/utils/install4j/jalview_logo.icns b/utils/install4j/jalview_logo.icns
new file mode 100644 (file)
index 0000000..7f03345
Binary files /dev/null and b/utils/install4j/jalview_logo.icns differ
diff --git a/utils/install4j/jalview_logo.ico b/utils/install4j/jalview_logo.ico
new file mode 100644 (file)
index 0000000..1fe7f0f
Binary files /dev/null and b/utils/install4j/jalview_logo.ico differ
diff --git a/utils/install4j/jalview_logos.icns b/utils/install4j/jalview_logos.icns
deleted file mode 100644 (file)
index 6c2ee9a..0000000
Binary files a/utils/install4j/jalview_logos.icns and /dev/null differ
diff --git a/utils/install4j/jalview_logos.ico b/utils/install4j/jalview_logos.ico
deleted file mode 100644 (file)
index ba2ca82..0000000
Binary files a/utils/install4j/jalview_logos.ico and /dev/null differ