Merge branch 'develop' into JAL-3322_getdown_speed_improvement
authorBen Soares <bsoares@dundee.ac.uk>
Fri, 28 Jun 2019 09:33:48 +0000 (10:33 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Fri, 28 Jun 2019 09:33:48 +0000 (10:33 +0100)
merging in develop

.gitignore
build.gradle
getdown/lib/getdown-core.jar
getdown/lib/getdown-launcher.jar
getdown/src/getdown/ant/pom.xml
getdown/src/getdown/core/pom.xml
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
getdown/src/getdown/launcher/pom.xml
getdown/src/getdown/pom.xml
j11lib/getdown-core.jar
j8lib/getdown-core.jar

index 0b21681..46cc0e5 100644 (file)
@@ -19,7 +19,7 @@ TESTNG
 /site
 /.gradle
 /build
-/utils/HelpLinksChecker.out
+/utils/HelpLinksChecker.touch
 /getdown/website
 /getdown/full_app
 /getdown/files
index 3aa4c45..1f16133 100644 (file)
@@ -594,10 +594,13 @@ task convertBuildingMD(type: Exec) {
     pandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc"
   }
 
-  if (pandoc != null && file(pandoc).exists()) {
-    commandLine pandoc, '-s', '-o', buildingHTML, '--metadata', 'pagetitle="Building Jalview from Source"', '--toc', '-H', css, buildingMD
-  } else {
-    commandLine "true"
+  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
@@ -721,7 +724,7 @@ task compileLinkCheck(type: JavaCompile) {
   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")
@@ -730,12 +733,12 @@ task linkCheck(type: JavaExec) {
   def help = "$classes/$helpDir"
   args = [ "$classes/$helpDir", "-nointernet" ]
 
-  doFirst {
-    helplinkscheckeroutputfile.createNewFile()
-    standardOutput new FileOutputStream(helplinkscheckeroutputfile, false)
+  doLast {
+    helplinkscheckertouchfile.createNewFile()
   }
 
-  outputs.file(helplinkscheckeroutputfile)
+  inputs.dir("$classes/$helpDir")
+  outputs.file(helplinkscheckertouchfile)
 }
 
 task cleanPackageDir(type: Delete) {
index cef4b46..ea204c6 100644 (file)
Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ
index 32921f5..10072c9 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index 22b9995..7f35d44 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.1_JVL</version>
+    <version>1.8.3-1.1.2_JVL</version>
   </parent>
 
   <artifactId>getdown-ant</artifactId>
index 6fff245..2350118 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.1_JVL</version>
+    <version>1.8.3-1.1.2_JVL</version>
   </parent>
 
   <artifactId>getdown-core</artifactId>
index 0ba2a5e..5c61378 100644 (file)
@@ -282,16 +282,17 @@ public class Application
      *
      */
     public Application (EnvConfig envc) {
-        _envc = envc;
-        _config = getLocalPath(envc.appDir, CONFIG_FILE);
-        _backupConfig = getLocalPath(new File(envc.appDir.getAbsolutePath()+File.separator+BACKUP_CONFIG_DIR), CONFIG_FILE);
+       _envc = envc;
+       _config = getLocalPath(envc.appDir, CONFIG_FILE);
+       _backupConfig = getLocalPath(envc.appDir, BACKUP_CONFIG_DIR+File.separator+CONFIG_FILE);
+       log.warning("Backup config file now", "_backupConfig", _backupConfig, "exists", _backupConfig.exists(), "isReadable", _backupConfig.canRead());
     }
 
     /**
      * Returns the configured application directory.
      */
     public File getAppDir () {
-        return _envc.appDir;
+       return _envc.appDir;
     }
 
     /**
@@ -300,7 +301,7 @@ public class Application
      */
     public boolean useCodeCache ()
     {
-        return _useCodeCache;
+       return _useCodeCache;
     }
 
     /**
@@ -309,7 +310,7 @@ public class Application
      */
     public int getCodeCacheRetentionDays ()
     {
-        return _codeCacheRetentionDays;
+       return _codeCacheRetentionDays;
     }
 
     /**
@@ -317,7 +318,7 @@ public class Application
      * app files from its hosting server.
      */
     public int maxConcurrentDownloads () {
-        return _maxConcDownloads;
+       return _maxConcDownloads;
     }
 
     /**
@@ -326,21 +327,11 @@ public class Application
     public Resource getConfigResource ()
     {
        Resource res = null;
-        try {
-            res = createResource(CONFIG_FILE, Resource.NORMAL);
-        } catch (Exception e) {
-            log.warning("Invalid appbase '" + _vappbase + "'.", e);
-        }
-        if (res == null) {
-               try {
-                               String backupConfig = BACKUP_CONFIG_DIR + File.separator + CONFIG_FILE;
-                       log.warning("Could not read config '"+CONFIG_FILE+"'. Attempting to use backup '"+backupConfig+"'");
-                               res = createResource(backupConfig, Resource.NORMAL);
-               } catch (Exception ex) {
-                               throw new RuntimeException("Invalid appbase in backup config'" + _vappbase + "'.", ex);
-               }
-        }
-        return res;
+       try {
+               return createResource(CONFIG_FILE, Resource.NORMAL);
+       } catch (Exception e) {
+               log.warning("Invalid appbase '" + _vappbase + "'.", e);
+       }
     }
 
     /**
@@ -348,7 +339,7 @@ public class Application
      */
     public List<Resource> getCodeResources ()
     {
-        return _codes;
+       return _codes;
     }
 
     /**
@@ -617,7 +608,8 @@ public class Application
         }
         if (config == null || config.getString("appbase") == null || config.getString("appbase").isEmpty()) {
                try {
-                       config = Config.parseConfig(_backupConfig, opts);
+                       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);
index 1a35bee..b809235 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.1_JVL</version>
+    <version>1.8.3-1.1.2_JVL</version>
   </parent>
 
   <artifactId>getdown-launcher</artifactId>
index f11f925..64555e0 100644 (file)
@@ -10,7 +10,7 @@
   <groupId>com.threerings.getdown</groupId>
   <artifactId>getdown</artifactId>
   <packaging>pom</packaging>
-  <version>1.8.3-1.1_JVL</version>
+  <version>1.8.3-1.1.2_JVL</version>
 
   <name>getdown</name>
   <description>An application installer and updater.</description>
index cef4b46..ea204c6 100644 (file)
Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ
index cef4b46..ea204c6 100644 (file)
Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ