<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>
<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>
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>
<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>
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;
+ }
+ }
}
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
* 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.
* 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
<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>
# When at 0%
m.initialising = Initialising
+m.starting = Starting
# When at 0%
m.initialising = Initialising
+m.starting = Starting
# When at 0%
m.initialising = Initialising
+m.starting = Starting
# When at 0%
m.initialising = Initialising
+m.starting = Starting
# When at 0%
m.initialising = Initialising
+m.starting = Starting
# When at 0%
m.initialising = Initialising
+m.starting = Starting
# When at 0%
m.initialising = Initialising
+m.starting = Starting
# When at 0%
m.initialising = Initialising
+m.starting = Starting
# When at 0%
m.initialising = Initialising
+m.starting = Starting
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
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"
<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>
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
Image image;
- int angle = 0;
+ float angle = 0f;
String title = "";
{
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();
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)
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);
}
}