JAL-3631 JAL-4104 More consistent system property names passing through getdown....
authorBen Soares <b.soares@dundee.ac.uk>
Fri, 14 Jun 2024 17:36:45 +0000 (18:36 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Fri, 14 Jun 2024 17:36:45 +0000 (18:36 +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/Application.java
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java
j11lib/getdown-core.jar
j8lib/getdown-core.jar
src/jalview/analytics/Plausible.java
src/jalview/bin/Cache.java
src/jalview/bin/Jalview.java

index 9b85916..88464c3 100644 (file)
Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ
index de59d8c..167455d 100644 (file)
Binary files a/getdown/lib/getdown-launcher-local.jar and b/getdown/lib/getdown-launcher-local.jar differ
index 8edc9c5..d4fc05d 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index 7819ea6..cb51ed6 100644 (file)
@@ -1095,7 +1095,8 @@ public class Application
         args.add("-D" + Properties.GETDOWN + "=true");
         args.add("-Dsys.install4jVersion=" + Application.i4jVersion);
         args.add("-Dinstaller.template_version=" + System.getProperty("installer.template_version"));
-        args.add("-Dlauncher_version=" + Build.version());
+        args.add("-Dlauncher.version=" + Build.version());
+        args.add("-Dinstall4j.extrainfo=" + System.getProperty("install4j.extrainfo"));
 
         // set HiDPI property if wanted
         String scalePropertyArg = HiDPISetting.getScalePropertyArg();
index 07d29ec..a10c67b 100644 (file)
@@ -160,7 +160,11 @@ public final class EnvConfig {
         if (StringUtil.isBlank(appDir)) {
           appDir = getUserAppdir();
           appDirProv = "user default";
-          userAppDir = true;
+          userAppDir = appDir != null;
+        }
+        
+        if (SysProps.noUpdate() && Boolean.valueOf(System.getProperty("no" + USE_DEFAULT_APPDIR_PROPERTY)) && appDir == null) {
+          appDir = System.getProperty(APPLICATION_APPDIR_PROPERTY);
         }
         
         int skipArgs = 2;
@@ -274,8 +278,13 @@ public final class EnvConfig {
     
     private static final String getUserAppdir() {
       System.out.println("##### Property '" + USE_DEFAULT_APPDIR_PROPERTY + "' is '" + System.getProperty(USE_DEFAULT_APPDIR_PROPERTY) + "'");
+      final String noUseDefaultAppDirProperty = "no" + USE_DEFAULT_APPDIR_PROPERTY;
+      if (Boolean.valueOf(System.getProperty(noUseDefaultAppDirProperty))) {
+        System.err.println("Not using default user appdir because property '" + noUseDefaultAppDirProperty + "' is '" + System.getProperty(noUseDefaultAppDirProperty) + "'");
+        return null;
+      }
       if (!Boolean.valueOf(System.getProperty(USE_DEFAULT_APPDIR_PROPERTY))) {
-        System.out.println("##### NOT setting default app dir");
+        System.err.println("Not using default user appdir because property '" + USE_DEFAULT_APPDIR_PROPERTY + "' is '" + System.getProperty(USE_DEFAULT_APPDIR_PROPERTY) + "'");
         return null;
       }
       String appdirname = installerAppdir == null || installerAppdir.length() == 0 ? ChannelProperties.FALLBACK_APPNAME : installerAppdir;
index 9b85916..88464c3 100644 (file)
Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ
index 9b85916..88464c3 100644 (file)
Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ
index adf324d..67f1951 100644 (file)
@@ -97,10 +97,10 @@ public class Plausible
     {
       defaultProps.put("install4j_template_version", val);
     }
-    val = System.getProperty("launcher_version");
+    val = System.getProperty("launcher.version");
     if (val != null)
     {
-      defaultProps.put("launcher_version", val);
+      defaultProps.put("launcher.version", val);
     }
     defaultProps.put("java_arch",
             System.getProperty("os.arch") + " "
index 682f102..642e360 100755 (executable)
@@ -178,8 +178,8 @@ import jalview.ws.sifts.SiftsSettings;
  * in the alignment.</li>
  * <li>SHOW_CONSENSUS_HISTOGRAM (false) Show consensus annotation row's
  * histogram.</li>
- * <li>SHOW_SSCONSENSUS_HISTOGRAM (false) Show secondary structure consensus annotation row's
- * histogram.</li>
+ * <li>SHOW_SSCONSENSUS_HISTOGRAM (false) Show secondary structure consensus
+ * annotation row's histogram.</li>
  * <li>SHOW_CONSENSUS_LOGO (false) Show consensus annotation row's sequence
  * logo.</li>
  * <li>NORMALISE_CONSENSUS_LOGO (false) Show consensus annotation row's sequence
@@ -1251,8 +1251,10 @@ public class Cache
             System.getProperty("sys.install4jVersion"), "\n", null);
     appendIfNotNull(sb, "Install4j template version: ",
             System.getProperty("installer.template_version"), "\n", null);
+    appendIfNotNull(sb, "Install4j extrainfo: ",
+            System.getProperty("install4j.extrainfo"), "\n", null);
     appendIfNotNull(sb, "Launcher version: ",
-            System.getProperty("launcher_version"), "\n", null);
+            System.getProperty("launcher.version"), "\n", null);
     LookAndFeel laf = UIManager.getLookAndFeel();
     String lafName = laf == null ? "Not obtained" : laf.getName();
     String lafClass = laf == null ? "unknown" : laf.getClass().getName();
index 148f9c0..3df1734 100755 (executable)
@@ -408,7 +408,12 @@ public class Jalview implements JalviewObjectI
       {
         Console.outPrintln("Install4j template version: " + val);
       }
-      val = System.getProperty("launcher_version");
+      val = System.getProperty("install4j.extrainfo");
+      if (val != null)
+      {
+        Console.outPrintln("Install4j extrainfo: " + val);
+      }
+      val = System.getProperty("launcher.version");
       if (val != null)
       {
         Console.outPrintln("Launcher version: " + val);