JAL-3631 Tweaks to getdown for updating and user appdir properties
authorBen Soares <b.soares@dundee.ac.uk>
Thu, 18 Jul 2024 16:21:58 +0000 (17:21 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Thu, 18 Jul 2024 16:21:58 +0000 (17:21 +0100)
getdown/lib/getdown-core.jar
getdown/lib/getdown-launcher-local.jar
getdown/lib/getdown-launcher.jar
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java
getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java
getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/ProxyUtil.java
j11lib/getdown-core.jar
j8lib/getdown-core.jar

index 8019dcc..6370946 100644 (file)
Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ
index 90129df..2db45be 100644 (file)
Binary files a/getdown/lib/getdown-launcher-local.jar and b/getdown/lib/getdown-launcher-local.jar differ
index dfd4529..3cf11cc 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index 0a0aeb5..81a3777 100644 (file)
@@ -179,10 +179,11 @@ public final class EnvConfig {
         }
  
         // forced by system property to not use user default appdir
-        if (SysProps.noUpdate() && Boolean.valueOf(System.getProperty("no" + USER_DEFAULT_APPDIR_PROPERTY))) {
+        if (appDir == null && Boolean.valueOf(System.getProperty("no" + USER_DEFAULT_APPDIR_PROPERTY))) {
           appDir = installerAppdir;
-          appDirProv = "no user default";
+          appDirProv = "installer appdir";
           userAppDir = false;
+          notes.add(Note.info("Not using " + USER_DEFAULT_APPDIR_PROPERTY + ", resorting to " + appDirProv + " '" + appDir +"'"));
         } else if (userAppDir && installerAppdir != null) {
           // we're going to try and use a different appdir, check if newer getdown-launcher.jar found there, and restart using that one
           final String getdown = "getdown-launcher.jar";
index 653bf7a..b0b9a36 100644 (file)
@@ -135,7 +135,7 @@ public abstract class Getdown extends Thread
 
         // determine whether or not we can write to our install directory
         File instdir = _app.getLocalPath("");
-        if (!instdir.canWrite()) {
+        if (!instdir.canWrite() && !SysProps.noUpdate()) {
             String path = instdir.getPath();
             if (path.equals(".")) {
                 path = System.getProperty("user.dir");
index cb51ca4..291f854 100644 (file)
@@ -28,6 +28,7 @@ import ca.beq.util.win32.registry.RegistryValue;
 import ca.beq.util.win32.registry.RootKey;
 
 import com.threerings.getdown.data.Application;
+import com.threerings.getdown.data.SysProps;
 import com.threerings.getdown.spi.ProxyAuth;
 import com.threerings.getdown.util.Config;
 import com.threerings.getdown.util.ConnectionUtil;
@@ -165,7 +166,9 @@ public class ProxyUtil {
     public static void configProxy (Application app, String host, String port,
                                     String username, String password) {
         // save our proxy host and port in a local file
-        saveProxy(app, host, port);
+        if (!SysProps.noUpdate()) {
+          saveProxy(app, host, port);
+        }
 
         // save our credentials via the SPI
         if (!StringUtil.isBlank(username) && !StringUtil.isBlank(password)) {
@@ -211,7 +214,7 @@ public class ProxyUtil {
     public static void initProxy (Application app, String host, String port,
                                   String username, String password)
     {
-System.out.println("**** initProxy(app, '"+host+"', "+port+", '"+username+"', "+(password==null?"null":"*x"+password.length())+")");
+        log.info("initProxy:", "app", app, "host", host, "port", port, "username", username, "password", "("+(password==null?"null":"*x"+password.length())+")");
         // check whether we have saved proxy credentials
         String appDir = app.getAppDir().getAbsolutePath();
         ServiceLoader<ProxyAuth> loader = ServiceLoader.load(ProxyAuth.class);
index 8019dcc..6370946 100644 (file)
Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ
index 8019dcc..6370946 100644 (file)
Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ