Merge branch 'develop' into task/JAL-3337_gradle_tasks_sourceDist_and_help2Website
authorBen Soares <bsoares@dundee.ac.uk>
Tue, 2 Jul 2019 12:34:30 +0000 (13:34 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Tue, 2 Jul 2019 12:34:30 +0000 (13:34 +0100)
Merging in develop

22 files changed:
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/Build.java.tmpl
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/SysProps.java
getdown/src/getdown/launcher/pom.xml
getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages.properties
getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_de.properties
getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_es.properties
getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_fr.properties
getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_it.properties
getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_ja.properties
getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_ko.properties
getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_pt.properties
getdown/src/getdown/launcher/src/main/resources/com/threerings/getdown/messages_zh.properties
getdown/src/getdown/mvn_cmd
getdown/src/getdown/pom.xml
gradle.properties
j11lib/getdown-core.jar
j8lib/getdown-core.jar
src/jalview/gui/WebserviceInfo.java

index 397dc49..7849bc7 100644 (file)
Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ
index f7fcbfc..7f99732 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index 7f35d44..a2f95e3 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.1.2_JVL</version>
+    <version>1.8.3-1.1.4_JVL</version>
   </parent>
 
   <artifactId>getdown-ant</artifactId>
index 2350118..4cd0507 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.1.2_JVL</version>
+    <version>1.8.3-1.1.4_JVL</version>
   </parent>
 
   <artifactId>getdown-core</artifactId>
@@ -35,6 +35,8 @@
        separated by commas (app1.foo.com,app2.bar.com,app3.baz.com). -->
   <properties>
     <getdown.host.whitelist>jalview.org,*.jalview.org</getdown.host.whitelist>
+    <connect_timeout>8</connect_timeout>
+    <read_timeout>15</read_timeout>
   </properties>
 
   <build>
@@ -83,6 +85,8 @@
                     <filter token="build_time" value="${getdown.build.time}" />
                     <filter token="build_version" value="${project.version}" />
                     <filter token="host_whitelist" value="${getdown.host.whitelist}" />
+                    <filter token="connect_timeout" value="${connect_timeout}" />
+                    <filter token="read_timeout" value="${read_timeout}" />
                   </filterset>
                 </copy>
               </target>
index 60a8ff3..86ea47b 100644 (file)
@@ -40,4 +40,26 @@ public class Build {
     public static List<String> hostWhitelist () {
         return Arrays.asList(StringUtil.parseStringArray("@host_whitelist@"));
     }
+    
+    /*
+     * <p>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;
+               }
+    }
+    
+    /*
+     * <p>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;
+               }
+    }
 }
index 0d96ecb..8550461 100644 (file)
@@ -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
index b809235..4c6b982 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.1.2_JVL</version>
+    <version>1.8.3-1.1.4_JVL</version>
   </parent>
 
   <artifactId>getdown-launcher</artifactId>
index 6a14aea..fd7c716 100755 (executable)
@@ -3,7 +3,7 @@
 if [ x$JVLVERSION != x ]; then
   export VERSION=$JVLVERSION
 else
-  export VERSION=1.8.3-1.0_JVL
+  export VERSION=1.8.3-1.1.4_JVL
 fi
 
 if [ x${VERSION%_JVL} = x$VERSION ]; then
@@ -14,7 +14,7 @@ echo "Setting VERSION to '$VERSION'"
 
 perl -p -i -e 's|(<version>)[^<]*JVL[^<]*(</version>)|${1}$ENV{VERSION}${2}|;' pom.xml */pom.xml
 
-mvn package -Dgetdown.host.whitelist="jalview.org,*.jalview.org"
+mvn package -Dgetdown.host.whitelist="jalview.org,*.jalview.org" -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.jar to getdown/lib"
index 64555e0..24efba8 100644 (file)
@@ -10,7 +10,7 @@
   <groupId>com.threerings.getdown</groupId>
   <artifactId>getdown</artifactId>
   <packaging>pom</packaging>
-  <version>1.8.3-1.1.2_JVL</version>
+  <version>1.8.3-1.1.4_JVL</version>
 
   <name>getdown</name>
   <description>An application installer and updater.</description>
index d01d23e..4fcb636 100644 (file)
@@ -59,6 +59,7 @@ getdown_launch_jvl = channel_launch.jvl
 getdown_build_properties = build_properties
 getdown_txt_title = Jalview
 getdown_txt_allow_offline = true
+getdown_txt_max_concurrent_downloads = 10
 getdown_txt_jalview.jvmmempc = 90
 getdown_txt_multi_jvmarg = -Dgetdownappdir=%APPDIR%
 getdown_txt_strict_comments = true
index 397dc49..7849bc7 100644 (file)
Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ
index 397dc49..7849bc7 100644 (file)
Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ
index 0a46600..8158718 100644 (file)
@@ -82,7 +82,7 @@ public class WebserviceInfo extends GWebserviceInfo
 
   Image image;
 
-  int angle = 0;
+  float angle = 0f;
 
   String title = "";
 
@@ -797,27 +797,27 @@ protected void cancel_actionPerformed(ActionEvent e)
     {
       startTime = System.currentTimeMillis();
 
-      float invSpeed = 30f;
+      float invSpeed = 15f;
+      float factor = 1f;
       while (currentStatus < STATE_STOPPED_OK)
       {
         if (currentStatus == STATE_QUEUING)
         {
           invSpeed = 25f;
+          factor = 1f;
         }
         else if (currentStatus == STATE_RUNNING)
         {
           invSpeed = 10f;
+          factor = (float) (0.5 + 1.5
+                  * (0.5 - (0.5 * Math.sin(3.14159 / 180 * (angle + 45)))));
         }
         try
         {
           Thread.sleep(50);
 
-          int units = (int) ((System.currentTimeMillis() - startTime)
-                  / invSpeed);
-          double factor = 0.5
-                  + 1.5 * (0.5
-                          - (0.5 * Math.sin(Math.toRadians(angle + 45))));
-          angle += units * factor;
+          float delta = (System.currentTimeMillis() - startTime) / invSpeed;
+          angle += delta * factor;
           angle %= 360;
           startTime = System.currentTimeMillis();
 
@@ -842,13 +842,14 @@ protected void cancel_actionPerformed(ActionEvent e)
 
       while (angle < 360)
       {
+        float invSpeed = 5f;
+        float factor = 1f;
         try
         {
           Thread.sleep(25);
 
-          int units = (int) ((System.currentTimeMillis() - startTime)
-                  / 5f);
-          angle += units;
+          float delta = (System.currentTimeMillis() - startTime) / invSpeed;
+          angle += delta * factor;
           startTime = System.currentTimeMillis();
 
           if (angle >= 360)
@@ -888,9 +889,9 @@ protected void cancel_actionPerformed(ActionEvent e)
       if (image != null)
       {
         int x = image.getWidth(this) / 2, y = image.getHeight(this) / 2;
-        g.rotate(Math.toRadians(angle), x, y);
+        g.rotate(3.14159 / 180 * (angle), x, y);
         g.drawImage(image, 0, 0, this);
-        g.rotate(-Math.toRadians(angle), x, y);
+        g.rotate(-3.14159 / 180 * (angle), x, y);
       }
     }