From: gmungoc
Date: Fri, 12 Jul 2019 13:38:34 +0000 (+0100)
Subject: Merge branch 'develop' into features/JAL-3010ontologyFeatureSettings
X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Ffeatures%2FJAL-3010ontologyFeatureSettings;hp=d113749a183a3ea8f3f7e22c725511f59f1d833f;p=jalview.git
Merge branch 'develop' into features/JAL-3010ontologyFeatureSettings
Conflicts:
test/jalview/gui/AlignFrameTest.java
---
diff --git a/.gitignore b/.gitignore
index a2a64e7..46cc0e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,7 +19,7 @@ TESTNG
/site
/.gradle
/build
-/utils/HelpLinksChecker.out
+/utils/HelpLinksChecker.touch
/getdown/website
/getdown/full_app
/getdown/files
@@ -29,3 +29,4 @@ TESTNG
/utils/install4j/jalview-installers-*.install4j
*.swp
/bin
+/doc/building.html
diff --git a/JAVA-11-README b/JAVA-11-README
index 805a4c1..fabae31 100644
--- a/JAVA-11-README
+++ b/JAVA-11-README
@@ -1,3 +1,26 @@
+2019-07-01 (pre 2.11.0 release)
+Notes below are out of date, but might be useful for future development with Java 11
+
+Presently the Java 11 build of Jalview treats all libraries as libraries on the classpath, and does not use them as modules. The Java 11 JRE prepped for future release is a standard AdoptOpenJDK release (possibly repackaged for getdown/install4j to use).
+
+At time of writing, the JRE cannot be updated over the air on macOS platform due to a limitation of getdown's unpackaging system only using jars and hence cannot work with symbolic links. There is a symbolic link that is essential (as a symbolic link) in the macOS distribution (Contents/MacOS/libjli.dylib -> ../Home/lib/jli/libjli.dylib). Without this, the install4j launcher will not work. Some work has started on incorporating tar capabilities in getdown using the apache-commons-compress library, though this is not complete.
+
+Future releases might incorporate Java 11 modules into a bespoke Java 11 JRE that can be updated over the air via getdown.This could reduce the size of the distribution but will absolutely need the bespoke JRE. This would mean Jalview being restricted to platforms that we (can) support, or distributing the modules as libraries in a second distribution (the shadowJar distribution).
+
+build.gradle is written to support compilation of either Java 1.8 or Java 11 compatible bytecode. Please note that the compilation (and therefore build) process REQUIRES a Java 11 (or above) JDK. This is because there is Java 11 specific code in some Jalview classes (devolved into separate classes which fail "gracefully" when read by a Java 1.8 JRE).
+Java 11 is therefore the default build target, but can be changed simply by specifying the property JAVA_VERSION=1.8 (e.g.
+
+gradle compileJava -PJAVA_VERSION=1.8
+
+). Some different versions of supporting libraries are used between Java 1.8 and 11 builds, and can be found in j8lib and j11lib folders respectively. Note that there are a number of extra libraries used in the Java 11 distribution which are present in the Java 1.8 JRE but not distributed with the Java 11 JRE.
+
+Also see doc/building.md or doc/building.html
+
+
+
+
+Old notes:
+
Java 11 module replacements
As Java 11 no longer ships with Java EE libraries, which were standard in Java 8, and available (modularised, through the --add-modules CLI mechanism) in Java 9 and 10, third party replacement libraries for these libraries/modules have to be found.
@@ -91,4 +114,3 @@ jlink --module-path $JAVA_HOME/jmods:j11lib --compress=2 --add-modules `cat modu
To create a Java 11 JRE in j11jre/openjdk11_platform (or whatever you wish to call it).
You can point JAVA_HOME at the JDK11 of a different platform, so long as the jlink in your path is to the jlink for the platform you're running on.
-
diff --git a/THIRDPARTYLIBS b/THIRDPARTYLIBS
index 728711e..348827e 100644
--- a/THIRDPARTYLIBS
+++ b/THIRDPARTYLIBS
@@ -13,53 +13,80 @@ ext.edu.ucsf.rbvi.strucviz2 includes sources originally developed by Scooter Mor
Licensing information for each library is given below:
-JGoogleAnalytics_0.3.jar APL 2.0 License - http://code.google.com/p/jgoogleanalytics/
-Jmol-14.6.4_2016.10.26.jar GPL/LGPLv2 http://sourceforge.net/projects/jmol/files/
-VARNAv3-93.jar GPL licenced software by K�vin Darty, Alain Denise and Yann Ponty. http://varna.lri.fr
+j8lib:
+
activation.jar
apache-mime4j-0.6.jar
axis.jar
-castor-1.1-cycle-xml.jar
+biojava-core-4.1.0.jar LGPLv2.1 - latest license at https://github.com/biojava/biojava/blob/master/LICENSE
+biojava-ontology-4.1.0.jar LGPLv2.1 - latest license at https://github.com/biojava/biojava/blob/master/LICENSE
commons-codec-1.3.jar
-commons-discovery.jar
+commons-compress-1.18.jar
commons-logging-1.1.1.jar
-commons-logging.jar
-commons-net-3.3.jar
-groovy-all-2.4.6-indy.jar APL 2.0 License - downloaded and extracted from https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.4.6.zip
+getdown-core.jar Getdown license - https://github.com/threerings/getdown/blob/master/LICENSE
+groovy-all-2.4.12-indy.jar APL 2.0 License - downloaded and extracted from https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.4.6.zip
+htsjdk-2.12.0.jar built from maven master at https://github.com/samtools/htsjdk MIT License to Broad Institute
httpclient-4.0.3.jar
httpcore-4.0.1.jar
httpmime-4.0.3.jar
+intervalstore-v1.0.jar
+jabaws-min-client-2.2.0.jar
+java-json.jar
jaxrpc.jar
+jersey-client-1.19.4.jar CDDL 1.1 + GPL2 w/ CPE - http://glassfish.java.net/public/CDDL+GPL_1_1.html
+jersey-core-1.19.4.jar CDDL 1.1 + GPL2 w/ CPE - http://glassfish.java.net/public/CDDL+GPL_1_1.html
+jersey-json-1.19.4.jar CDDL 1.1 + GPL2 w/ CPE - http://glassfish.java.net/public/CDDL+GPL_1_1.html
+jetty-http-9.2.10.v20150310.jar
+jetty-io-9.2.10.v20150310.jar
+jetty-server-9.2.10.v20150310.jar
+jetty-util-9.2.10.v20150310.jar
+jfreesvg-2.1.jar GPL v3 licensed library from the JFree suite - http://www.jfree.org/jfreesvg/
+JGoogleAnalytics_0.3.jar APL 2.0 License - http://code.google.com/p/jgoogleanalytics/
jhall.jar
-jswingreader-0.3.jar : Apache license - built from http://jswingreader.sourceforge.net/ svn/trunk v12
+Jmol-14.6.4_2016.10.26.jar GPL/LGPLv2 http://sourceforge.net/projects/jmol/files/
+json_simple-1.1.jar Apache 2.0 license - downloaded from https://code.google.com/p/json-simple/downloads/list (will move to 1.1.1 version when jalview is mavenised and osgi-ised)
+jsoup-1.8.1.jar
+jsr311-api-1.1.1.jar
+jswingreader-0.3.jar Apache license - built from http://jswingreader.sourceforge.net/ svn/trunk v12
+libquaqua64-8.0.jnilib.jar quaqua: v.8.0 (latest stable) by Randel S Hofer. LGPL and BSD Modified license: downloaded from http://www.randelshofer.ch/quaqua/
+libquaqua-8.0.jnilib.jar quaqua: v.8.0 (latest stable) by Randel S Hofer. LGPL and BSD Modified license: downloaded from http://www.randelshofer.ch/quaqua/
log4j-1.2.8.jar
mail.jar
-miglayout-4.0-swing.jar BSD http://www.migcalendar.com/miglayout/versions/4.0/license.txt
-min-jaba-client.jar
+miglayout-4.0-swing.jar BSD - http://www.migcalendar.com/miglayout/versions/4.0/license.txt
+quaqua-filechooser-only-8.0.jar quaqua: v.8.0 (latest stable) by Randel S Hofer. LGPL and BSD Modified license: downloaded from http://www.randelshofer.ch/quaqua/
regex.jar
saaj.jar
+servlet-api-3.1.jar
+slf4j-api-1.7.7.jar
+slf4j-log4j12-1.7.7.jar
vamsas-client.jar
+VAqua5-patch.jar This is a patched version of VAqua v5 (latest stable) by Alan Snyder et al. GPLv3 with Classpath exception, also includes contributions from Quaqua: http://violetlib.org/vaqua/overview.html - see doc/patching-vaqua.txt for patch details, and http://issues.jalview.org/browse/JAL-2988 for details of the bug that the patch addresses.
+VARNAv3-93.jar GPL licenced software by K�vin Darty, Alain Denise and Yann Ponty - http://varna.lri.fr
wsdl4j.jar
xercesImpl.jar
xml-apis.jar
-json_simple-1.1.jar : Apache 2.0 license : downloaded from https://code.google.com/p/json-simple/downloads/list (will move to 1.1.1 version when jalview is mavenised and osgi-ised)
-jfreesvg-2.1.jar : GPL v3 licensed library from the JFree suite: http://www.jfree.org/jfreesvg/
-
-quaqua: v.8.0 (latest stable) by Randel S Hofer. LGPL and BSD Modified license: downloaded from http://www.randelshofer.ch/quaqua/
-
-vaqua5-patch: This is a patched version of VAqua v5 (latest stable) by Alan Snyder et al. GPLv3 with Classpath exception, also includes contributions from Quaqua: http://violetlib.org/vaqua/overview.html - see doc/patching-vaqua.txt for patch details, and http://issues.jalview.org/browse/JAL-2988 for details of the bug that the patch addresses.
-
-lib/htsjdk-2.12.jar: built from maven master at https://github.com/samtools/htsjdk MIT License to Broad Institute
-
-lib/biojava-core-4.1.0.jar LGPLv2.1 - latest license at https://github.com/biojava/biojava/blob/master/LICENSE
-
-lib/biojava-ontology-4.1.0.jar LGPLv2.1 - latest license at https://github.com/biojava/biojava/blob/master/LICENSE
Libraries for Test Suite
-utils/classgraph-4.1.6.jar: BSD License - allows recovery of classpath for programmatic construction of a Java command line to launch Jalview
- version 4.1.6 downloaded from https://mvnrepository.com/artifact/io.github.classgraph/classgraph/4.1.6
+utils/axis-ant.jar
+utils/ant-contrib-1.0b3.jar
+utils/hamcrest-core-1.3.jar
+utils/roxes-ant-tasks-1.2-2004-01-30.jar
+utils/proguard_5.3.3.jar
+utils/jhindexer.jar
+utils/junit-4.12.jar
+utils/jhall.jar
+utils/classgraph-4.1.6.jar BSD License - allows recovery of classpath for programmatic construction of a Java command line to launch Jalview version 4.1.6 downloaded from https://mvnrepository.com/artifact/io.github.classgraph/classgraph/4.1.6
+utils/testnglibs/guava-base-r03.jar
+utils/testnglibs/guava-collections-r03.jar
+utils/testnglibs/bsh-2.0b4.jar
+utils/testnglibs/snakeyaml.jar
+utils/testnglibs/testng-sources.jar
+utils/testnglibs/testng.jar
+utils/testnglibs/junit-4.12.jar
+utils/testnglibs/jcommander.jar
+utils/wsdl4j.jar
Additional dependencies
@@ -69,3 +96,31 @@ examples/javascript/jquery*.js : BSD license
examples/javascript/jshashtable-2.1.js : Apache License
examples/javascript/facebox-1.3.js : MTI License - http://www.opensource.org/licenses/mit-license.php
+
+New in j11lib:
+
+FastInfoset.jar CDDL Version 1.1 - https://javaee.github.io/metro-fi/LICENSE
+getdown-core.jar Getdown license - https://github.com/threerings/getdown/blob/master/LICENSE
+groovy-*2.5.7.jar Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html
+istack-commons-runtime.jar CDDL Version 1.1 - https://glassfish.java.net/public/CDDL+GPL_1_1.html
+javax.activation-api-1.2.0.jar CDDL/GPLv2+CE - https://github.com/javaee/activation/blob/master/LICENSE.txt
+javax.annotation-api-1.3.2.jar CDDL + GPLv2 with classpath exception - https://github.com/javaee/javax.annotation/blob/master/LICENSE
+javax.jws-api-1.1.jar CDDL + GPLv2 with classpath exception - https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html
+javax.servlet-api-4.0.1.jar CDDL + GPLv2 with classpath exception - https://oss.oracle.com/licenses/CDDL+GPL-1.1
+javax.xml.rpc-api-1.1.2.jar CDDL + GPLv2 with classpath exception - https://oss.oracle.com/licenses/CDDL+GPL-1.1
+javax.xml.soap-api.jar CDDL + GPLv2 with classpath exception - https://github.com/javaee/javax.xml.soap/blob/master/LICENSE
+jaxb-api-2.3.1.jar CDDL 1.1 + GPL2 w/ CPE - https://oss.oracle.com/licenses/CDDL+GPL-1.1
+jaxb-runtime-2.3.2.jar Eclipse Distribution License - v 1.0 - http://www.eclipse.org/org/documents/edl-v10.php
+jaxws-api-2.3.1.jar CDDL + GPLv2 with classpath exception - https://github.com/javaee/jax-ws-spec/blob/master/LICENSE.md
+Jmol-14.6.4_2016.10.26-no_netscape.jar GPL/LGPLv2 http://sourceforge.net/projects/jmol/files/
+jsr311-api-1.1.1.jar CDDL License - http://www.opensource.org/licenses/cddl1.php
+mimepull-1.9.11.jar Eclipse Distribution License - v 1.0 - http://www.eclipse.org/org/documents/edl-v10.php
+policy-2.7.6.jar Eclipse Distribution License - v 1.0 - http://www.eclipse.org/org/documents/edl-v10.php
+slf4j-api-1.7.26.jar MIT License - https://opensource.org/licenses/mit-license.php
+slf4j-log4j12-1.7.26.jar MIT License - https://opensource.org/licenses/mit-license.php
+stax-ex-1.8.1.jar Eclipse Distribution License - v 1.0 - http://www.eclipse.org/org/documents/edl-v10.php
+stax2-api-4.2.jar The BSD License - http://www.opensource.org/licenses/bsd-license.php
+streambuffer-1.5.7.jar Eclipse Distribution License - v 1.0 - http://www.eclipse.org/org/documents/edl-v10.php
+txw2-2.3.2.jar Eclipse Distribution License - v 1.0 - http://www.eclipse.org/org/documents/edl-v10.php
+wsdl4j-1.6.3.jar CPL - http://www.opensource.org/licenses/cpl1.0.txt
+
diff --git a/build.gradle b/build.gradle
index fb311a4..f02d8ad 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,10 @@
import org.apache.tools.ant.filters.ReplaceTokens
//import org.apache.tools.ant.filters.ReplaceRegexp
import org.gradle.internal.os.OperatingSystem
+import org.gradle.plugins.ide.eclipse.model.*
+
+
+import groovy.transform.ExternalizeMethods
buildscript {
dependencies {
@@ -47,37 +51,141 @@ def compile_source_compatibility
def compile_target_compatibility
ext {
- // where the getdown channel will be built.
- // TODO: consider allowing this expression to be overrriden by -P arg
- getdownWebsiteDir = jalviewDir + '/' + getdown_website_dir + '/' + JAVA_VERSION + '/'
+ getdownWebsiteDir = jalviewDir + '/' + getdown_website_dir + '/' + JAVA_VERSION
+ getdownDir = ""
+ reportRsyncCmd = false
+ buildDist = true
+ buildProperties = buildPropertiesFile
+ getdownLauncher = jalviewDir + '/' + getdown_lib_dir + '/' + getdown_launcher
+ switch (CHANNEL) {
+
+ case "BUILD":
+ // TODO: get bamboo build artifact URL for getdown artifacts
+ getdown_channel_base = bamboo_channelbase
+ getdown_channel_name = bamboo_planKey + '/'+JAVA_VERSION
+ getdown_app_base = bamboo_channelbase + '/'+ bamboo_planKey + bamboo_getdown_channel_suffix + '/'+JAVA_VERSION
+ getdown_app_dir = getdown_app_dir_alt
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ break
+
+ case "RELEASE":
+ getdown_channel_name = CHANNEL.toLowerCase()
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_dir = getdown_app_dir_release
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ reportRsyncCommand = true
+ break
+
+ case "ARCHIVE":
+ getdown_channel_name = CHANNEL.toLowerCase()+"/"+JALVIEW_VERSION
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_dir = getdown_app_dir_alt
+ if (!file(ARCHIVEDIR+"/"+packageDir).exists()) {
+ print "Must provide an ARCHIVEDIR value to produce an archive distribution"
+ exit
+ } else {
+ packageDir = ARCHIVEDIR + "/" + packageDir
+ buildProperties = ARCHIVEDIR +"/" + classesDir + "/" + buildPropertiesFile
+ buildDist = false
+ }
+ reportRsyncCommand = true
+ break
+
+ case "ARCHIVELOCAL":
+ getdown_channel_name = "archive" + "/" + JALVIEW_VERSION
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = file(getdownWebsiteDir).toURI().toString()
+ getdown_app_dir = getdown_app_dir_alt
+ if (!file(ARCHIVEDIR+"/"+packageDir).exists()) {
+ print "Must provide an ARCHIVEDIR value to produce an archive distribution"
+ exit
+ } else {
+ packageDir = ARCHIVEDIR + "/" + packageDir
+ buildProperties = ARCHIVEDIR +"/" + classesDir + "/" + buildPropertiesFile
+ buildDist = false
+ }
+ reportRsyncCommand = true
+ getdownLauncher = jalviewDir + '/' + getdown_lib_dir + '/' + getdown_launcher_local
+ break
+
+ case "DEVELOP":
+ getdown_channel_name = CHANNEL.toLowerCase()
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_dir = getdown_app_dir_alt
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ reportRsyncCommand = true
+ break
+
+ case "TEST-RELEASE":
+ getdown_channel_name = CHANNEL.toLowerCase()
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_dir = getdown_app_dir_alt
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ reportRsyncCommand = true
+ break
+
+ case ~/^SCRATCH(|-[-\w]*)$/:
+ getdown_channel_name = CHANNEL
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_dir = getdown_app_dir_alt
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ reportRsyncCommand = true
+ break
+
+ case "LOCAL":
+ getdown_app_base = file(getdownWebsiteDir).toURI().toString()
+ getdown_app_dir = getdown_app_dir_alt
+ buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ getdownLauncher = jalviewDir + '/' + getdown_lib_dir + '/' + getdown_launcher_local
+ break
+
+ default: // something wrong specified
+ print("CHANNEL must be one of BUILD, RELEASE, ARCHIVE, DEVELOP, TEST-RELEASE, SCRATCH-..., LOCAL [default]")
+ exit
+ break
+
+ }
+
+ println("Using a "+CHANNEL+" profile. appbase="+getdown_app_base)
getdownAppDir = getdownWebsiteDir + '/' + getdown_app_dir
- getdownJ11libDir = getdownWebsiteDir + '/' + getdown_j11lib_dir
+ //getdownJ11libDir = getdownWebsiteDir + '/' + getdown_j11lib_dir
getdownResourceDir = getdownWebsiteDir + '/' + getdown_resource_dir
- getdownLauncher = jalviewDir + '/' + getdown_launcher
+ getdownInstallDir = getdownWebsiteDir + '/' + getdown_install_dir
getdownFilesDir = jalviewDir + '/' + getdown_files_dir + '/' + JAVA_VERSION + '/'
- def getdownChannel = getdown_channel_name
- if (getdown_channel_name.equals("COMMIT")) {
- getdownChannel = getGitHash()
- }
- getdown_app_base = getdown_channel_base+"/"+getdownChannel+"/"+JAVA_VERSION+"/"
+ getdownFilesInstallDir = getdownFilesDir+"/"+getdown_install_dir
+ /* compile without modules -- using classpath libraries
modules_compileClasspath = fileTree(dir: "$jalviewDir/$j11modDir", include: ["*.jar"])
modules_runtimeClasspath = modules_compileClasspath
+ */
+ gitHash = ""
+ gitBranch = ""
}
def JAVA_INTEGER_VERSION
def additional_compiler_args = []
// these are getdown.txt properties defined dependent on the JAVA_VERSION
def getdown_alt_java_min_version
+def getdown_alt_java_max_version
// this property is assigned below and expanded to multiple lines in the getdown task
def getdown_alt_multi_java_location
+// this property is for the Java library used in eclipse
+def eclipse_java_runtime_name
if (JAVA_VERSION.equals("1.8")) {
JAVA_INTEGER_VERSION = "8"
+ //libDir = j8libDir
libDir = j11libDir
libDistDir = j8libDir
compile_source_compatibility = 1.8
compile_target_compatibility = 1.8
getdown_alt_java_min_version = getdown_alt_java8_min_version
+ getdown_alt_java_max_version = getdown_alt_java8_max_version
getdown_alt_multi_java_location = getdown_alt_java8_txt_multi_java_location
+ eclipse_java_runtime_name = "JavaSE-1.8"
} else if (JAVA_VERSION.equals("11")) {
JAVA_INTEGER_VERSION = "11"
libDir = j11libDir
@@ -85,11 +193,31 @@ if (JAVA_VERSION.equals("1.8")) {
compile_source_compatibility = 11
compile_target_compatibility = 11
getdown_alt_java_min_version = getdown_alt_java11_min_version
+ getdown_alt_java_max_version = getdown_alt_java11_max_version
getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
+ eclipse_java_runtime_name = "JavaSE-11"
+ /* compile without modules -- using classpath libraries
additional_compiler_args += [
- '--module-path', ext.modules_compileClasspath.asPath,
- '--add-modules', j11modules
+ '--module-path', ext.modules_compileClasspath.asPath,
+ '--add-modules', j11modules
]
+ */
+} else if (JAVA_VERSION.equals("12") || JAVA_VERSION.equals("13")) {
+ JAVA_INTEGER_VERSION = JAVA_VERSION
+ libDir = j11libDir
+ libDistDir = j11libDir
+ compile_source_compatibility = JAVA_VERSION
+ compile_target_compatibility = JAVA_VERSION
+ getdown_alt_java_min_version = getdown_alt_java11_min_version
+ getdown_alt_java_max_version = getdown_alt_java11_max_version
+ getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
+ eclipse_java_runtime_name = "JavaSE-11"
+ /* compile without modules -- using classpath libraries
+ additional_compiler_args += [
+ '--module-path', ext.modules_compileClasspath.asPath,
+ '--add-modules', j11modules
+ ]
+ */
} else {
throw new GradleException("JAVA_VERSION=$JAVA_VERSION not currently supported by Jalview")
}
@@ -104,7 +232,6 @@ sourceSets {
resources {
srcDirs "$jalviewDir/$resourceDir"
- srcDirs "$jalviewDir/$libDistDir"
}
jar.destinationDir = file("$jalviewDir/$packageDir")
@@ -149,8 +276,7 @@ sourceSets {
} else {
compileClasspath += files(sourceSets.main.java.outputDir)
}
- compileClasspath += sourceSets.main.compileClasspath
- compileClasspath += files( sourceSets.main.resources.srcDirs)
+
compileClasspath += fileTree(dir: "$jalviewDir/$utilsDir", include: ["**/*.jar"])
compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
@@ -176,8 +302,8 @@ eclipse {
name = "Jalview with gradle build"
natures 'org.eclipse.jdt.core.javanature',
- 'org.eclipse.jdt.groovy.core.groovyNature',
- 'org.eclipse.buildship.core.gradleprojectnature'
+ 'org.eclipse.jdt.groovy.core.groovyNature',
+ 'org.eclipse.buildship.core.gradleprojectnature'
buildCommand 'org.eclipse.jdt.core.javabuilder'
buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
@@ -187,32 +313,87 @@ eclipse {
//defaultOutputDir = sourceSets.main.java.outputDir
def removeThese = []
configurations.each{ if (it.isCanBeResolved()) {
- removeThese += it
- }
+ removeThese += it
}
- containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
-
- minusConfigurations += removeThese
- plusConfigurations = [ ]
- file {
+ }
- whenMerged { cp ->
- def removeTheseToo = []
- HashMap addedSrcPath = new HashMap<>();
- cp.entries.each { entry ->
- if (entry.kind == 'src') {
- if (addedSrcPath.getAt(entry.path) || !(entry.path == "src" || entry.path == "test")) {
- removeTheseToo += entry
- } else {
- addedSrcPath.putAt(entry.path, true)
- }
+ minusConfigurations += removeThese
+ plusConfigurations = [ ]
+ file {
+
+ whenMerged { cp ->
+ def removeTheseToo = []
+ HashMap addedSrcPath = new HashMap<>();
+ cp.entries.each { entry ->
+ if (entry.kind == 'src') {
+ if (addedSrcPath.getAt(entry.path) || !(entry.path == "src" || entry.path == "test")) {
+ removeTheseToo += entry
+ } else {
+ addedSrcPath.putAt(entry.path, true)
}
}
- cp.entries.removeAll(removeTheseToo)
+ }
+ cp.entries.removeAll(removeTheseToo)
+
+ print ("CP="+cp.inspect())
+
+ cp.entries += new Output("bin/main")
+ cp.entries += new Library(fileReference(helpParentDir))
+ cp.entries += new Library(fileReference(resourceDir))
+
+ HashMap addedLibPath = new HashMap<>();
+
+ // changing from sourcesets.main.classpath to specific Java version lib
+ //sourceSets.main.compileClasspath.each{
+ fileTree("$jalviewDir/$libDistDir").include("**/*.jar").include("*.jar").each {
+ //don't want to add outputDir as eclipse is using its own output dir in bin/main
+ if (it.isDirectory() || ! it.exists()) {
+ // don't add dirs to classpath
+ return
+ }
+ def itPath = it.toString()
+ if (itPath.startsWith(jalviewDirAbsolutePath+"/")) {
+ itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
+ }
+ if (addedLibPath.get(itPath)) {
+ //println("Not adding duplicate entry "+itPath)
+ } else {
+ //println("Adding entry "+itPath)
+ cp.entries += new Library(fileReference(itPath))
+ addedLibPath.put(itPath, true)
+ }
+ }
+
+ // changing from sourcesets.main.classpath to specific Java version lib
+ //sourceSets.test.compileClasspath.each{
+ fileTree(dir: "$jalviewDir/$utilsDir", include: ["**/*.jar"]).each {
+ //if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
+ //no longer want to add outputDir as eclipse is using its own output dir in bin/main
+ if (it.isDirectory() || ! it.exists()) {
+ // don't add dirs to classpath
+ return false // groovy "break" in .each loop
+ }
+ def itPath = it.toString()
+ if (itPath.startsWith(jalviewDirAbsolutePath+"/")) {
+ itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
+ }
+ if (addedLibPath.get(itPath)) {
+ // don't duplicate
+ } else {
+ def lib = new Library(fileReference(itPath))
+ // this doesn't work... yet. Adding test=true attribute using withXml below
+ //def attrs = new Node(null, 'attributes', ["test":"true"])
+ //lib.appendNode(attrs) //
+ cp.entries += lib
+ addedLibPath.put(itPath, true)
+ }
+ }
}
+ // withXml changes ignored by buildship, these add the "test=true" attribute
withXml {
def node = it.asNode()
+
def srcTestAttributes
node.children().each{ cpe ->
def attributes = cpe.attributes()
@@ -231,68 +412,29 @@ eclipse {
srcTestAttributes.append(new Node(null, "attribute", [name:"test", value:"true"]))
}
- node.appendNode('classpathentry', [kind:"output", path:"bin/main"])
- node.appendNode('classpathentry', [kind:"lib", path:helpParentDir])
- node.appendNode('classpathentry', [kind:"lib", path:resourceDir])
- HashMap addedLibPath = new HashMap<>();
- def allPaths = sourceSets.test.compileClasspath + sourceSets.main.compileClasspath
- sourceSets.main.compileClasspath.each{
- //if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
- //no longer want to add outputDir as eclipse is using its own output dir in bin/main
- if (it.isDirectory() || ! it.exists()) {
- // don't add dirs to classpath
- //println("Not adding directory "+it)
- return
- }
- def itPath = it.toString()
- if (itPath.startsWith(jalviewDirAbsolutePath+"/")) {
- itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
- }
- if (addedLibPath.get(itPath)) {
- //println("Not adding duplicate entry "+itPath)
- } else {
- //println("Adding entry "+itPath)
- node.appendNode('classpathentry', [kind:"lib", path:itPath])
- addedLibPath.put(itPath, true)
- }
- }
- sourceSets.test.compileClasspath.each{
- //if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
- //no longer want to add outputDir as eclipse is using its own output dir in bin/main
- if (it.isDirectory() || ! it.exists()) {
- // don't add dirs to classpath
- //println("Not adding directory "+it)
- return
- }
- def itPath = it.toString()
- if (itPath.startsWith(jalviewDirAbsolutePath+"/")) {
- itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
- }
- if (addedLibPath.get(itPath)) {
- //println("Not adding duplicate entry "+itPath)
- } else {
- //println("Adding entry "+itPath)
- node.appendNode('classpathentry', [kind:"lib", path:itPath])
- .appendNode('attributes')
+ node.children().each{ cpe ->
+ def attributes = cpe.attributes()
+ if (attributes.get("kind") == "lib" && attributes.get("path").startsWith("utils/")) {
+ cpe.appendNode('attributes')
.appendNode('attribute', [name:"test", value:"true"])
- addedLibPath.put(itPath, true)
}
}
- }
+ } // withXML
+ } // file
- }
- }
+ containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
+ } // classpath
jdt {
// for the IDE, use java 11 compatibility
- sourceCompatibility = 11
- targetCompatibility = 11
- javaRuntimeName = "JavaSE-11"
+ sourceCompatibility = compile_source_compatibility
+ targetCompatibility = compile_target_compatibility
+ javaRuntimeName = eclipse_java_runtime_name
file {
withProperties { props ->
def jalview_prefs = new Properties()
- def ins = new FileInputStream(eclipse_extra_jdt_prefs_file)
+ def ins = new FileInputStream(jalviewDirAbsolutePath+"/"+eclipse_extra_jdt_prefs_file)
jalview_prefs.load(ins)
ins.close()
jalview_prefs.forEach { t, v ->
@@ -304,6 +446,8 @@ eclipse {
}
}
+ //synchronizationTasks eclipseClasspath
+ //autoBuildTasks eclipseClasspath
}
task cloverInstr() {
@@ -314,7 +458,7 @@ task cloverInstr() {
doFirst {
delete cloverInstrDir
def argsList = ["--initstring", "${buildDir}/clover/clover.db",
- "-d", "${buildDir}/${cloverSourcesInstrDir}"]
+ "-d", "${buildDir}/${cloverSourcesInstrDir}"]
argsList.addAll(inputs.files.files.collect({ file ->
file.absolutePath
}))
@@ -327,21 +471,21 @@ task cloverInstr() {
task cloverReport {
group = "Verification"
- description = "Createst the Clover report"
- inputs.dir "${buildDir}/clover"
- outputs.dir "${reportsDir}/clover"
- onlyIf {
- file("${buildDir}/clover/clover.db").exists()
- }
+ description = "Createst the Clover report"
+ inputs.dir "${buildDir}/clover"
+ outputs.dir "${reportsDir}/clover"
+ onlyIf {
+ file("${buildDir}/clover/clover.db").exists()
+ }
doFirst {
def argsList = ["--initstring", "${buildDir}/clover/clover.db",
- "-o", "${reportsDir}/clover"]
+ "-o", "${reportsDir}/clover"]
String[] args = argsList.toArray()
com.atlassian.clover.reporters.html.HtmlReporter.runReport(args)
// and generate ${reportsDir}/clover/clover.xml
args = ["--initstring", "${buildDir}/clover/clover.db",
- "-o", "${reportsDir}/clover/clover.xml"].toArray()
+ "-o", "${reportsDir}/clover/clover.xml"].toArray()
com.atlassian.clover.reporters.xml.XMLReporter.runReport(args)
}
}
@@ -396,47 +540,92 @@ cleanTest {
delete cloverInstrDir
}
+// format is a string like date.format("dd MMMM yyyy")
def getDate(format) {
def date = new Date()
- //return date.format("dd MMMM yyyy")
return date.format(format)
}
-def getGitHash() {
- def stdout = new ByteArrayOutputStream()
+task setGitVals {
+ def hashStdOut = new ByteArrayOutputStream()
exec {
commandLine "git", "rev-parse", "--short", "HEAD"
- standardOutput = stdout
- workingDir = jalviewDir
+ standardOutput = hashStdOut
+ ignoreExitValue true
}
- return stdout.toString().trim()
-}
-def getGitBranch() {
- def stdout = new ByteArrayOutputStream()
+ def branchStdOut = new ByteArrayOutputStream()
exec {
commandLine "git", "rev-parse", "--abbrev-ref", "HEAD"
- standardOutput = stdout
- workingDir = jalviewDir
+ standardOutput = branchStdOut
+ ignoreExitValue true
}
- return stdout.toString().trim()
+
+ project.ext.gitHash = hashStdOut.toString().trim()
+ project.ext.gitBranch = branchStdOut.toString().trim()
+
+ outputs.upToDateWhen { false }
}
task createBuildProperties(type: WriteProperties) {
+ dependsOn setGitVals
inputs.dir("$jalviewDir/$sourceDir")
+ inputs.dir("$classes")
inputs.dir("$jalviewDir/$resourceDir")
- outputFile "$classes/$buildPropertiesFile"
- /* taking time/date specific comment out to allow better incremental builds */
- //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
- comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
- property "BUILD_DATE", getDate("dd MMMM yyyy")
+ outputFile (buildProperties)
+ // taking time specific comment out to allow better incremental builds
+ comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
+ //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
+ property "BUILD_DATE", getDate("HH:mm:ss dd MMMM yyyy")
property "VERSION", JALVIEW_VERSION
- property "INSTALLATION", INSTALLATION+" git-commit:"+getGitHash()+" ["+getGitBranch()+"]"
+ property "INSTALLATION", INSTALLATION+" git-commit:"+project.ext.gitHash+" ["+project.ext.gitBranch+"]"
outputs.file(outputFile)
- outputs.dir("$classes")
+}
+
+def buildingHTML = "$jalviewDir/$docDir/building.html"
+task deleteBuildingHTML(type: Delete) {
+ delete buildingHTML
+}
+
+task convertBuildingMD(type: Exec) {
+ dependsOn deleteBuildingHTML
+ def buildingMD = "$jalviewDir/$docDir/building.md"
+ def css = "$jalviewDir/$docDir/github.css"
+
+ def pandoc = null
+ pandoc_exec.split(",").each {
+ if (file(it.trim()).exists()) {
+ pandoc = it.trim()
+ return true
+ }
+ }
+
+ def hostname = "hostname".execute().text.trim()
+ if ((pandoc == null || ! file(pandoc).exists()) && hostname.equals("jv-bamboo")) {
+ pandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc"
+ }
+
+ doFirst {
+ if (pandoc != null && file(pandoc).exists()) {
+ commandLine pandoc, '-s', '-o', buildingHTML, '--metadata', 'pagetitle="Building Jalview from Source"', '--toc', '-H', css, buildingMD
+ } else {
+ println("Cannot find pandoc. Skipping convert building.md to HTML")
+ throw new StopExecutionException()
+ }
+ }
+
+ ignoreExitValue true
+
+ inputs.file(buildingMD)
+ inputs.file(css)
+ outputs.file(buildingHTML)
+}
+clean {
+ delete buildingHTML
}
task syncDocs(type: Sync) {
+ dependsOn convertBuildingMD
def syncDir = "$classes/$docDir"
from fileTree("$jalviewDir/$docDir")
into syncDir
@@ -450,14 +639,14 @@ task copyHelp(type: Copy) {
def outputDir = "$classes/$helpDir"
from(inputDir) {
exclude '**/*.gif'
- exclude '**/*.jpg'
- exclude '**/*.png'
- filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: ['Version-Rel': JALVIEW_VERSION])
+ exclude '**/*.jpg'
+ exclude '**/*.png'
+ filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: ['Version-Rel': JALVIEW_VERSION,'Year-Rel': getDate("yyyy")])
}
from(inputDir) {
include '**/*.gif'
- include '**/*.jpg'
- include '**/*.png'
+ include '**/*.jpg'
+ include '**/*.png'
}
into outputDir
@@ -497,7 +686,9 @@ test {
dependsOn cloverInstr
}
- print("Running tests " + (use_clover?"WITH":"WITHOUT") + " clover [clover="+use_clover+"]\n")
+ if (use_clover) {
+ print("Running tests " + (use_clover?"WITH":"WITHOUT") + " clover [clover="+use_clover+"]\n")
+ }
useTestNG() {
includeGroups testngGroups
@@ -538,11 +729,13 @@ task compileLinkCheck(type: JavaCompile) {
destinationDir = file("$jalviewDir/$utilsDir")
source = fileTree(dir: "$jalviewDir/$utilsDir", include: ["HelpLinksChecker.java", "BufferedLineReader.java"])
+ inputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.java")
+ inputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.java")
outputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.class")
outputs.file("$jalviewDir/$utilsDir/BufferedLineReader.class")
}
-def helplinkscheckeroutputfile = file("$jalviewDir/$utilsDir/HelpLinksChecker.out")
+def helplinkscheckertouchfile = file("$jalviewDir/$utilsDir/HelpLinksChecker.touch")
task linkCheck(type: JavaExec) {
dependsOn prepare, compileLinkCheck
classpath = files("$jalviewDir/$utilsDir")
@@ -550,16 +743,21 @@ task linkCheck(type: JavaExec) {
workingDir = jalviewDir
def help = "$classes/$helpDir"
args = [ "$classes/$helpDir", "-nointernet" ]
- //args = [ "$classesDir/$helpDir", "-nointernet" ]
- doFirst {
- helplinkscheckeroutputfile.createNewFile()
- standardOutput new FileOutputStream(helplinkscheckeroutputfile, false)
+ doLast {
+ helplinkscheckertouchfile.createNewFile()
}
- outputs.file(helplinkscheckeroutputfile)
+ inputs.dir("$classes/$helpDir")
+ outputs.file(helplinkscheckertouchfile)
}
+// import the pubhtmlhelp target
+ant.properties.basedir = "$jalviewDir"
+ant.properties.helpBuildDir = jalviewDirAbsolutePath+"/$classes/$helpDir"
+ant.importBuild "$utilsDir/publishHelp.xml"
+
+
task cleanPackageDir(type: Delete) {
delete fileTree("$jalviewDir/$packageDir").include("*.jar")
}
@@ -622,34 +820,57 @@ task cleanDist {
}
shadowJar {
- dependsOn makeDist
+ group = "distribution"
+ if (buildDist) {
+ dependsOn makeDist
+ }
from ("$jalviewDir/$libDistDir") {
include("*.jar")
}
+ manifest {
+ attributes 'Implementation-Version': JALVIEW_VERSION
+ }
mainClassName = shadowJarMainClass
mergeServiceFiles()
- classifier = "all-"+JAVA_VERSION
+ classifier = "all-"+JALVIEW_VERSION+"-j"+JAVA_VERSION
minimize()
}
task getdownWebsite() {
group = "distribution"
description = "Create the getdown minimal app folder, and website folder for this version of jalview. Website folder also used for offline app installer"
- dependsOn makeDist
+ if (buildDist) {
+ dependsOn makeDist
+ }
+
+ // clean the getdown website and files dir before creating getdown folders
+ delete project.ext.getdownWebsiteDir
+ delete project.ext.getdownFilesDir
+
def getdownWebsiteResourceFilenames = []
def getdownTextString = ""
def getdownResourceDir = project.ext.getdownResourceDir
def getdownAppDir = project.ext.getdownAppDir
def getdownResourceFilenames = []
+
doFirst {
+ copy {
+ from buildProperties
+ rename(buildPropertiesFile, getdown_build_properties)
+ into project.ext.getdownAppDir
+ }
+ getdownWebsiteResourceFilenames += getdown_app_dir+"/"+getdown_build_properties
+
// go through properties looking for getdown_txt_...
def props = project.properties.sort { it.key }
- props.put("getdown_txt_java_min_version", getdown_alt_java_min_version)
- props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location)
+ if (getdown_alt_java_min_version.length() > 0) {
+ props.put("getdown_txt_java_min_version", getdown_alt_java_min_version)
+ }
+ if (getdown_alt_java_max_version.length() > 0) {
+ props.put("getdown_txt_java_max_version", getdown_alt_java_max_version)
+ }
+ props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location)
- if (getdown_local == "true") {
- getdown_app_base = "file://"+file(getdownWebsiteDir).getAbsolutePath()
- }
props.put("getdown_txt_appbase", getdown_app_base)
props.each{ prop, val ->
if (prop.startsWith("getdown_txt_") && val != null) {
@@ -661,7 +882,7 @@ task getdownWebsite() {
}
} else {
// file values rationalised
- if (val.indexOf('/') > -1) {
+ if (val.indexOf('/') > -1 || prop.startsWith("getdown_txt_resource")) {
def r = null
if (val.indexOf('/') == 0) {
// absolute path
@@ -676,8 +897,10 @@ task getdownWebsite() {
getdownResourceFilenames += r.getPath()
}
}
- def line = prop.substring(12) + " = " + val + "\n"
- getdownTextString += line
+ if (! prop.startsWith("getdown_txt_resource")) {
+ def line = prop.substring(12) + " = " + val + "\n"
+ getdownTextString += line
+ }
}
}
}
@@ -693,7 +916,7 @@ task getdownWebsite() {
}
def codeFiles = []
- makeDist.outputs.files.each{ f ->
+ fileTree(file(packageDir)).each{ f ->
if (f.isDirectory()) {
def files = fileTree(dir: f, include: ["*"]).getFiles()
codeFiles += files
@@ -712,53 +935,81 @@ task getdownWebsite() {
// NOT USING MODULES YET, EVERYTHING SHOULD BE IN dist
/*
- if (JAVA_VERSION.equals("11")) {
- def j11libFiles = fileTree(dir: "$jalviewDir/$j11libDir", include: ["*.jar"]).getFiles()
- j11libFiles.sort().each{f ->
- def line = "code = " + getdown_j11lib_dir + '/' + f.getName() + "\n"
- getdownTextString += line
- copy {
- from f.getPath()
- into project.ext.getdownJ11libDir
- }
- }
- }
+ if (JAVA_VERSION.equals("11")) {
+ def j11libFiles = fileTree(dir: "$jalviewDir/$j11libDir", include: ["*.jar"]).getFiles()
+ j11libFiles.sort().each{f ->
+ def line = "code = " + getdown_j11lib_dir + '/' + f.getName() + "\n"
+ getdownTextString += line
+ copy {
+ from f.getPath()
+ into project.ext.getdownJ11libDir
+ }
+ }
+ }
*/
// getdown-launcher.jar should not be in main application class path so the main application can move it when updated. Listed as a resource so it gets updated.
//getdownTextString += "class = " + file(getdownLauncher).getName() + "\n"
- getdownTextString += "resource = " + file(getdownLauncher).getName() + "\n"
+ getdownTextString += "resource = " + getdown_launcher_new + "\n"
getdownTextString += "class = " + mainClass + "\n"
def getdown_txt = file(project.ext.getdownWebsiteDir + "/getdown.txt")
getdown_txt.write(getdownTextString)
+ def launch_jvl = file(project.ext.getdownWebsiteDir + "/" + getdown_launch_jvl)
+ launch_jvl.write("appbase="+props.get("getdown_txt_appbase"))
+
copy {
- from getdown_txt
- into project.ext.getdownFilesDir
+ from getdownLauncher
+ rename(file(getdownLauncher).getName(), getdown_launcher_new)
+ into project.ext.getdownWebsiteDir
}
copy {
from getdownLauncher
- into project.ext.getdownFilesDir
+ if (file(getdownLauncher).getName() != getdown_launcher) {
+ rename(file(getdownLauncher).getName(), getdown_launcher)
+ }
+ into project.ext.getdownWebsiteDir
+ }
+
+ if (! (CHANNEL.startsWith("ARCHIVE") || CHANNEL.startsWith("DEVELOP"))) {
+ copy {
+ from getdown_txt
+ from getdownLauncher
+ from getdownWebsiteDir+"/"+getdown_build_properties
+ if (file(getdownLauncher).getName() != getdown_launcher) {
+ rename(file(getdownLauncher).getName(), getdown_launcher)
+ }
+ into getdownInstallDir
+ }
+
+ copy {
+ from getdownInstallDir
+ into getdownFilesInstallDir
+ }
}
copy {
+ from getdown_txt
+ from launch_jvl
from getdownLauncher
- into project.ext.getdownWebsiteDir
+ from getdownWebsiteDir+"/"+getdown_build_properties
+ if (file(getdownLauncher).getName() != getdown_launcher) {
+ rename(file(getdownLauncher).getName(), getdown_launcher)
+ }
+ into getdownFilesDir
}
copy {
- from jalviewDir + '/' + project.getProperty('getdown_txt_ui.background_image')
- from jalviewDir + '/' + project.getProperty('getdown_txt_ui.error_background')
- from jalviewDir + '/' + project.getProperty('getdown_txt_ui.progress_image')
- from jalviewDir + '/' + project.getProperty('getdown_txt_ui.icon')
- from jalviewDir + '/' + project.getProperty('getdown_txt_ui.mac_dock_icon')
+ from getdownResourceDir
into project.ext.getdownFilesDir + '/' + getdown_resource_dir
}
}
- inputs.dir(jalviewDir + '/' + packageDir)
+ if (buildDist) {
+ inputs.dir(jalviewDir + '/' + packageDir)
+ }
outputs.dir(project.ext.getdownWebsiteDir)
outputs.dir(project.ext.getdownFilesDir)
}
@@ -767,7 +1018,9 @@ task getdownDigest(type: JavaExec) {
group = "distribution"
description = "Digest the getdown website folder"
dependsOn getdownWebsite
- classpath = files(jalviewDir + '/' + getdown_core, jalviewDir+'/'+getdown_launcher)
+ doFirst {
+ classpath = files(getdownWebsiteDir + '/' + getdown_launcher)
+ }
main = "com.threerings.getdown.tools.Digester"
args project.ext.getdownWebsiteDir
inputs.dir(project.ext.getdownWebsiteDir)
@@ -778,6 +1031,22 @@ task getdown() {
group = "distribution"
description = "Create the minimal and full getdown app folder for installers and website and create digest file"
dependsOn getdownDigest
+ doLast {
+ if (reportRsyncCommand) {
+ def fromDir = getdownWebsiteDir + (getdownWebsiteDir.endsWith("/")?"":"/")
+ def toDir = getdown_rsync_dest + "/" + getdownDir + (getdownDir.endsWith("/")?"":"/")
+ println "LIKELY RSYNC COMMAND:"
+ println "mkdir -p '$toDir'\nrsync -avh --delete '$fromDir' '$toDir'"
+ if (RUNRSYNC == "true") {
+ exec {
+ commandLine "mkdir", "-p", toDir
+ }
+ exec {
+ commandLine "rsync", "-avh", "--delete", fromDir, toDir
+ }
+ }
+ }
+ }
}
clean {
@@ -824,18 +1093,22 @@ task copyInstall4jTemplate(type: Copy) {
rename (install4jTemplate, install4jConfFile)
filter(ReplaceTokens, beginToken: '', endToken: '', tokens: ['9999999999': JAVA_VERSION])
filter(ReplaceTokens, beginToken: '$$', endToken: '$$',
- tokens: [
- 'JAVA_VERSION': JAVA_VERSION,
- 'JAVA_INTEGER_VERSION': JAVA_INTEGER_VERSION,
- 'VERSION': JALVIEW_VERSION,
- 'MACOS_JAVA_VM_DIR': macosJavaVMDir,
- 'MACOS_JAVA_VM_TGZ': macosJavaVMTgz,
- 'WINDOWS_JAVA_VM_DIR': windowsJavaVMDir,
- 'WINDOWS_JAVA_VM_TGZ': windowsJavaVMTgz,
- 'INSTALL4JINFOPLISTFILEASSOCIATIONS': install4jInfoPlistFileAssociations,
- 'COPYRIGHT_MESSAGE': install4jCopyrightMessage,
- 'MACOS_BUNDLE_ID': install4jMacOSBundleId
- ]
+ tokens: [
+ 'JAVA_VERSION': JAVA_VERSION,
+ 'JAVA_INTEGER_VERSION': JAVA_INTEGER_VERSION,
+ 'VERSION': JALVIEW_VERSION,
+ 'MACOS_JAVA_VM_DIR': macosJavaVMDir,
+ 'MACOS_JAVA_VM_TGZ': macosJavaVMTgz,
+ 'WINDOWS_JAVA_VM_DIR': windowsJavaVMDir,
+ 'WINDOWS_JAVA_VM_TGZ': windowsJavaVMTgz,
+ 'INSTALL4JINFOPLISTFILEASSOCIATIONS': install4jInfoPlistFileAssociations,
+ 'COPYRIGHT_MESSAGE': install4jCopyrightMessage,
+ 'MACOS_BUNDLE_ID': install4jMacOSBundleId,
+ 'GETDOWN_RESOURCE_DIR': getdown_resource_dir,
+ 'GETDOWN_DIST_DIR': getdown_app_dir,
+ 'GETDOWN_ALT_DIR': getdown_app_dir_alt,
+ 'GETDOWN_INSTALL_DIR': getdown_install_dir
+ ]
)
if (OSX_KEYPASS=="") {
filter(ReplaceTokens, beginToken: 'codeSigning macEnabled="', endToken: '"', tokens: ['true':'codeSigning macEnabled="false"'])
@@ -859,13 +1132,13 @@ task copyInstall4jTemplate(type: Copy) {
// include uninstaller applescript app files in dmg
def installerDMGUninstallerXml = file("$install4jDir/$install4jDMGUninstallerAppFiles").text
ant.replaceregexp(
- byline: false,
- flags: "s",
- match: '',
- replace: installerDMGUninstallerXml,
- file: install4jConf
+ byline: false,
+ flags: "s",
+ match: '',
+ replace: installerDMGUninstallerXml,
+ file: install4jConf
)
- */
+ */
}
}
@@ -882,16 +1155,95 @@ task installers(type: com.install4j.gradle.Install4jTask) {
if (OSX_KEYPASS) {
macKeystorePassword=OSX_KEYPASS
-
+
}
-
+
inputs.dir(project.ext.getdownWebsiteDir)
inputs.file(install4jConf)
inputs.dir(macosJavaVMDir)
inputs.dir(windowsJavaVMDir)
outputs.dir("$jalviewDir/$install4jBuildDir/$JAVA_VERSION")
+
}
clean {
delete install4jConf
}
+
+task sourceDist (type: Tar) {
+
+ def VERSION_UNDERSCORES = JALVIEW_VERSION.replaceAll("\\.", "_")
+ def outputFileName = project.name + "_" + VERSION_UNDERSCORES + ".tar.gz"
+ // cater for buildship < 3.1 [3.0.1 is max version in eclipse 2018-09]
+ try {
+ archiveFileName = outputFileName
+ } catch (Exception e) {
+ archiveName = outputFileName
+ }
+
+ compression Compression.GZIP
+
+ into project.name
+
+ def EXCLUDE_FILES=["build/*","bin/*","test-output/","test-reports","tests","clover*/*"
+ ,".*"
+ ,"benchmarking/*"
+ ,"**/.*"
+ ,"*.class"
+ ,"**/*.class","$j11modDir/**/*.jar","appletlib","**/*locales"
+ ,"*locales/**",
+ ,"utils/InstallAnywhere"]
+ def PROCESS_FILES=[ "AUTHORS",
+ "CITATION",
+ "FEATURETODO",
+ "JAVA-11-README",
+ "FEATURETODO",
+ "LICENSE",
+ "**/README",
+ "RELEASE",
+ "THIRDPARTYLIBS","TESTNG",
+ "build.gradle",
+ "gradle.properties",
+ "**/*.java",
+ "**/*.html",
+ "**/*.xml",
+ "**/*.gradle",
+ "**/*.groovy",
+ "**/*.properties",
+ "**/*.perl",
+ "**/*.sh"]
+
+ from(jalviewDir) {
+ exclude (EXCLUDE_FILES)
+ include (PROCESS_FILES)
+ filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: ['Version-Rel': JALVIEW_VERSION,'Year-Rel': getDate("yyyy")])
+ }
+ from(jalviewDir) {
+ exclude (EXCLUDE_FILES)
+ exclude (PROCESS_FILES)
+ exclude ("appletlib")
+ exclude ("**/*locales")
+ exclude ("*locales/**")
+ exclude ("utils/InstallAnywhere")
+
+ exclude (getdown_files_dir)
+ exclude (getdown_website_dir)
+
+ // exluding these as not using jars as modules yet
+ exclude ("$j11modDir/**/*.jar")
+}
+// from (jalviewDir) {
+// // explicit includes for stuff that seemed to not get included
+// include(fileTree("test/**/*."))
+// exclude(EXCLUDE_FILES)
+// exclude(PROCESS_FILES)
+// }
+}
+
+task helppages {
+ dependsOn copyHelp
+ dependsOn pubhtmlhelp
+
+ inputs.dir("$classes/$helpDir")
+ outputs.dir("$helpOutputDir")
+}
diff --git a/doc/NEW_JARS b/doc/NEW_JARS
new file mode 100644
index 0000000..d7b1c56
--- /dev/null
+++ b/doc/NEW_JARS
@@ -0,0 +1,52 @@
+## this command gets a list of jars in j11lib/ that are not present or different content in lib/. The output is below.
+#for y in j11lib/*.jar; do x=${y##*/}; if [ \! -e ./lib/$x ] || ! diff ./lib/$x $y; then echo $y; fi; done
+#
+j11lib/FastInfoset.jar
+j11lib/getdown-core.jar
+j11lib/groovy-2.5.7.jar
+j11lib/groovy-ant-2.5.7.jar
+j11lib/groovy-bsf-2.5.7.jar
+j11lib/groovy-cli-commons-2.5.7.jar
+j11lib/groovy-cli-picocli-2.5.7.jar
+j11lib/groovy-console-2.5.7.jar
+j11lib/groovy-datetime-2.5.7.jar
+j11lib/groovy-dateutil-2.5.7.jar
+j11lib/groovy-docgenerator-2.5.7.jar
+j11lib/groovy-groovydoc-2.5.7.jar
+j11lib/groovy-groovysh-2.5.7.jar
+j11lib/groovy-jaxb-2.5.7.jar
+j11lib/groovy-jmx-2.5.7.jar
+j11lib/groovy-json-2.5.7.jar
+j11lib/groovy-json-direct-2.5.7.jar
+j11lib/groovy-jsr223-2.5.7.jar
+j11lib/groovy-macro-2.5.7.jar
+j11lib/groovy-nio-2.5.7.jar
+j11lib/groovy-servlet-2.5.7.jar
+j11lib/groovy-sql-2.5.7.jar
+j11lib/groovy-swing-2.5.7.jar
+j11lib/groovy-templates-2.5.7.jar
+j11lib/groovy-test-2.5.7.jar
+j11lib/groovy-test-junit5-2.5.7.jar
+j11lib/groovy-testng-2.5.7.jar
+j11lib/groovy-xml-2.5.7.jar
+j11lib/istack-commons-runtime.jar
+j11lib/javax.activation-MODULE.jar
+j11lib/javax.annotation-api-MODULE.jar
+j11lib/javax.jws-api-1.1.jar
+j11lib/javax.servlet-api-MODULE.jar
+j11lib/javax.xml.rpc-api-1.1.2.jar
+j11lib/javax.xml.soap-api.jar
+j11lib/jaxb-api-java9.jar
+j11lib/jaxb-runtime.jar
+j11lib/jaxws-api.jar
+j11lib/jersey-client-1.19.1.jar
+j11lib/jersey-core-1.19.1.jar
+j11lib/jersey-json-1.19.1.jar
+j11lib/jsr311-api-1.1.1.jar
+j11lib/mimepull.jar
+j11lib/policy.jar
+j11lib/stax-ex.jar
+j11lib/stax2-api-MODULE.jar
+j11lib/streambuffer.jar
+j11lib/txw2.jar
+j11lib/wsdl4j-MODULE.jar
diff --git a/doc/building-OLD.html b/doc/building-OLD.html
deleted file mode 100755
index f5e0b28..0000000
--- a/doc/building-OLD.html
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-Building Jalview from Source
-
-
-
Building Jalview from Source
-
-
-
-You will need the following:
-
-
Obtain: git
-
Build/run: Java Development Kit (JDK). JDK11 is now the recommended platform for developing with Jalview. You can obtain a pre-compiled JDK11 for many platforms from https://adoptopenjdk.net/
-
Build: Gradle 5.1 or later. On linux you can obtain this with your package manager (e.g. sudo yum install gradle or sudo apt install gradle or on macOS with brew with brew install gradle
-
-With any luck, once you check out the Jalview source from git and set your JAVA_HOME and PATH correctly, you just need to change to the jalview directory and run gradle getdown.
-
-
-
Obtaining Jalview
-
This is easiest achieved with git:
-
git clone http://www.jalview.org/git/jalview.git
-Then you can cd jalview to get into the top level jalview dir.
-
-
-
-
Minimal Jalview build
-
To run Jalview, you just need the jalview classes and the .jar libraries that Jalview depends on.
-
-
-
-
-Jalview development team
-
-
-
diff --git a/doc/building.md b/doc/building.md
new file mode 100644
index 0000000..5f5fa6d
--- /dev/null
+++ b/doc/building.md
@@ -0,0 +1,501 @@
+# Building Jalview from Source
+
+## tl;dr
+
+```
+# download
+git clone http://source.jalview.org/git/jalview.git
+# compile
+cd jalview
+gradle shadowJar
+# run
+java -jar build/libs/jalview-all-11.jar
+
+# and/or create launcher
+gradle getdown
+# use launcher
+cd getdown/files
+java -jar getdown-launcher.jar . jalview
+```
+
+
+## Setting up
+
+The method here is described in terms of using a command line. You can easily do this on linux or in a Terminal window in macOS. You can do it in Windows.
+
+* Java 11 compliant JDK
+* gradle 5.2 or above
+* git
+
+> The versions and installation methods here are just suggestions (which we have tested
+so are known to work). If you need or wish to use different implementations (particularly
+you might need a bespoke JDK if you are on an exotic architecture) then the general
+build instructions should work with any gradle 5+. You should be able to compile the
+bytecode with any JDK Java 11+. The resulting bytecode (in particular the shadow jar)
+should be runnable in any JRE Java 1.8+. Remember that because Jalview and the getdown launcher
+are Java bytecode you can build on one system where you might have gradle, and run
+on another where you don't (JRE 1.8+ required).
+
+### Java 11 compliant JDK
+
+#### All platforms
+We recommend obtaining an OpenJDK JDK 11 (since 11 is the long term support release) from AdoptOpenJDK: , either the *Installer* or `.zip`/`.tar.gz` variants whichever you prefer (if you're not sure, choose the *Installer*).
+
+>##### Alternative/CLI install of AdoptOpenJDK 11
+>
+>You can also install adoptopenjdk11 using either `brew` (macOS), `choco` (Windows)
+(see the section on `gradle` and `git` for more informaiton on `brew` and `choco`)
+or `yum` or `apt` (Linux):
+>
+>###### alternative for MacOS and Homebrew
+>```
+>brew tap adoptopenjdk/openjdk
+>brew cask install adoptopenjdk11
+>```
+>
+>###### alternative for Windows and Chocolatey
+>```
+>choco install adoptopenjdk11
+>```
+>
+>###### alternative for Linux with yum/apt
+>
+>see
+
+
+### gradle and git
+You should be able to install the latest (or sufficiently recent) versions of gradle and git using your OS package manager.
+
+#### MacOS
+we recommend using `brew`, which can be installed following the instructions at .
+After installing `brew`, open a Terminal window and type in (using an Administrator privileged user):
+
+```bash
+brew install gradle git
+```
+
+or if you aready have them installed but need to upgrade the version:
+
+```bash
+brew upgrade gradle git
+```
+
+#### Windows
+
+we suggest using the **Chocolatey** package manager. See install instructions at , and you will just need
+
+```bash
+choco install gradle
+choco install git
+```
+
+Alternatively, you could install a real `bash` shell and install both `gradle` and `git` through `apt-get`.
+See
+for how to install the ubuntu bash shell in Windows 10.
+
+Another alternative would be to install them separately. For `gradle` follow the instructions at , and for `git` here are a couple of suggestions: Git for Windows .
+Getting the individual installs working together on the command line will be trickier
+so we recommend using Chocolatey or bash.
+
+
+#### Linux
+this will depend on which distribution you're using.
+
+##### For *Debian* based distributions (e.g. Mint, Ubuntu, Debian)
+run
+
+```bash
+ sudo apt-get install gradle git
+```
+
+##### for RPM-based distributions (e.g. Fedora, CentOS, RedHat)
+run
+
+```bash
+sudo yum install gradle git
+```
+
+If you have some other version of linux you'll probably be able to work it out!
+
+
+
+
+## Downloading the Jalview source tree
+
+This can be done with `git`.
+On the command line, change directory to where you want to download Jalview's build-tree
+top level directory. Then run
+
+```bash
+git clone http://source.jalview.org/git/jalview.git
+```
+
+You'll get some progress output and after a minute or two you should have the full
+Jalview build-tree in the folder `jalview`.
+
+### What's in the source tree?
+
+Jalview is a mature product with its codebase going back many years. As such it doesn't
+have a folder structure that most new gradle projects would have, so you might not
+find everything in the place you might expect. Here's a brief description of what
+you might find in the main folders under the `jalview` tree.
+
+Within the `jalview` folder you will find (of possible interest):
+
+ dir/ or file | contains
+---------------------|----------------------------------------------------------------------------------------------------------------
+ `bin/` | used by eclipse for compiled classes -- no need to touch this
+ `build/` | the gradle build dir
+ `classes/` | contains the compiled Java classes for the Jalview application
+ `dist/` | assembled `.jar` files needed to run Jalview application
+ `examples/` | example input files usable by Jalview
+ `getdown/` | the libraries used by the Javliew launcher (getdown)
+ `getdown/src/` | our modified source for `getdown`
+ `getdown/website/` | the assembled "download" folder used by getdown for downloads/upgrades
+ `getdown/files/` | the minimal fileset to launch the Jalview launcher, which can then download the rest of the Jalview application
+ `help/` | the help documents
+ `j8lib/` | libraries needed to run Jalview under Java 1.8
+ `j11lib/` | libraries needed to run Jalivew under Java 11
+ `resource/` | non-java resources used in the Jalview application
+ `src/` | the Jalview application source `.java` files
+ `test/` | Test class source files
+ `utils/` | helper applications used in the build process
+ `utils/install4j/` | files used by the packaging tool, install4j
+ `build.gradle` | the build file used by gradle
+ `gradle.properties` | configurable properties for the build process
+
+Note that you need a Java 11 JDK to compile Jalview whether your target build is Java 1.8 or Java 11.
+
+
+## Building Jalview
+
+You will need to have the Java 11 `javac` in your path, or alternatively you can configure
+gradle to know where this is by putting
+
+```
+org.gradle.java.home=/path_to_jdk_directory
+```
+in the `gradle.properties` file.
+
+> *You may want to see some of the other properties you can change at the end of this document.*
+
+### Minimal Jalview Build
+
+To compile the necessary class files, just run
+
+```bash
+gradle compileJava
+```
+to compile the classes into the `classes` folder.
+You should now be able to run the Jalview application directly with
+
+```bash
+java -cp "classes:resources:help:j11lib/*" jalview.bin.Jalview
+```
+
+You can also run with an automatic large memory setting (which will set the maximum
+memory heap of the Jalview JVM to 90% of your local physical memory) and docked icon setting
+(if possible in your OS) with
+
+```bash
+java -cp "classes:resources:help:j11lib/*" jalview.bin.Launcher
+```
+
+>*You must use just "`j11lib/*`" and not "`j11lib/*.jar`" as this is a special Java
+classpath argument wildcard interpreted by `java`, **not** a shell expansion wildcard interpreted
+by the shell.*
+
+Note that `jalview.bin.Launcher` is a simplified launcher class that re-launches `jalview.bin.Jalview`
+with the same JRE (*not* the same JVM instance), classpath and arguments, but with an automatically determined `-Xmx...`
+memory setting if one hasn't been provided.
+
+### Jalview in a Jar File
+
+To package the `classes`, `resources`, and `help` into one jar, you can run
+
+```bash
+gradle jar
+```
+which assembles the Jalview classes and resources into `dist/jalview.jar`
+
+To run this, use
+
+```bash
+java -cp "dist/jalview.jar:j11lib/*" jalview.bin.Jalview
+```
+
+### Distributed Jar Files
+
+To simplify this, all required `.jar` files can be assembled into the `dist` folder
+using
+
+```bash
+gradle makeDist
+```
+which puts all required jar files into `dist` so you can run with
+
+```bash
+java -cp "dist/*" jalview.bin.Jalview
+```
+
+### Single *shadow* Jar File
+
+The shadow jar file is a single `.jar` that contains all required classes and resources from `jalview.jar`
+and all of the supporting libraries in `j11lib/*.jar` merged into one `.jar` archive
+file. A default launching class (`MAIN-CLASS: jalview.bin.Launcher`) is specified in the `.jar`
+manifest file (`META/MANIFEST.MF`) so a start class doesn't need to be specified.
+
+Build the shadow jar file in `build/lib/jalview-all-11.jar` with
+
+```bash
+gradle shadowJar
+```
+and run it with
+
+```bash
+java -jar build/lib/jalview-all-11.jar
+```
+
+Because no arguments are required, most OSes will associate a `.jar` file with the
+`java` application (if this has been installed through the OS and not just a local
+unzip) as a `-jar` argument so you may find you can launch `jalview-all-11.jar`
+just by double-clicking on it)!
+
+> The `shadowJar` task is not a requirement for any other task, so to build the shadow
+jar file you must specify the `shadowJar` task.
+
+> The shadow jar file represents probably the simplest way to distribute the Jalview application to machines that already have a Java 11 installed,
+although without the many and compelling benefits of the `getdown` launcher.
+
+
+### Building the `getdown` launcher
+
+We have made significant customisations to the `getdown` launcher which you can find
+in `getdown/src/getdown`.
+
+> You don't need to build this afresh as the required `gradle-core.jar`
+and `gradle-launcher.jar` files are already distributed in `j11lib` and `getdown/lib` but if you want to, then
+you'll need a working Maven and also a Java 8 JDK. Ensure the Java 8 `javac` is forefront
+in your path and do
+>
+>```bash
+>cd getdown/src/getdown
+>mvn clean package -Dgetdown.host.whitelist="jalview.org,*.jalview.org"
+>```
+> and you will find the required `.jar` files in `core/target/gradle-core-XXX.jar`
+and `launcher/target/gradle-launcher-XXX.jar`. The `gradle-core.jar` should then be copied
+to all three of the `j8lib`, `j11lib` and `getdown/lib` folders, whilst the `gradle-launcher.jar` only
+needs to be copied to `getdown/lib`.
+>
+>The `mvn` command should ideally include the `-Dgetdown.host.whitelist=*.jalview.org` setting.
+ This, and the necessary file copying commands, can be found in `getdown/src/getdown/mvn_cmd`.
+
+To assemble Jalview with `getdown` use the following gradle task:
+
+```bash
+gradle getdown
+```
+
+This puts all the necessary files to launch Jalview with `getdown`
+into `getdown/website/11/`. This could be treated as the reference folder
+for `getdown`, which is where a getdown launcher will check to see if the Jalview application
+files it has are up to date, and download if they aren't or it simply doesn't have
+them.
+
+A minimal getdown-launcher can be found in `getdown/files/11/` which checks its up-to-date
+status with (the absolute path to) `getdown/website/11/`.
+
+This can be launched with
+
+```bash
+java -jar getdown/files/11/getdown-launcher.jar getdown/files/11/ jalview
+```
+
+> We've already met the `-jar file.jar` arguments. The next argument is the working folder for
+getdown, and the final argument, "`jalview`", is a getdown application id (only "`jalview`"
+is defined here).
+
+
+### Running tests
+
+There are substantial tests written for Jalview that use TestNG, which you can run with
+
+```bash
+gradle test
+```
+
+These normally take around 5 - 10 minutes to complete and outputs its full results into
+the `tests/` folder. A summary of results should appear in your console.
+
+You can run different defined groups of tests with
+
+```bash
+gradle test -PtestngGroups=Network
+```
+
+Available groups are Functional (default), Network, External.
+
+
+### Installer packaging with *install4j*
+
+Jalview is currently using *install4j*
+as its installer packaging tool.
+
+If you have a licensed installation of *install4j* you can build Jalview installers
+by running
+
+```bash
+gradle installers
+```
+
+though you may need to fiddle with the `install4j` and `copyInstall4jTemplate` tasks
+in `build.gradle` file to point to your installation of *install4j* and also to bundled
+JREs if you want to bundle those into the installers.
+
+If you want more details, get in touch on our development mailing list .
+Sign up at .
+
+
+## Building in Eclipse
+
+We develop in Eclipse, and support settings to develop and save Jalview source code
+in our preferred style. We also support running the Jalview application, debugging
+and running tests with TestNG from within Eclipse.
+
+To get Jalview set up as a project in Eclipse, we recommend using at least the 2019-03
+version of Eclipse IDE for Java Developers which you can download from the Eclipse
+website:
+
+Once installed, we also recommend installing several plugins from the Eclipse Marketplace.
+
+To do so, launch Eclipse, and go to Help->Eclipse Marketplace...
+
+Search for and install:
+
+1. Buildship Gradle Integration 3.0 (or greater)
+1. Groovy Development Tools 3.4.0 (or greater)
+1. TestNG for Eclipse (optional -- only needed if you want to run tests from Eclipse)
+
+> At time of writing, TestNG for Eclipse does not show up in the Eclipse Marketplace
+as the latest released version does not install in Eclipse 2019-03.
+However, you can install a working beta of TestNG for Eclipse by going to
+>
+Help->Install New Software...
+>
+and entering
+>
+`TestNG Eclipse Composite P2 Repo - http://beust.com/eclipse-beta`
+>
+into the *Work with* box and click on the *Add...* button.
+>
+Eclipse might pause for a bit with the word *Pending* in the table below at this point, but it will eventually list TestNG with
+a selection box under the *Name* column.
+>
+Select *TestNG* and carry on through the
+install process to install the TestNG plugin.
+
+After installing the plugins, it is a good to get Java 11 set up in Eclipse as the default JRE.
+
+To do this go to Preferences (Eclipse->Preferences in macOS, File->Preferences
+on Windows or Window->Preferences on Linux) and find
+
+Java -> Installed JREs
+
+If your Java 11 installation is not listed, click on
+
+*Add* -> Standard VM -> *Next*
+
+and enter the JRE home. You can browse to where it was installed. Give it a name (like "AdoptOpenJDK 11"). Select this JDK
+as the default JRE and click on *Apply and Close*.
+
+
+You can now import Jalview. It is important to import
+Jalview as a Gradle project (not as a Java project), so go to
+
+File->Import...
+
+find and select
+
+Gradle->Existing Gradle Project
+
+and then click on the *Next >* button.
+
+In the following options, it is the *Project Root Directory* you should set to be the
+`jalview` folder that git downloaded. Then you can click on the *Finish* button.
+
+
+## Gradle properties
+
+There are a lot of properties configured in `gradle.properties` which we strongly recommend
+being left as they are unless you have a specific problem with the build process.
+
+There are a few gradle properties you might want to set on the command line with the
+`-P` flag when building a version of Jalview with specific requirements:
+
+#### `JAVA_VERSION`
+This changes the *target* java bytecode version
+> NOTE that you will need to use a Java 11 (or greater) JDK Java compiler to build
+Jalview for any byte-code target version.
+
+Valid values are `11` and `1.8`.
+
+e.g.
+
+```bash
+gradle shadowJar -PJAVA_VERSION=1.8
+```
+
+When using `-PJAVA_VERSION=1.8` the libraries from `j8lib` (instead of `j11lib`) will be used in the compile
+and runtime classpath and also used in the `makeDist` build step. Where a Java version of `11` is used in folder and file names, it will
+instead use `1.8`. Also if you are building installer packages with *install4j* the
+package builder will look for JRE 1.8 bundles to package in the installers.
+
+> Note that continued development of Jalview will assume a Java 11+ runtime environment,
+the 2.11.0 release will run under a Java 1.8 JRE with a few minor features disabled.
+
+#### `CHANNEL`
+This changes the `appbase` setting in `getdown.txt` (`appbase` is where the getdown launcher
+looks to see if there's an updated file) to point to a particular Jalview
+channel. Expected values are `FILE`, `STABLE`, `DEVELOPMENT`, or a specific version
+of Jalview like `2.11` or `2.10.5`.
+
+A value of `FILE` behaves differently to the other expected values and will use a local
+file-system scheme URI instead of a Jalview release channel. This `file:` scheme URI
+uses an absolute path to the `getdown/website/`
+
+On a regular development machine, this property will default to `LOCAL`.
+
+e.g.
+```bash
+gradle getdown -PCHANNEL=DEVELOPMENT
+```
+
+#### `MEDIA_TYPES`
+If you are building *install4j* installers (requires *install4j* to be installed) then this property specifies a comma-separated
+list of media types (i.e. platform specific installers) *install4j* should actually build.
+
+Currently the valid values are
+`linuxDeb`,
+`linuxRPM`,
+`macosArchive`,
+`unixArchive`,
+`unixInstaller`,
+`windows`
+
+The default value is all of them.
+
+e.g.
+```bash
+gradle installers -PJAVA_VERSION=1.8 -PMEDA_TYPE=macosArchive
+```
+
+To get an up-to-date list of possible values, you can run
+
+```bash
+perl -n -e 'm/^\s*<(\w+)[^>]*\bmediaFileName=/ && print "$1\n";' utils/install4j/install4j_template.install4j | sort -u
+```
+in the `jalview` root folder.
+
+
+---
+[Jalview Development Team](mailto:help@jalview.org)
diff --git a/doc/convert.sh b/doc/convert.sh
new file mode 100644
index 0000000..fbfa17d
--- /dev/null
+++ b/doc/convert.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+pandoc -s -o building.html building.md --metadata pagetitle="Building Jalview from Source" --toc -H github.css
diff --git a/doc/getdown_installation_structure.pdf b/doc/getdown_installation_structure.pdf
new file mode 100644
index 0000000..9fc0dc6
Binary files /dev/null and b/doc/getdown_installation_structure.pdf differ
diff --git a/doc/github.css b/doc/github.css
new file mode 100644
index 0000000..9018d8a
--- /dev/null
+++ b/doc/github.css
@@ -0,0 +1,662 @@
+
diff --git a/getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar b/getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar
deleted file mode 100644
index 4a90866..0000000
Binary files a/getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar and /dev/null differ
diff --git a/getdown/lib/getdown-core.jar b/getdown/lib/getdown-core.jar
new file mode 100644
index 0000000..bbe1476
Binary files /dev/null and b/getdown/lib/getdown-core.jar differ
diff --git a/getdown/lib/getdown-launcher-local.jar b/getdown/lib/getdown-launcher-local.jar
new file mode 100644
index 0000000..4a36222
Binary files /dev/null and b/getdown/lib/getdown-launcher-local.jar differ
diff --git a/getdown/lib/getdown-launcher.jar b/getdown/lib/getdown-launcher.jar
index aeb6e0c..85ede0c 100644
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
diff --git a/getdown/src/getdown/.project-MOVED b/getdown/src/getdown/.project-MOVED
deleted file mode 100644
index ccd1d40..0000000
--- a/getdown/src/getdown/.project-MOVED
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- getdown
-
-
-
-
-
- org.eclipse.m2e.core.maven2Builder
-
-
-
-
-
- org.eclipse.m2e.core.maven2Nature
-
-
diff --git a/getdown/src/getdown/.settings/org.eclipse.core.resources.prefs b/getdown/src/getdown/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 99f26c0..0000000
--- a/getdown/src/getdown/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/=UTF-8
diff --git a/getdown/src/getdown/.settings/org.eclipse.m2e.core.prefs b/getdown/src/getdown/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f..0000000
--- a/getdown/src/getdown/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/getdown/src/getdown/.travis.yml b/getdown/src/getdown/.travis.yml
deleted file mode 100644
index 32f2196..0000000
--- a/getdown/src/getdown/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: java
-sudo: false
-script: "mvn -B clean verify"
-
-cache:
- directories:
- - '$HOME/.m2/repository'
-
-jdk:
- - openjdk7
- - oraclejdk8
diff --git a/getdown/src/getdown/ant/pom.xml b/getdown/src/getdown/ant/pom.xml
index f8231aa..6d6f8e9 100644
--- a/getdown/src/getdown/ant/pom.xml
+++ b/getdown/src/getdown/ant/pom.xml
@@ -4,7 +4,7 @@
com.threerings.getdowngetdown
- 1.8.3-SNAPSHOT
+ 1.8.3-1.1.8_FJVLgetdown-ant
diff --git a/getdown/src/getdown/core/pom.xml b/getdown/src/getdown/core/pom.xml
index efec8b6..51d3d5f 100644
--- a/getdown/src/getdown/core/pom.xml
+++ b/getdown/src/getdown/core/pom.xml
@@ -4,7 +4,7 @@
com.threerings.getdowngetdown
- 1.8.3-SNAPSHOT
+ 1.8.3-1.1.8_FJVLgetdown-core
@@ -35,6 +35,9 @@
separated by commas (app1.foo.com,app2.bar.com,app3.baz.com). -->
jalview.org,*.jalview.org
+ 8
+ 15
+ false
@@ -83,6 +86,9 @@
+
+
+
diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
index 0de5c8a..7c2a427 100644
--- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
+++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
@@ -23,8 +23,6 @@ import java.util.concurrent.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
-import com.sun.management.OperatingSystemMXBean;
-import java.lang.management.ManagementFactory;
import jalview.bin.MemorySetting;
@@ -46,6 +44,9 @@ public class Application
{
/** The name of our configuration file. */
public static final String CONFIG_FILE = "getdown.txt";
+
+ /** Dir where a backup config file might reside */
+ public static final String BACKUP_CONFIG_DIR = "install";
/** The name of our target version file. */
public static final String VERSION_FILE = "version.txt";
@@ -69,14 +70,20 @@ public class Application
*/
public enum Step
{
- UPDATE_JAVA(10),
- VERIFY_METADATA(15, 65, 95),
- DOWNLOAD(40),
+ //UPDATE_JAVA(10),
+ UPDATE_JAVA(20),
+ //VERIFY_METADATA(15, 65, 95),
+ VERIFY_METADATA(15, 45, 90),
+ DOWNLOAD(60),
PATCH(60),
- VERIFY_RESOURCES(70, 97),
- REDOWNLOAD_RESOURCES(90),
- UNPACK(98),
- LAUNCH(99);
+ //VERIFY_RESOURCES(70, 97),
+ VERIFY_RESOURCES(40, 90),
+ //REDOWNLOAD_RESOURCES(90),
+ REDOWNLOAD_RESOURCES(80),
+ //UNPACK(98),
+ UNPACK(95),
+ //LAUNCH(99);
+ LAUNCH(100);
/** What is the final percent value for this step? */
public final List defaultPercents;
@@ -103,6 +110,9 @@ public class Application
/** The paths (relative to the appdir) of images for the window icon. */
public final List iconImages;
+ /** The path (relative to the appdir) to a single background image to appear first. */
+ public final String instantBackgroundImage;
+
/** The path (relative to the appdir) to a single background image. */
public final String backgroundImage;
@@ -142,6 +152,21 @@ public class Application
/** Whether progress text should be hidden or not. */
public final boolean hideProgressText;
+ /** Whether the splash screen should update non-asynchronously before being shown. */
+ public final boolean progressSync;
+
+ /** Whether the splash screen should update non-asynchronously after being shown. */
+ public final boolean progressSyncAfterShown;
+
+ /** Whether the splash screen should retain focus. */
+ public final boolean keepOnTop;
+
+ /** Whether to display the appbase. */
+ public final boolean displayAppbase;
+
+ /** Whether to display the version. */
+ public final boolean displayVersion;
+
/** The minimum number of seconds to display the GUI. This is to prevent the GUI from
* flashing up on the screen and immediately disappearing, which can be confusing to the
* user. */
@@ -155,12 +180,14 @@ public class Application
@Override
public String toString ()
{
- return "[name=" + name + ", bg=" + background + ", bg=" + backgroundImage +
+ return "[name=" + name + ", bg=" + background + ", bg=" + backgroundImage + ", instant_bg=" + instantBackgroundImage +
", pi=" + progressImage + ", prect=" + progress + ", pt=" + progressText +
", pb=" + progressBar + ", srect=" + status + ", st=" + statusText +
", shadow=" + textShadow + ", err=" + installError + ", nrect=" + patchNotes +
", notes=" + patchNotesUrl + ", stepPercentages=" + stepPercentages +
- ", hideProgressText" + hideProgressText + ", minShow=" + minShowSeconds + "]";
+ ", hideProgressText=" + hideProgressText + ", keepOnTop=" + keepOnTop + ", progressSync=" + progressSync +
+ ", progressSyncAfterShown=" + progressSyncAfterShown + ", minShow=" + minShowSeconds +
+ ", displayAppbase=" + displayAppbase + ", displayVersion=" + displayVersion + "]";
}
public UpdateInterface (Config config)
@@ -168,7 +195,12 @@ public class Application
this.name = config.getString("ui.name");
this.progress = config.getRect("ui.progress", new Rectangle(5, 5, 300, 15));
this.progressText = config.getColor("ui.progress_text", Color.BLACK);
- this.hideProgressText = config.getBoolean("ui.hide_progress_text");
+ this.hideProgressText = config.getBoolean("ui.hide_progress_text");
+ this.progressSync = config.getBoolean("ui.progress_sync_before_shown");
+ this.progressSyncAfterShown = config.getBoolean("ui.progress_sync_after_shown");
+ this.keepOnTop = config.getBoolean("ui.keep_on_top");
+ this.displayAppbase = config.getBoolean("ui.display_appbase");
+ this.displayVersion = config.getBoolean("ui.display_version");
this.minShowSeconds = config.getInt("ui.min_show_seconds", 5);
this.progressBar = config.getColor("ui.progress_bar", 0x6699CC);
this.status = config.getRect("ui.status", new Rectangle(5, 25, 500, 100));
@@ -176,6 +208,7 @@ public class Application
this.textShadow = config.getColor("ui.text_shadow", Color.CLEAR);
this.hideDecorations = config.getBoolean("ui.hide_decorations");
this.backgroundImage = config.getString("ui.background_image");
+ this.instantBackgroundImage = config.getString("ui.instant_background_image");
// default to black or white bg color, depending on the brightness of the progressText
int defaultBackground = (0.5f < Color.brightness(this.progressText)) ?
Color.BLACK : Color.WHITE;
@@ -250,15 +283,16 @@ public class Application
*
*/
public Application (EnvConfig envc) {
- _envc = envc;
- _config = getLocalPath(envc.appDir, CONFIG_FILE);
+ _envc = envc;
+ _config = getLocalPath(envc.appDir, CONFIG_FILE);
+ _backupConfig = getLocalPath(envc.appDir, BACKUP_CONFIG_DIR+File.separator+CONFIG_FILE);
}
/**
* Returns the configured application directory.
*/
public File getAppDir () {
- return _envc.appDir;
+ return _envc.appDir;
}
/**
@@ -267,7 +301,7 @@ public class Application
*/
public boolean useCodeCache ()
{
- return _useCodeCache;
+ return _useCodeCache;
}
/**
@@ -276,7 +310,7 @@ public class Application
*/
public int getCodeCacheRetentionDays ()
{
- return _codeCacheRetentionDays;
+ return _codeCacheRetentionDays;
}
/**
@@ -284,7 +318,7 @@ public class Application
* app files from its hosting server.
*/
public int maxConcurrentDownloads () {
- return _maxConcDownloads;
+ return _maxConcDownloads;
}
/**
@@ -292,11 +326,11 @@ public class Application
*/
public Resource getConfigResource ()
{
- try {
- return createResource(CONFIG_FILE, Resource.NORMAL);
- } catch (Exception e) {
- throw new RuntimeException("Invalid appbase '" + _vappbase + "'.", e);
- }
+ try {
+ return createResource(CONFIG_FILE, Resource.NORMAL);
+ } catch (Exception e) {
+ throw new RuntimeException("Invalid appbase '" + _vappbase + "'.", e);
+ }
}
/**
@@ -304,7 +338,7 @@ public class Application
*/
public List getCodeResources ()
{
- return _codes;
+ return _codes;
}
/**
@@ -571,6 +605,15 @@ public class Application
} catch (Exception e) {
log.warning("Failure reading config file", "file", _config, e);
}
+ if (config == null || config.getString("appbase") == null || config.getString("appbase").isEmpty()) {
+ try {
+ Config backupConfig = Config.parseConfig(_backupConfig, opts);
+ config = backupConfig;
+ log.warning("Using backup config file", "appdir", getAppDir(), "backupConfig", _backupConfig.getAbsoluteFile());
+ } catch (Exception e) {
+ log.warning("Failure reading backup config file", "file", _backupConfig, e);
+ }
+ }
// see if there's an override config from locator file
Config locatorConfig = createLocatorConfig(opts);
@@ -776,14 +819,16 @@ public class Application
ARG: for (int i = 0; i < _jvmargs.size(); i++) {
if (_jvmargs.get(i) instanceof java.lang.String && _jvmargs.get(i).startsWith("-Xmx")) {
_jvmargs.remove(i);
+ break ARG;
}
}
addAll(maxMemHeapArg, _jvmargs);
+ log.info("Max memory set", "maxMemHeapArg", maxMemHeapArg[0]);
}
} else if (jvmmempc != -1) {
- System.out.println("'jvmmempc' value must be in range 0 to 100 (read as '"+Integer.toString(jvmmempc)+"')");
+ log.warning("'jvmmempc' value must be in range 0 to 100 (read as '"+Integer.toString(jvmmempc)+"')");
}
// get the set of optimum JVM arguments
@@ -1085,7 +1130,7 @@ public class Application
if (j > -1) {
ext = filename.substring(j+1);
}
- if (LOCATOR_FILE_EXTENSION.equals(ext.toLowerCase())) {
+ if (ext != null && LOCATOR_FILE_EXTENSION.equals(ext.toLowerCase())) {
// this file extension should have been dealt with in Getdown class
} else {
_appargs.add(0, "-open");
@@ -1866,35 +1911,43 @@ public class Application
try {
Config tmpConfig = null;
+ Map tmpData = new HashMap<>();
if (_locatorFile.exists()) {
tmpConfig = Config.parseConfig(_locatorFile, opts);
+ // appbase is sanitised in HostWhitelist
+ Map tmpConfigData = tmpConfig.getData();
+ if (tmpConfig != null) {
+ for (Map.Entry entry : tmpConfigData.entrySet()) {
+ String key = entry.getKey();
+ Object value = entry.getValue();
+ String mkey = key.indexOf('.') > -1 ? key.substring(key.indexOf('.') + 1) : key;
+ if (Config.allowedReplaceKeys.contains(mkey) || Config.allowedMergeKeys.contains(mkey)) {
+ tmpData.put(key, value);
+ }
+ }
+ } else {
+ log.warning("Error occurred reading config file", "file", _locatorFile);
+ }
} else {
log.warning("Given locator file does not exist", "file", _locatorFile);
}
- // appbase is sanitised in HostWhitelist
- Map tmpData = new HashMap<>();
- for (Map.Entry entry : tmpConfig.getData().entrySet()) {
- String key = entry.getKey();
- Object value = entry.getValue();
- String mkey = key.indexOf('.') > -1 ? key.substring(key.indexOf('.') + 1) : key;
- if (Config.allowedReplaceKeys.contains(mkey) || Config.allowedMergeKeys.contains(mkey)) {
- tmpData.put(key, value);
- }
- }
locatorConfig = new Config(tmpData);
} catch (Exception e) {
log.warning("Failure reading locator file", "file", _locatorFile, e);
}
- log.info("Returning locatorConfig", locatorConfig);
-
return locatorConfig;
}
+ public String getAppbase() {
+ return _appbase;
+ }
+
protected final EnvConfig _envc;
protected File _config;
+ protected File _backupConfig;
protected Digest _digest;
protected long _version = -1;
diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Build.java.tmpl b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Build.java.tmpl
index 60a8ff3..1023ede 100644
--- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Build.java.tmpl
+++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Build.java.tmpl
@@ -40,4 +40,37 @@ public class Build {
public static List hostWhitelist () {
return Arrays.asList(StringUtil.parseStringArray("@host_whitelist@"));
}
+
+ /*
+ *
The default connect_timeout to use. Overridden by system property of the same name at runtime
+ */
+ public static int defaultConnectTimeout () {
+ try {
+ return Integer.valueOf("@connect_timeout@");
+ } catch (Exception e) {
+ return 0;
+ }
+ }
+
+ /*
+ *
The default read_timeout to use. Overridden by system property of the same name at runtime
+ */
+ public static int defaultReadTimeout () {
+ try {
+ return Integer.valueOf("@read_timeout@");
+ } catch (Exception e) {
+ return 30;
+ }
+ }
+
+ /*
+ *
Whether to allow the local "file://" scheme for appbase
+ */
+ public static boolean allowLocatorFileProtocol() {
+ try {
+ return Boolean.valueOf("@allow_file_protocol@");
+ } catch (Exception e) {
+ return false;
+ }
+ }
}
diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/SysProps.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/SysProps.java
index 0d96ecb..8550461 100644
--- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/SysProps.java
+++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/SysProps.java
@@ -9,6 +9,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.threerings.getdown.util.VersionUtil;
+import com.threerings.getdown.data.Build;
/**
* This class encapsulates all system properties that are read and processed by Getdown. Don't
@@ -106,7 +107,7 @@ public class SysProps
* to more quickly timeout its startup update check if the server with which it is
* communicating is not available. Usage: {@code -Dconnect_timeout=N}. */
public static int connectTimeout () {
- return Integer.getInteger("connect_timeout", 0);
+ return Integer.getInteger("connect_timeout", Build.defaultConnectTimeout());
}
/** Specifies the read timeout (in seconds) to use when downloading all files from the server.
@@ -114,7 +115,7 @@ public class SysProps
* update process wil fail. Setting the timeout to zero (or a negative value) will disable it.
* Usage: {@code -Dread_timeout=N}. */
public static int readTimeout () {
- return Integer.getInteger("read_timeout", 30);
+ return Integer.getInteger("read_timeout", Build.defaultReadTimeout());
}
/** Returns the number of threads used to perform digesting and verifying operations in
diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/Config.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/Config.java
index e20bae2..8767ae0 100644
--- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/Config.java
+++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/Config.java
@@ -436,8 +436,8 @@ public class Config
} else if (allowedReplaceKeys.contains(mkey)){
// replace value
-
_data.put(key, nvalue);
+
} else {
log.warning("Not merging key '"+key+"' into config");
}
@@ -471,7 +471,7 @@ public class Config
private final Map _data;
- public static final List allowedReplaceKeys = Arrays.asList("appbase","apparg","jvmarg"); // these are the ones we might use
+ public static final List allowedReplaceKeys = Arrays.asList("appbase","apparg","jvmarg","jvmmempc"); // these are the ones we might use
public static final List allowedMergeKeys = Arrays.asList("apparg","jvmarg"); // these are the ones we might use
//private final List allowedMergeKeys = Arrays.asList("apparg","jvmarg","resource","code","java_location"); // (not exhaustive list here)
}
diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/HostWhitelist.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/HostWhitelist.java
index f2f7ef3..ff0661b 100644
--- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/HostWhitelist.java
+++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/HostWhitelist.java
@@ -59,5 +59,5 @@ public final class HostWhitelist
throw new MalformedURLException(
"The host for the specified URL (" + url + ") is not in the host whitelist: " + hosts);
}
- private static boolean ALLOW_LOCATOR_FILE_PROTOCOL = true;
+ private static final boolean ALLOW_LOCATOR_FILE_PROTOCOL = Build.allowLocatorFileProtocol();
}
diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/LaunchUtil.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/LaunchUtil.java
index f2cd573..ae493bb 100644
--- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/LaunchUtil.java
+++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/LaunchUtil.java
@@ -9,8 +9,14 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
import java.util.Locale;
+import javax.xml.bind.DatatypeConverter;
+
+import java.security.MessageDigest;
+
import static com.threerings.getdown.Log.log;
/**
@@ -125,6 +131,21 @@ public class LaunchUtil
return vmpath;
}
+ private static String _getMD5FileChecksum (File file) {
+ // check md5 digest
+ String algo = "MD5";
+ String checksum = "";
+ try {
+ MessageDigest md = MessageDigest.getInstance(algo);
+ md.update(Files.readAllBytes(Paths.get(file.getAbsolutePath())));
+ byte[] digest = md.digest();
+ checksum = DatatypeConverter.printHexBinary(digest).toUpperCase();
+ } catch (Exception e) {
+ System.out.println("Couldn't create "+algo+" digest of "+file.getPath());
+ }
+ return checksum;
+ }
+
/**
* Upgrades Getdown by moving an installation managed copy of the Getdown jar file over the
* non-managed copy (which would be used to run Getdown itself).
@@ -137,9 +158,17 @@ public class LaunchUtil
// we assume getdown's jar file size changes with every upgrade, this is not guaranteed,
// but in reality it will, and it allows us to avoid pointlessly upgrading getdown every
// time the client is updated which is unnecessarily flirting with danger
- if (!newgd.exists() || newgd.length() == curgd.length()) {
+ if (!newgd.exists())
+ {
return;
}
+
+ if (newgd.length() == curgd.length()) {
+ if (_getMD5FileChecksum(newgd).equals(_getMD5FileChecksum(curgd)))
+ {
+ return;
+ }
+ }
log.info("Updating Getdown with " + newgd + "...");
diff --git a/getdown/src/getdown/core/src/main/java/jalview/bin/MemorySetting.java b/getdown/src/getdown/core/src/main/java/jalview/bin/MemorySetting.java
index b3bae2d..8af09da 100644
--- a/getdown/src/getdown/core/src/main/java/jalview/bin/MemorySetting.java
+++ b/getdown/src/getdown/core/src/main/java/jalview/bin/MemorySetting.java
@@ -24,7 +24,7 @@ public class MemorySetting
} catch (NoClassDefFoundError e)
{
// com.sun.management.OperatingSystemMXBean doesn't exist in this JVM
- System.out.println("No com.sun.management.OperatingSystemMXBean");
+ System.err.println("No com.sun.management.OperatingSystemMXBean");
}
// We didn't get a com.sun.management.OperatingSystemMXBean.
diff --git a/getdown/src/getdown/launcher/pom.xml b/getdown/src/getdown/launcher/pom.xml
index 10e1aa6..bf0b736 100644
--- a/getdown/src/getdown/launcher/pom.xml
+++ b/getdown/src/getdown/launcher/pom.xml
@@ -4,7 +4,7 @@
com.threerings.getdowngetdown
- 1.8.3-SNAPSHOT
+ 1.8.3-1.1.8_FJVLgetdown-launcher
@@ -40,6 +40,7 @@
+
org.apache.maven.pluginsmaven-jar-plugin
@@ -143,6 +144,19 @@
shade
+
diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java
index 539b47e..01bf370 100644
--- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java
+++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java
@@ -9,6 +9,7 @@ import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.EventQueue;
+import java.awt.Graphics;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.event.ActionEvent;
@@ -32,6 +33,7 @@ import javax.swing.AbstractAction;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLayeredPane;
+import javax.swing.JPanel;
import com.samskivert.swing.util.SwingUtil;
import com.threerings.getdown.data.*;
@@ -229,6 +231,9 @@ public abstract class Getdown extends Thread
Config config = _app.init(true);
if (preloads) doPredownloads(_app.getResources());
_ifc = new Application.UpdateInterface(config);
+ if (_status != null) {
+ _status.setAppbase(_app.getAppbase());
+ }
}
/**
@@ -497,6 +502,19 @@ public abstract class Getdown extends Thread
throw new IOException("m.java_download_failed");
}
+ // on Windows, if the local JVM is in use, we will not be able to replace it with an
+ // updated JVM; we detect this by attempting to rename the java.dll to its same name, which
+ // will fail on Windows for in use files; hackery!
+ File javaLocalDir = new File(_app.getAppDir(), LaunchUtil.LOCAL_JAVA_DIR+File.separator);
+ File javaDll = new File(javaLocalDir, "bin" + File.separator + "java.dll");
+ if (javaDll.exists()) {
+ if (!javaDll.renameTo(javaDll)) {
+ log.info("Cannot update local Java VM as it is in use.");
+ return;
+ }
+ log.info("Can update local Java VM as it is not in use.");
+ }
+
reportTrackingEvent("jvm_start", -1);
updateStatus("m.downloading_java");
@@ -555,7 +573,7 @@ public abstract class Getdown extends Thread
// show the patch notes button, if applicable
if (!StringUtil.isBlank(_ifc.patchNotesUrl)) {
createInterfaceAsync(false);
- EventQueue.invokeLater(new Runnable() {
+ EQinvoke(new Runnable() {
public void run () {
_patchNotes.setVisible(true);
}
@@ -687,7 +705,7 @@ public abstract class Getdown extends Thread
} else {
proc = _app.createProcess(false);
}
-
+
// close standard in to avoid choking standard out of the launched process
proc.getInputStream().close();
// close standard out, since we're not going to write to anything to it anyway
@@ -716,6 +734,9 @@ public abstract class Getdown extends Thread
}
}
+ //_container.setVisible(true);
+ //_container.validate();
+
// if we have a UI open and we haven't been around for at least 5 seconds (the default
// for min_show_seconds), don't stick a fork in ourselves straight away but give our
// lovely user a chance to see what we're doing
@@ -748,9 +769,10 @@ public abstract class Getdown extends Thread
if (_silent || (_container != null && !reinit)) {
return;
}
-
- EventQueue.invokeLater(new Runnable() {
+
+ EQinvoke (new Runnable() {
public void run () {
+
if (_container == null || reinit) {
if (_container == null) {
_container = createContainer();
@@ -759,6 +781,49 @@ public abstract class Getdown extends Thread
}
configureContainer();
_layers = new JLayeredPane();
+
+
+
+ // added in the instant display of a splashscreen
+ try {
+ readConfig(false);
+ Graphics g = _container.getGraphics();
+ BufferedImage iBgImage = loadImage(_ifc.instantBackgroundImage);
+ boolean ibg = true;
+ if (iBgImage == null) {
+ iBgImage = loadImage(_ifc.backgroundImage);
+ ibg = false;
+ }
+ if (iBgImage != null) {
+ final BufferedImage bgImage = iBgImage;
+ int bwidth = bgImage.getWidth();
+ int bheight = bgImage.getHeight();
+
+ log.info("Displaying instant background image", ibg?"instant_background_image":"background_image");
+
+ instantSplashPane = new JPanel() {
+ @Override
+ protected void paintComponent(Graphics g)
+ {
+ super.paintComponent(g);
+ // attempt to draw a background image...
+ if (bgImage != null) {
+ g.drawImage(bgImage, 0, 0, this);
+ }
+ }
+ };
+
+ instantSplashPane.setSize(bwidth,bheight);
+ instantSplashPane.setPreferredSize(new Dimension(bwidth,bheight));
+
+ _layers.add(instantSplashPane, Integer.valueOf(1));
+
+ _container.setPreferredSize(new Dimension(bwidth,bheight));
+ }
+ } catch (Exception e) {
+ log.warning("Failed to set instant background image", "ibg", _ifc.instantBackgroundImage);
+ }
+
_container.add(_layers, BorderLayout.CENTER);
_patchNotes = new JButton(new AbstractAction(_msgs.getString("m.patch_notes")) {
@Override public void actionPerformed (ActionEvent event) {
@@ -768,12 +833,14 @@ public abstract class Getdown extends Thread
_patchNotes.setFont(StatusPanel.FONT);
_layers.add(_patchNotes);
_status = new StatusPanel(_msgs);
- _layers.add(_status);
+ setStatusAsync("m.initialising", 0, -1L, true);
+ //_layers.add(_status, Integer.valueOf(2));
initInterface();
}
showContainer();
}
});
+
}
/**
@@ -790,6 +857,7 @@ public abstract class Getdown extends Thread
_status.init(_ifc, _background, getProgressImage());
Dimension size = _status.getPreferredSize();
_status.setSize(size);
+ //_status.updateStatusLabel();
_layers.setPreferredSize(size);
_patchNotes.setBounds(_ifc.patchNotes.x, _ifc.patchNotes.y,
@@ -804,13 +872,12 @@ public abstract class Getdown extends Thread
protected RotatingBackgrounds getBackground ()
{
- if (_ifc.rotatingBackgrounds != null) {
+ if (_ifc.rotatingBackgrounds != null && _ifc.rotatingBackgrounds.size() > 0) {
if (_ifc.backgroundImage != null) {
log.warning("ui.background_image and ui.rotating_background were both specified. " +
"The background image is being used.");
}
- return new RotatingBackgrounds(loadImage(_ifc.backgroundImage));
- //return new RotatingBackgrounds(_ifc.rotatingBackgrounds, _ifc.errorBackground, Getdown.this);
+ return new RotatingBackgrounds(_ifc.rotatingBackgrounds, _ifc.errorBackground, Getdown.this);
} else if (_ifc.backgroundImage != null) {
return new RotatingBackgrounds(loadImage(_ifc.backgroundImage));
} else {
@@ -891,9 +958,10 @@ public abstract class Getdown extends Thread
createInterfaceAsync(false);
}
- EventQueue.invokeLater(new Runnable() {
+ EQinvoke(new Runnable() {
public void run () {
- if (_status == null) {
+
+ if (_status == null) {
if (message != null) {
log.info("Dropping status '" + message + "'.");
}
@@ -906,9 +974,19 @@ public abstract class Getdown extends Thread
_status.setProgress(0, -1L);
} else if (percent >= 0) {
_status.setProgress(percent, remaining);
+ } else {
+ //_status.setStatus("m.initialising", false);
}
+
}
});
+
+ if (_status != null && ! _addedStatusLayer) {
+ _layers.add(_status, Integer.valueOf(2));
+ _addedStatusLayer = true;
+ initInterface();
+ }
+
}
protected void reportTrackingEvent (String event, int progress)
@@ -1037,30 +1115,59 @@ public abstract class Getdown extends Thread
setStatusAsync(null, stepToGlobalPercent(percent), -1L, false);
}
};
-
+
+ // Asynchronous or synchronous progress updates
+ protected void EQinvoke(Runnable r) {
+
+ try {
+ readConfig(false);
+ } catch (Exception e) {
+ log.warning("Could't read config when invoking GUI action", "Exception", e.getMessage());
+ }
+ if (_ifc != null && (_shownContainer?_ifc.progressSyncAfterShown:_ifc.progressSync)) {
+ try {
+ EventQueue.invokeAndWait(r);
+ //r.run();
+ } catch (Exception e) {
+ log.warning("Tried to invokeAndWait but couldn't. Going to invokeLater instead", "Exception", e.getMessage());
+ EventQueue.invokeLater(r);
+ }
+ } else {
+ EventQueue.invokeLater(r);
+ //r.run();
+ }
+
+ //try { Thread.sleep(500); } catch (Exception e) {}
+
+ }
+
protected Application _app;
protected Application.UpdateInterface _ifc = new Application.UpdateInterface(Config.EMPTY);
protected ResourceBundle _msgs;
protected Container _container;
protected JLayeredPane _layers;
+ protected JPanel instantSplashPane;
protected StatusPanel _status;
protected JButton _patchNotes;
protected AbortPanel _abort;
protected RotatingBackgrounds _background;
+ protected boolean _addedStatusLayer;
protected boolean _dead;
protected boolean _silent;
protected boolean _launchInSilent;
protected boolean _noUpdate;
protected long _startup;
-
+
protected Set _toInstallResources;
protected boolean _readyToInstall;
protected boolean _enableTracking = true;
protected int _reportedProgress = 0;
+ protected boolean _shownContainer;
+
/** Number of minutes to wait after startup before beginning any real heavy lifting. */
protected int _delay;
diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java
index 5e168ff..7c54f80 100644
--- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java
+++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java
@@ -7,7 +7,6 @@ package com.threerings.getdown.launcher;
import java.awt.Color;
import java.awt.Container;
-import java.awt.EventQueue;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
@@ -27,14 +26,15 @@ import javax.swing.JFrame;
import javax.swing.KeyStroke;
import javax.swing.WindowConstants;
-import com.install4j.api.launcher.StartupNotification;
import com.samskivert.swing.util.SwingUtil;
import com.threerings.getdown.data.Application;
+import com.threerings.getdown.data.Build;
import com.threerings.getdown.data.EnvConfig;
import com.threerings.getdown.data.SysProps;
import com.threerings.getdown.util.LaunchUtil;
import com.threerings.getdown.util.StringUtil;
import static com.threerings.getdown.Log.log;
+import jalview.bin.StartupNotificationListener;
/**
* The main application entry point for Getdown.
@@ -92,20 +92,19 @@ public class GetdownApp
}
if (abort) System.exit(-1);
+ log.info("Starting ...");
try
{
- StartupNotification.registerStartupListener(
- new StartupNotification.Listener() {
- @Override
- public void startupPerformed(String parameters)
- {
- log.warning("StartupNotification.Listener.startupPerformed: '"+parameters+"'");
- setStartupFilesParameterString(parameters);
- }
- });
+ jalview.bin.StartupNotificationListener.setListener();
} catch (Exception e)
{
e.printStackTrace();
+ } catch (NoClassDefFoundError e)
+ {
+ log.warning("Starting without install4j classes");
+ } catch (Throwable t)
+ {
+ t.printStackTrace();
}
// record a few things for posterity
@@ -118,6 +117,7 @@ public class GetdownApp
log.info("-- User Name: " + System.getProperty("user.name"));
log.info("-- User Home: " + System.getProperty("user.home"));
log.info("-- Cur dir: " + System.getProperty("user.dir"));
+ log.info("-- launcher version: "+Build.version());
log.info("-- startupFilesParameterString: " + startupFilesParameterString);
log.info("---------------------------------------------");
@@ -133,6 +133,19 @@ public class GetdownApp
handleWindowClose();
}
});
+
+ // keep_on_top
+ try {
+ readConfig(false);
+ } catch (Exception e) {
+ log.warning("Error reading config for keep_on_top");
+ }
+ // move window to top, always on top
+ if (_ifc.keepOnTop) {
+ log.info("Keep on top set to ", "keep_on_top", _ifc.keepOnTop);
+ _frame.setAlwaysOnTop(true);
+ }
+
// handle close on ESC
String cancelId = "Cancel"; // $NON-NLS-1$
_frame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
@@ -165,7 +178,7 @@ public class GetdownApp
log.warning("Failed to set background", "bg", _ifc.background, e);
}
- if (_ifc.iconImages != null) {
+ if (_ifc.iconImages != null && _ifc.iconImages.size() > 0) {
ArrayList icons = new ArrayList<>();
for (String path : _ifc.iconImages) {
Image img = loadImage(path);
@@ -190,6 +203,7 @@ public class GetdownApp
SwingUtil.centerWindow(_frame);
_frame.setVisible(true);
}
+ _shownContainer = true;
}
@Override
@@ -245,7 +259,7 @@ public class GetdownApp
super.fail(message);
// super.fail causes the UI to be created (if needed) on the next UI tick, so we
// want to wait until that happens before we attempt to redecorate the window
- EventQueue.invokeLater(new Runnable() {
+ EQinvoke(new Runnable() {
@Override
public void run() {
// if the frame was set to be undecorated, make window decoration available
diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/StatusPanel.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/StatusPanel.java
index 99f44ca..620182b 100644
--- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/StatusPanel.java
+++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/StatusPanel.java
@@ -28,6 +28,7 @@ import com.samskivert.swing.util.SwingUtil;
import com.samskivert.util.Throttle;
import com.threerings.getdown.data.Application.UpdateInterface;
+import com.threerings.getdown.data.Build;
import com.threerings.getdown.util.MessageUtil;
import com.threerings.getdown.util.Rectangle;
import com.threerings.getdown.util.StringUtil;
@@ -106,7 +107,7 @@ public final class StatusPanel extends JComponent
// maybe update the progress label
if (_progress != percent) {
_progress = percent;
- if (!_ifc.hideProgressText) {
+ if (_ifc != null && !_ifc.hideProgressText) {
String msg = MessageFormat.format(get("m.complete"), percent);
_newplab = createLabel(msg, new Color(_ifc.progressText, true));
}
@@ -128,7 +129,7 @@ public final class StatusPanel extends JComponent
}
remaining /= values;
- if (!_ifc.hideProgressText) {
+ if (_ifc != null && !_ifc.hideProgressText) {
// now compute our display value
int minutes = (int)(remaining / 60), seconds = (int)(remaining % 60);
String remstr = minutes + ":" + ((seconds < 10) ? "0" : "") + seconds;
@@ -265,13 +266,28 @@ public final class StatusPanel extends JComponent
*/
protected void updateStatusLabel ()
{
+ if (_ifc == null) {
+ return;
+ }
String status = _status;
if (!_displayError) {
for (int ii = 0; ii < _statusDots; ii++) {
status += " .";
}
}
- _newlab = createLabel(status, new Color(_ifc.statusText, true));
+
+ StringBuilder labelText = new StringBuilder();
+ if (_ifc.displayVersion) {
+ labelText.append("launcher version: "+Build.version());
+ labelText.append("\n");
+ }
+ if (_ifc.displayAppbase) {
+ labelText.append("appbase: "+_appbase);
+ labelText.append("\n");
+ }
+ labelText.append(status);
+
+ _newlab = createLabel(labelText.toString(), new Color(_ifc.statusText, true));
// set the width of the label to the width specified
int width = _ifc.status.width;
if (width == 0) {
@@ -370,6 +386,10 @@ public final class StatusPanel extends JComponent
return key;
}
}
+
+ public void setAppbase(String appbase) {
+ _appbase = appbase;
+ }
protected Image _barimg;
protected RotatingBackgrounds _bg;
@@ -393,4 +413,6 @@ public final class StatusPanel extends JComponent
protected Throttle _rthrottle = new Throttle(1, 1000L);
protected static final Font FONT = new Font("SansSerif", Font.BOLD, 12);
+
+ public String _appbase;
}
diff --git a/getdown/src/getdown/launcher/src/main/java/jalview/bin/StartupNotificationListener.java b/getdown/src/getdown/launcher/src/main/java/jalview/bin/StartupNotificationListener.java
new file mode 100644
index 0000000..5c6c7c3
--- /dev/null
+++ b/getdown/src/getdown/launcher/src/main/java/jalview/bin/StartupNotificationListener.java
@@ -0,0 +1,29 @@
+package jalview.bin;
+
+import com.threerings.getdown.launcher.GetdownApp;
+import static com.threerings.getdown.Log.log;
+
+public class StartupNotificationListener {
+
+ public static void setListener() {
+
+
+ try {
+ com.install4j.api.launcher.StartupNotification.registerStartupListener(
+ new com.install4j.api.launcher.StartupNotification.Listener() {
+ @Override
+ public void startupPerformed(String parameters) {
+ log.info("StartupNotification.Listener.startupPerformed: '"+parameters+"'");
+ GetdownApp.setStartupFilesParameterString(parameters);
+ }
+ }
+ );
+ } catch (Exception e) {
+ e.printStackTrace();
+ } catch (NoClassDefFoundError t) {
+ log.warning("Starting without install4j classes");
+ }
+
+ }
+
+}
diff --git a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages.properties b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages.properties
index 19b2999..bb31a7b 100644
--- a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages.properties
+++ b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages.properties
@@ -108,3 +108,7 @@ m.invalid_appbase = The configuration file specifies an invalid 'appbase'.
m.missing_class = The configuration file is missing the application class.
m.missing_code = The configuration file specifies no code resources.
m.invalid_digest_file = The digest file is invalid.
+
+# When at 0%
+m.initialising = Initialising
+m.starting = Starting
diff --git a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_de.properties b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_de.properties
index 8e36835..ff0a388 100644
--- a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_de.properties
+++ b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_de.properties
@@ -114,3 +114,7 @@ m.missing_class = In der Konfigurationsdatei fehlt die Anwendungsklasse.
m.missing_code = Die Konfigurationsdatei enth\u00e4lt keine Codequellen.
m.invalid_digest_file = Die Hashwertedatei ist ung\u00fcltig.
+
+# When at 0%
+m.initialising = Initialising
+m.starting = Starting
diff --git a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_es.properties b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_es.properties
index 609b025..00acad0 100644
--- a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_es.properties
+++ b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_es.properties
@@ -113,3 +113,7 @@ m.missing_class = Al archivo de configuraci\u00f3n le falta la clase de aplicaci
m.missing_code = El archivo de configuraci\u00f3n especifica que no hay recursos de c\u00f3digo.
m.invalid_digest_file = El archivo digest no es v\u00e1lido.
+
+# When at 0%
+m.initialising = Initialising
+m.starting = Starting
diff --git a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_fr.properties b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_fr.properties
index 3666204..477830e 100644
--- a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_fr.properties
+++ b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_fr.properties
@@ -109,3 +109,7 @@ m.invalid_appbase = Le fichier de configuration sp\u00e9cifie un 'appbase' inval
m.missing_class = Le fichier de configuration ne contient pas la classe de l'application.
m.missing_code = Le fichier de configuration ne sp\u00e9cifie aucune ressource de code.
m.invalid_digest_file = Le fichier digest est invalide.
+
+# When at 0%
+m.initialising = Initialising
+m.starting = Starting
diff --git a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_it.properties b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_it.properties
index 33b3260..d5e3659 100644
--- a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_it.properties
+++ b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_it.properties
@@ -112,3 +112,7 @@ m.invalid_appbase = Il tag "appbase" non è valido.
m.missing_class = Il file di configurazione non contiene la classe da eseguire (tag "class").
m.missing_code = Il file di configurazione non contiene alcuna risorsa (tag "code").
m.invalid_digest_file = Il file di digest non è valido.
+
+# When at 0%
+m.initialising = Initialising
+m.starting = Starting
diff --git a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_ja.properties b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_ja.properties
index c344c16..7eabcdc 100644
--- a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_ja.properties
+++ b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_ja.properties
@@ -105,3 +105,7 @@ m.invalid_appbase = \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u7121\u52b9\u306a
m.missing_class = \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30af\u30e9\u30b9\u304c\u4e0d\u660e\u3067\u3059\u3002
m.missing_code = \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u30b3\u30fc\u30c9\u30ea\u30bd\u30fc\u30b9\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
m.invalid_digest_file = \u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304c\u7121\u52b9\u3067\u3059\u3002
+
+# When at 0%
+m.initialising = Initialising
+m.starting = Starting
diff --git a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_ko.properties b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_ko.properties
index 3f8a47f..dbb45f4 100644
--- a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_ko.properties
+++ b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_ko.properties
@@ -100,3 +100,7 @@ m.invalid_appbase = \uC124\uC815 \uD30C\uC77C\uC5D0 \uC798\uBABB\uB41C 'appbase'
m.missing_class = \uC124\uC815 \uD30C\uC77C\uC5D0 \uC5B4\uD50C\uB9AC\uCF00\uC774\uC158 \uD074\uB798\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
m.missing_code = \uC124\uC815 \uD30C\uC77C\uC5D0 \uB9AC\uC18C\uC2A4\uC5D0 \uB300\uD55C \uCF54\uB4DC\uAC00 \uBA85\uC2DC\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
m.invalid_digest_file = \uB2E4\uC774\uC81C\uC2A4\uD2B8 \uD30C\uC77C\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+
+# When at 0%
+m.initialising = Initialising
+m.starting = Starting
diff --git a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_pt.properties b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_pt.properties
index 47db91c..c9e0be1 100644
--- a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_pt.properties
+++ b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_pt.properties
@@ -116,3 +116,7 @@ m.invalid_appbase = O arquivo de configura\u00E7\u00E3o especifica um 'AppBase'
m.missing_class = O arquivo de configura\u00E7\u00E3o n\u00E3o possui a classe de aplicativo.
m.missing_code = O arquivo de configura\u00E7\u00E3o n\u00E3o especifica um recurso de c\u00F3digo.
m.invalid_digest_file = O arquivo digest \u00E9 inv\u00E1lido.
+
+# When at 0%
+m.initialising = Initialising
+m.starting = Starting
diff --git a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_zh.properties b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_zh.properties
index 2c27543..33117ff 100644
--- a/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_zh.properties
+++ b/getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_zh.properties
@@ -59,3 +59,7 @@ m.invalid_appbase = \u914d\u7f6e\u6587\u4ef6\u6307\u5b9a\u4e86\u65e0\u6548\u7684
m.missing_class = \u914d\u7f6e\u6587\u4ef6\u4e2d\u65e0\u6cd5\u627e\u5230\u7a0b\u5e8f\u6587\u4ef6\u3002
m.missing_code = \u914d\u7f6e\u6587\u4ef6\u4e2d\u65e0\u6cd5\u627e\u5230\u6307\u5b9a\u7684\u8d44\u6e90\u3002
m.invalid_digest_file = \u65e0\u6548\u7684\u914d\u7f6e\u6587\u4ef6\u3002
+
+# When at 0%
+m.initialising = Initialising
+m.starting = Starting
diff --git a/getdown/src/getdown/mvn_cmd b/getdown/src/getdown/mvn_cmd
old mode 100644
new mode 100755
index d984902..0cd54eb
--- a/getdown/src/getdown/mvn_cmd
+++ b/getdown/src/getdown/mvn_cmd
@@ -1 +1,31 @@
-mvn clean package -Dgetdown.host.whitelist=jalview.org,*.jalview.org && cp launcher/target/getdown-launcher-1.8.3-SNAPSHOT.jar ../../../getdown/lib/getdown-launcher.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../j8lib/getdown-core.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../j11lib/getdown-core.jar
+#!/usr/bin/env bash
+
+if [ x$JVLVERSION != x ]; then
+ export VERSION=$JVLVERSION
+else
+ export VERSION=1.8.3-1.1.8_JVL
+fi
+
+if [ x${VERSION%_JVL} = x$VERSION ]; then
+ VERSION=${VERSION}_JVL
+fi
+
+echo "Setting VERSION to '$VERSION'"
+perl -p -i -e 's|()[^<]*JVL[^<]*()|${1}$ENV{VERSION}${2}|;' pom.xml */pom.xml
+mvn package -Dgetdown.host.whitelist="jalview.org,*.jalview.org" -Dallow_file_protocol=false -Dconnect_timeout=8 -Dread_timeout=15
+RET=$?
+if [ x$RET = x0 ]; then
+ cp launcher/target/getdown-launcher-$VERSION.jar ../../../getdown/lib/getdown-launcher.jar && echo "Copied getdown-launcher-$VERSION.jar to getdown/lib"
+ cp core/target/getdown-core-$VERSION.jar ../../../getdown/lib/getdown-core.jar && echo "Copied getdown-core-$VERSION.jar to getdown/lib"
+ cp core/target/getdown-core-$VERSION.jar ../../../j8lib/getdown-core.jar && echo "Copied getdown-core-$VERSION.jar to j8lib"
+ cp core/target/getdown-core-$VERSION.jar ../../../j11lib/getdown-core.jar && echo "Copied getdown-core-$VERSION.jar to j11lib"
+fi
+
+VERSION=${VERSION/JVL/FJVL}
+echo "Setting VERSION to '$VERSION'"
+perl -p -i -e 's|()[^<]*JVL[^<]*()|${1}$ENV{VERSION}${2}|;' pom.xml */pom.xml
+mvn package -Dgetdown.host.whitelist="jalview.org,*.jalview.org" -Dallow_file_protocol=true -Dconnect_timeout=4 -Dread_timeout=4
+RET=$?
+if [ x$RET = x0 ]; then
+ cp launcher/target/getdown-launcher-$VERSION.jar ../../../getdown/lib/getdown-launcher-local.jar && echo "Copied getdown-launcher-$VERSION.jar to getdown/lib/getdown-launcher-local.jar"
+fi
diff --git a/getdown/src/getdown/pom.xml b/getdown/src/getdown/pom.xml
index 17cb8f6..a73b59e 100644
--- a/getdown/src/getdown/pom.xml
+++ b/getdown/src/getdown/pom.xml
@@ -10,7 +10,7 @@
com.threerings.getdowngetdownpom
- 1.8.3-SNAPSHOT
+ 1.8.3-1.1.8_FJVLgetdownAn application installer and updater.
@@ -65,7 +65,7 @@
com.install4jinstall4j-runtime7.0.11
-
+ provided
@@ -91,10 +91,10 @@
org.apache.maven.pluginsmaven-compiler-plugin
- 3.7.0
+ 3.8.1
-
- 1.7
+
+ 1.8truetruetrue
diff --git a/gradle.properties b/gradle.properties
index 57119cb..2dbdad3 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,5 +1,6 @@
jalviewDir = .
+#JAVA_VERSION = 1.8
JAVA_VERSION = 11
JALVIEW_VERSION = DEVELOPMENT
INSTALLATION = Source
@@ -15,23 +16,23 @@ jalview_keydig = SHA1
testngGroups = Functional
-javac_source = 11
-javac_target = 11
-
j8libDir = j8lib
j11libDir = j11lib
resourceDir = resources
helpParentDir = help
helpDir = help
+helpOutputDir = build/distributions/help
docDir = doc
sourceDir = src
schemaDir = schemas
classesDir = classes
+examplesDir = examples
clover = false
use_clover = false
cloverClassesDir = clover-classes
cloverSourcesInstrDir = sources-instr
packageDir = dist
+ARCHIVEDIR =
outputJar = jalview.jar
testSourceDir = test
@@ -49,37 +50,48 @@ gradlePluginsDir = gradle/plugins
getdown_local = false
getdown_website_dir = getdown/website
getdown_resource_dir = resource
-getdown_app_dir = dist
-getdown_j11lib_dir = j11lib
+#getdown_j11lib_dir = j11lib
getdown_files_dir = getdown/files
-getdown_launcher = getdown/lib/getdown-launcher.jar
-getdown_core = getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar
-getdown_base_txt = getdown/files/getdown.txt
+getdown_lib_dir = getdown/lib
+getdown_launcher = getdown-launcher.jar
+getdown_launcher_local = getdown-launcher-local.jar
+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_channel_base = http://www.jalview.org/getdown/jalview
-getdown_channel_name = TEST
getdown_txt_allow_offline = true
+getdown_txt_max_concurrent_downloads = 10
getdown_txt_jalview.jvmmempc = 90
-getdown_txt_multi_jvmarg = -Dgetdownappdir="%APPDIR%"
+getdown_txt_multi_jvmarg = -Dgetdownappdir=%APPDIR%
getdown_txt_strict_comments = true
getdown_txt_title = Jalview
getdown_txt_ui.name = Jalview
+getdown_txt_ui.progress_sync_before_shown = true
+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.background = FFFFFF
-getdown_txt_ui.background_image = resources/images/jalview_logo_background_getdown-640x480.png
-getdown_txt_ui.error_background = resources/images/jetset_jalview_splash.png
-getdown_txt_ui.progress_image = resources/images/jalview_logo_background_getdown-progress.png
+getdown_txt_ui.background_image = utils/getdown/jalview_logo_background_getdown-640x480.png
+getdown_txt_ui.instant_background_image = utils/getdown/jalview_logo_background_getdown_instant-640x480.png
+getdown_txt_ui.error_background = utils/getdown/jalview_logo_background_getdown_error-640x480.png
+getdown_txt_ui.progress_image = utils/getdown/jalview_logo_background_getdown-progress.png
getdown_txt_ui.icon = resources/images/JalviewLogo_Huge.png
getdown_txt_ui.progress = 20, 440, 600, 22
getdown_txt_ui.progress_bar = AAAAFF
getdown_txt_ui.progress_text = 000000
getdown_txt_ui.status = 20, 380, 600, 58
getdown_txt_ui.status_text = 000066
-getdown_txt_ui.text_shadow = EEEEFF
-getdown_txt_ui.install_error = http://www.jalview.org/download/error
+#getdown_txt_ui.text_shadow = FFFFFF
+getdown_txt_ui.install_error = http://www.jalview.org/faq/getdownerror
getdown_txt_ui.mac_dock_icon = resources/images/jalview_logos.ico
getdown_alt_java8_min_version = 01080000
+getdown_alt_java8_max_version = 01089999
getdown_alt_java11_min_version = 11000000
-getdown_alt_java11_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre11.tgz,[linux-amd64] /getdown/jre/linux-jre11.tgz,[mac os x] /getdown/jre/macos-jre11.tgz
+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.tgz,[mac os x] /getdown/jre/macos-jre11.tgz
getdown_alt_java8_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre1.8.tgz,[linux-amd64] /getdown/jre/linux-jre1.8.tgz,[mac os x] /getdown/jre/macos-jre1.8.tgz
JRE_installs = /Users/bsoares/Java/installs
Windows_JRE8 = OpenJDK8U-jdk_x64_windows_hotspot_8u202b08/jdk8u202-b08
@@ -111,5 +123,20 @@ JSIGN_SH = echo
eclipse_extra_jdt_prefs_file = .settings/org.eclipse.jdt.core.jalview.prefs
+pandoc_exec = /usr/local/bin/pandoc,/usr/bin/pandoc
dev = false
+CHANNEL=LOCAL
+getdown_channel_base = http://www.jalview.org/getdown
+getdown_channel_name = SCRATCH-DEFAULT
+getdown_app_dir_release = release
+getdown_app_dir_alt = alt
+getdown_install_dir = install
+getdown_rsync_dest = /Volumes/jalview/docroot/getdown
+reportRsyncCommand =
+RUNRSYNC=false
+
+bamboo_channelbase = https://builds.jalview.org/browse
+bamboo_planKey =
+bamboo_getdown_channel_suffix = /latest/artifact/shared/getdown-channel
+
\ No newline at end of file
diff --git a/help/help/help.jhm b/help/help/help.jhm
index 1666cc6..47f7d53 100755
--- a/help/help/help.jhm
+++ b/help/help/help.jhm
@@ -61,6 +61,7 @@
+
@@ -134,7 +135,6 @@
-
@@ -165,4 +165,6 @@
+
+
diff --git a/help/help/helpTOC.xml b/help/help/helpTOC.xml
index 77ddd88..7e358d6 100755
--- a/help/help/helpTOC.xml
+++ b/help/help/helpTOC.xml
@@ -24,8 +24,9 @@
-
-
+
+
+
@@ -49,6 +50,7 @@
+
@@ -135,10 +137,6 @@
-
-
-
-
@@ -156,13 +154,14 @@
-
-
+
+
+
diff --git a/help/help/html/calculations/pca.html b/help/help/html/calculations/pca.html
index 3529cae..3bf21cb 100755
--- a/help/help/html/calculations/pca.html
+++ b/help/help/html/calculations/pca.html
@@ -70,7 +70,7 @@
nucleotide substitution matrix, or by sequence percentage identity,
or sequence feature similarity.
-
+
The PCA Viewer
@@ -84,7 +84,9 @@
towards the front of the view.
The 3d view can be rotated by dragging the mouse with the left
- mouse button pressed. The view can also be zoomed in and out with
+ mouse button pressed, or with the arrow
+ keys when SHIFT is pressed. The
+ view can also be zoomed in and out with
the up and down arrow keys (and the roll bar of the
mouse if present). Labels will be shown for each sequence if the
entry in the View menu is checked, and the plot background colour
@@ -122,7 +124,7 @@ left-clicking and dragging the mouse over the display. -->
Initially, the display shows the first three components of the
similarity space, but any eigenvector can be used by changing the
- selected dimension for the x, y, or z axis through each ones menu
+ selected dimension for the x, y, or z axis through each one's menu
located below the 3d display. The Reset
button will reset axis and rotation settings to their defaults.
@@ -131,7 +133,7 @@ left-clicking and dragging the mouse over the display. -->
The output of points and transformed point coordinates was
added to the Jalview desktop in v2.7.The Reset button
and Change Parameters menu were added in Jalview 2.8.Support
- for PAM250 based PCA was added in Jalview 2.8.1.
+ for PAM250 based PCA was added in Jalview 2.8.1.In Jalview 2.11, support for saving and restoring PCAs in Project files was added, and the Change parameters menu removed.
Reproducing PCA calculations performed with older
diff --git a/help/help/html/calculations/pcaviewer.gif b/help/help/html/calculations/pcaviewer.gif
deleted file mode 100644
index 78c82f2..0000000
Binary files a/help/help/html/calculations/pcaviewer.gif and /dev/null differ
diff --git a/help/help/html/calculations/pcaviewer.png b/help/help/html/calculations/pcaviewer.png
new file mode 100644
index 0000000..7dc5b80
Binary files /dev/null and b/help/help/html/calculations/pcaviewer.png differ
diff --git a/help/help/html/calculations/treeviewer.html b/help/help/html/calculations/treeviewer.html
index 8cb2b59..f326f19 100755
--- a/help/help/html/calculations/treeviewer.html
+++ b/help/help/html/calculations/treeviewer.html
@@ -42,16 +42,17 @@
alignment, such as another tree viewer.
- Grouping sequences by partitioning the
- tree at a particular distance Clicking anywhere along
- the extent of the tree (but not on a leaf or internal node) defines
- a tree 'partition', by cutting every branch of the tree spanning the
- depth where the mouse-click occurred. Groups are created containing
- sequences at the leaves of each connected sub tree. These groups are
- each given a different colour, which are reflected in other windows
- in the same way as if the sequence IDs were selected, and can be
- edited in the same way as user defined sequence groups.
-
+ Grouping
+ sequences by partitioning the tree at a particular distance
+ Clicking anywhere along the extent of the tree (but not on a leaf or
+ internal node) defines a tree 'partition', by cutting every branch of
+ the tree spanning the depth where the mouse-click occurred. A red line
+ will be shown where the partition was made, and groups are created
+ containing sequences at the leaves of each connected sub tree. These
+ groups are each given a different colour, which are reflected in other
+ windows in the same way as if the sequence IDs were selected, and can
+ be edited in the same way as user defined sequence groups.
+
Tree partitions are useful for comparing clusters produced by
different methods and measures. They are also an effective way of
diff --git a/help/help/html/colourSchemes/index.html b/help/help/html/colourSchemes/index.html
index 51d0738..f0ae161 100755
--- a/help/help/html/colourSchemes/index.html
+++ b/help/help/html/colourSchemes/index.html
@@ -49,355 +49,384 @@ td {
a new scheme in the Colour menu.
The "Colour→Colour Text..."
+ href="textcolour.html">Colour Text..."
entry opens a dialog box to set a different text colour for light
and dark background, and the intensity threshold for transition
between them.
-
The default colour schemes are summarised in the table below:
-
+ Alignments and groups can also be shaded according to percentage
+ abundance of aligned residues (using Percentage
+ Identity), and for protein alignments, the BLOSUM
+ 62 Score and ClustalX shading schemes
+ highlight amino acid conservation.
+
+
+ The Sequence ID colour scheme shades sequences with
+ the same colour assigned to their Sequence ID. Colours are assigned
+ when groups are created by partitioning
+ a tree or subdividing the alignment by sequence with Select→Make
+ Groups For Selection.
+
+
+ Amino acid and Nucleotide based colour schemes
+
The built-in colour schemes based on amino acid and nucleotide symbols are
+ summarised in the table below:
+
+