diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..84ed6ae
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..d3685f8
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..b061816
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..86993b2
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant/pom.xml b/ant/pom.xml
index ea3dbf6..f03e2fe 100644
--- a/ant/pom.xml
+++ b/ant/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- com.threerings.getdown
+ net.affliction
getdown
- 1.8.11-SNAPSHOT
+ 1.0.0
getdown-ant
@@ -14,7 +14,7 @@
- com.threerings.getdown
+ net.affliction
getdown-core
${project.version}
diff --git a/core/pom.xml b/core/pom.xml
index 37dd3d0..a65f62c 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- com.threerings.getdown
+ net.affliction
getdown
- 1.8.11-SNAPSHOT
+ 1.0.0
getdown-core
diff --git a/core/src/it/java/com/threerings/getdown/tests/DigesterIT.java b/core/src/it/java/com/threerings/getdown/tests/DigesterIT.java
deleted file mode 100644
index d2ddaf2..0000000
--- a/core/src/it/java/com/threerings/getdown/tests/DigesterIT.java
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// Getdown - application installer, patcher and launcher
-// Copyright (C) 2004-2018 Getdown authors
-// https://github.com/threerings/getdown/blob/master/LICENSE
-
-package com.threerings.getdown.tests;
-
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Arrays;
-import java.util.List;
-
-import com.threerings.getdown.tools.Digester;
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-
-public class DigesterIT {
-
- @Test
- public void testDigester () throws Exception {
- Path appdir = Paths.get("src/it/resources/testapp");
- Digester.createDigests(appdir.toFile(), null, null, null);
-
- Path digest = appdir.resolve("digest.txt");
- List digestLines = Files.readAllLines(digest, StandardCharsets.UTF_8);
- Files.delete(digest);
-
- Path digest2 = appdir.resolve("digest2.txt");
- List digest2Lines = Files.readAllLines(digest2, StandardCharsets.UTF_8);
- Files.delete(digest2);
-
- assertEquals(Arrays.asList(
- "getdown.txt = 9c9b2494929c99d44ae51034d59e1a1b",
- "testapp.jar = 404dafa55e78b25ec0e3a936357b1883",
- "funny%test dir/some=file.txt = d8e8fca2dc0f896fd7cb4cb0031ba249",
- "crazyhashfile#txt = f29d23fd5ab1781bd8d0760b3a516f16",
- "foo.jar = 46ca4cc9079d9d019bb30cd21ebbc1ec",
- "script.sh = f66e8ea25598e67e99c47d9b0b2a2cdf",
- "digest.txt = 11f9ba349cf9edacac4d72a3158447e5"
- ), digestLines);
-
- assertEquals(Arrays.asList(
- "getdown.txt = 1efecfae2a189002a6658f17d162b1922c7bde978944949276dc038a0df2461f",
- "testapp.jar = c9cb1906afbf48f8654b416c3f831046bd3752a76137e5bf0a9af2f790bf48e0",
- "funny%test dir/some=file.txt = f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2",
- "crazyhashfile#txt = 6816889f922de38f145db215a28ad7c5e1badf7354b5cdab225a27486789fa3b",
- "foo.jar = ea188b872e0496debcbe00aaadccccb12a8aa9b025bb62c130cd3d9b8540b062",
- "script.sh = cca1c5c7628d9bf7533f655a9cfa6573d64afb8375f81960d1d832dc5135c988",
- "digest2.txt = 41eacdabda8909bdbbf61e4f980867f4003c16a12f6770e6fc619b6af100e05b"
- ), digest2Lines);
- }
-}
diff --git a/core/src/it/resources/testapp/background.png b/core/src/it/resources/testapp/background.png
deleted file mode 100644
index ff6a6ee..0000000
Binary files a/core/src/it/resources/testapp/background.png and /dev/null differ
diff --git a/core/src/it/resources/testapp/crazyhashfile#txt b/core/src/it/resources/testapp/crazyhashfile#txt
deleted file mode 100644
index 33bc373..0000000
--- a/core/src/it/resources/testapp/crazyhashfile#txt
+++ /dev/null
@@ -1 +0,0 @@
-Hello crazy world.
diff --git a/core/src/it/resources/testapp/foo.jar b/core/src/it/resources/testapp/foo.jar
deleted file mode 100644
index d040c01..0000000
Binary files a/core/src/it/resources/testapp/foo.jar and /dev/null differ
diff --git a/core/src/it/resources/testapp/funny%test dir/some=file.txt b/core/src/it/resources/testapp/funny%test dir/some=file.txt
deleted file mode 100644
index 9daeafb..0000000
--- a/core/src/it/resources/testapp/funny%test dir/some=file.txt
+++ /dev/null
@@ -1 +0,0 @@
-test
diff --git a/core/src/it/resources/testapp/getdown.txt b/core/src/it/resources/testapp/getdown.txt
deleted file mode 100644
index ab0e473..0000000
--- a/core/src/it/resources/testapp/getdown.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-# where our app is hosted on the internets
-appbase = http://notused.com/testapp
-
-# the jar file that contains our code
-code = testapp.jar
-
-# the main entry point of our app
-class = com.threerings.testapp.TestApp
-
-# we pass the appdir to our app so that it can upgrade getdown
-apparg = %APPDIR%
-
-# test the %env% mechanism
-jvmarg = -Dusername=\%ENV.USER%
-
-# test various java_*** configs, they are not interesting for digester
-java_local_dir = jre
-java_max_version = 1089999
-java_min_version = [windows] 1080111
-java_min_version = [!windows] 1080192
-java_exact_version_required = [linux] true
-java_location = [linux-amd64] /files/java/java_linux_64.zip
-java_location = [linux-i386] /files/java/java_linux_32.zip
-java_location = [mac] /files/java/java_mac_64.zip
-java_location = [windows-amd64] /files/java/java_windows_64.zip
-java_location = [windows-x86] /files/java/java_windows_32.zip
-
-strict_comments = true
-resource = funny%test dir/some=file.txt
-resource = crazyhashfile#txt
-uresource = foo.jar
-xresource = script.sh
-
-ui.name = Getdown Test App
-ui.background_image = background.png
-ui.progress = 17, 321, 458, 22
-ui.progress_bar = 336600
-ui.progress_text = FFFFFF
-ui.status = 57, 245, 373, 68
-ui.status_text = 000000
diff --git a/core/src/it/resources/testapp/script.sh b/core/src/it/resources/testapp/script.sh
deleted file mode 100644
index e3a1aba..0000000
--- a/core/src/it/resources/testapp/script.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-echo "Hello world!"
diff --git a/core/src/it/resources/testapp/testapp.jar b/core/src/it/resources/testapp/testapp.jar
deleted file mode 100644
index fe9de02..0000000
Binary files a/core/src/it/resources/testapp/testapp.jar and /dev/null differ
diff --git a/core/src/main/java/com/threerings/getdown/data/Application.java b/core/src/main/java/com/threerings/getdown/data/Application.java
index a0860c1..065bbe7 100644
--- a/core/src/main/java/com/threerings/getdown/data/Application.java
+++ b/core/src/main/java/com/threerings/getdown/data/Application.java
@@ -1027,6 +1027,12 @@ public class Application
// add the marker indicating the app is running in getdown
args.add("-D" + Properties.GETDOWN + "=true");
+ // forward the current JVM's language setting to the launched app
+ String userLanguage = System.getProperty("user.language");
+ if (!StringUtil.isBlank(userLanguage)) {
+ args.add("-Duser.language=" + userLanguage);
+ }
+
// set the native library path if we have native resources
// @TODO optional getdown.txt parameter to set addCurrentLibraryPath to true or false?
ClassPath javaLibPath = PathBuilder.buildLibsPath(this, true);
@@ -1715,7 +1721,15 @@ public class Application
}
for (String rsrc : rsrcs) {
try {
- list.add(createResource(rsrc, attrs));
+ Resource res = createResource(rsrc, attrs);
+ // skip duplicate entries: a config publisher bug once stacked the code list 11x,
+ // and on Windows the duplicated -classpath blew past the 32,767-char
+ // CreateProcess limit (error=206); duplicates also multiply download/verify work
+ if (list.contains(res)) {
+ log.warning("Skipping duplicate resource '" + rsrc + "'.");
+ continue;
+ }
+ list.add(res);
} catch (Exception e) {
log.warning("Invalid resource '" + rsrc + "'. " + e);
}
diff --git a/core/src/test/java/com/threerings/getdown/cache/GarbageCollectorTest.java b/core/src/test/java/com/threerings/getdown/cache/GarbageCollectorTest.java
deleted file mode 100644
index d34e584..0000000
--- a/core/src/test/java/com/threerings/getdown/cache/GarbageCollectorTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-//
-// Getdown - application installer, patcher and launcher
-// Copyright (C) 2004-2018 Getdown authors
-// https://github.com/threerings/getdown/blob/master/LICENSE
-
-package com.threerings.getdown.cache;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.*;
-import org.junit.rules.TemporaryFolder;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import static org.junit.Assert.*;
-import static org.junit.Assume.assumeTrue;
-
-/**
- * Validates that cache garbage is collected and deleted correctly.
- */
-@RunWith(Parameterized.class)
-public class GarbageCollectorTest
-{
- @Parameterized.Parameters(name = "{0}")
- public static Collection