From: Ben Soares Date: Thu, 18 Jul 2024 16:21:58 +0000 (+0100) Subject: JAL-3631 Tweaks to getdown for updating and user appdir properties X-Git-Tag: Release_2_11_4_0~20^2~12 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=60460495de3266551c2fff5a251637accc1f3405;p=jalview.git JAL-3631 Tweaks to getdown for updating and user appdir properties --- diff --git a/getdown/lib/getdown-core.jar b/getdown/lib/getdown-core.jar index 8019dcc..6370946 100644 Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ diff --git a/getdown/lib/getdown-launcher-local.jar b/getdown/lib/getdown-launcher-local.jar index 90129df..2db45be 100644 Binary files a/getdown/lib/getdown-launcher-local.jar and b/getdown/lib/getdown-launcher-local.jar differ diff --git a/getdown/lib/getdown-launcher.jar b/getdown/lib/getdown-launcher.jar index dfd4529..3cf11cc 100644 Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java index 0a0aeb5..81a3777 100644 --- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java +++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java @@ -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"; diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java index 653bf7a..b0b9a36 100644 --- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java +++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java @@ -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"); diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/ProxyUtil.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/ProxyUtil.java index cb51ca4..291f854 100644 --- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/ProxyUtil.java +++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/ProxyUtil.java @@ -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 loader = ServiceLoader.load(ProxyAuth.class); diff --git a/j11lib/getdown-core.jar b/j11lib/getdown-core.jar index 8019dcc..6370946 100644 Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ diff --git a/j8lib/getdown-core.jar b/j8lib/getdown-core.jar index 8019dcc..6370946 100644 Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ