JAL-3631 Log4j logging to .jalview.log file when requested. Clean(ish) handover of...
authorBen Soares <b.soares@dundee.ac.uk>
Thu, 27 Jun 2024 16:46:47 +0000 (17:46 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Thu, 27 Jun 2024 16:46:47 +0000 (17:46 +0100)
16 files changed:
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/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java
getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java
j11lib/getdown-core.jar
j8lib/getdown-core.jar
src/jalview/bin/Console.java
src/jalview/bin/Jalview.java
src/jalview/log/JLogger.java
src/jalview/log/JLoggerLog4j.java
src/jalview/util/Log4j.java
src/jalview/ws/jws2/Jws2Discoverer.java
utils/dev_install.sh
utils/install4j/install4j10_template.install4j

index 191df35..5ed4dc9 100644 (file)
Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ
index 7f40797..8e35fd0 100644 (file)
Binary files a/getdown/lib/getdown-launcher-local.jar and b/getdown/lib/getdown-launcher-local.jar differ
index bb2bf61..daf333e 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index d210044..8db0983 100644 (file)
@@ -1092,21 +1092,14 @@ public class Application
         args.add("-Dlauncher.appbase=" + getAppbase().toString());
         args.add("-Dlauncher.appdir=" + getAppDir());
         args.add("-Dlauncher.version=" + Build.version());
-        if (System.getProperty("installer.appdir") != null) {
-          args.add("-Dinstaller.appdir=" + System.getProperty("installer.appdir"));
-        }
+        addSystemPropertyIfNotNull(args, "installer.appdir");
         // add the marker indicating the app is running in getdown
         args.add("-D" + Properties.GETDOWN + "=true");
         args.add("-Dsys.install4jVersion=" + Application.i4jVersion);
-        if (System.getProperty("installer.template_version") != null) {
-          args.add("-Dinstaller.template_version=" + System.getProperty("installer.template_version"));
-        }
-        if (System.getProperty("installer.logfile") != null) {
-          args.add("-Dinstaller.logfile=" + System.getProperty("installer.logfile"));
-        }
-        if (System.getProperty("installer.extrainfo") != null) {
-          args.add("-Dinstaller.extrainfo=" + System.getProperty("installer.extrainfo"));
-        }
+        addSystemPropertyIfNotNull(args, "installer.template_version");
+        addSystemPropertyIfNotNull(args, "installer.logfile");
+        addSystemPropertyIfNotNull(args, "installer.logfile_append");
+        addSystemPropertyIfNotNull(args, "installer.extrainfo");
         
         // backward compatibility (old getdown-launcher.jar)
         args.add("-Dgetdownappdir=" + getAppDir());
@@ -1141,18 +1134,6 @@ public class Application
         if (! StringUtil.isBlank(_jalviewUri)) {
           _appargs.add(0, _jalviewUri);
         }
-        /* don't convert jalviewX:// URIs to https:// URLs as Jalview can now do that
-        if (_appargs.size() > 0) {
-          String jalviewUri = _appargs.get(0);
-          log.info("Trying to parse uri '"+jalviewUri+"'");
-          if (HttpUtils.isJalviewSchemeUri(jalviewUri)) {
-            String jalviewUrl = HttpUtils.equivalentJalviewUrl(jalviewUri);
-            log.info("Turned url '"+jalviewUri+"' into '"+jalviewUrl+"'");
-            _appargs.clear();
-            _appargs.add(jalviewUrl);
-          }
-        }
-        */
         
         for (String argString: _appargs) {
           if (argString.startsWith("-jvmmempc=")) {
@@ -1250,7 +1231,7 @@ public class Application
 
         String[] envp = createEnvironment();
         String[] sargs = args.toArray(new String[args.size()]);
-        log.info("Running " + StringUtil.join(sargs, "\n  "));
+        log.info("Running \"" + StringUtil.join(sargs, "\" \\\n  \"") + "\"");
 
         // don't set the working dir, leave it the same as the working dir of the invocation
         //return Runtime.getRuntime().exec(sargs, envp, getAppDir());
@@ -2215,6 +2196,17 @@ public class Application
         }
     }
     
+    private static void addSystemPropertyIfNotNull(List<String> args, String key) {
+      if (args == null || key == null || System.getProperty(key) == null) {
+        return;
+      }
+      StringBuilder sb = new StringBuilder("-D");
+      sb.append(key);
+      sb.append("=");
+      sb.append(System.getProperty(key));
+      args.add(sb.toString());
+    }
+    
     protected final EnvConfig _envc;
     protected File _config;
     protected File _backupConfig;
index aeb2dbd..fcd6dce 100644 (file)
@@ -1065,17 +1065,18 @@ public abstract class Getdown extends Thread
             BufferedReader reader = new BufferedReader(new InputStreamReader(in));
             String line;
             while ((line = reader.readLine()) != null) {
-                if (!_closed) {
-                  out.println(line);
-                  out.flush();
-                }
                 // look for logfile handover
-                if (line.equals(LaunchUtils.LOGFILE_HANDOVER)) {
+                if (line.endsWith(LaunchUtils.LOGFILE_HANDOVER)) {
+                  out.println("LAUNCHER end of logging");
                   out.flush();
                   out.close();
                   _closed = true;
                 }
-                // check for desktop creation line and end early
+                if (!_closed) {
+                  out.println("LAUNCHER pass-through: "+line);
+                  out.flush();
+                }
+                // check for desktop creation line and close splashscreen early
                 if (!_disposed && line.endsWith(": CREATED DESKTOP")) {
                   // pump the percent up to 100%
                   if (_latestInstance != null) {
index 71a0402..6800f5a 100644 (file)
@@ -64,7 +64,8 @@ public class GetdownApp
    */
   public static Getdown start (String[] argv) throws Exception {
     jalview.util.ErrorLog.setHasConsole(false);
-    jalview.util.ErrorLog.setPrefix("LAUNCHER - ");
+    jalview.util.ErrorLog.setPrefix("LAUNCHER: ");
+    jalview.util.ErrorLog.outPrintln("start of logging");
     List<EnvConfig.Note> notes = new ArrayList<>();
     boolean append = false;
     EnvConfig envc = EnvConfig.create(argv, notes, GetdownApp.class);
@@ -88,17 +89,16 @@ public class GetdownApp
           logFileName = System.getProperty("user.home") + File.separator + logFileName.substring(2);
         }
         logFile = new File(logFileName);
-        append = true;
+        append = Boolean.parseBoolean(System.getProperty("installer.logfile_append"));
       } else {
         logFile = new File(envc.appDir, "launcher.log");
       }
       try {
         PrintStream logOut = new PrintStream(
                 new BufferedOutputStream(new FileOutputStream(logFile, append)), true);
+        
         System.setOut(logOut);
         System.setErr(logOut);
-        log.info(Note.info("LAUNCHER starting to log"));
-        log.info(Note.info("Launcher logging to '" + logFile.getAbsolutePath() + "'"));
       } catch (IOException ioe) {
         log.warning("Unable to redirect output to '" + logFile + "': " + ioe);
       }
@@ -131,7 +131,7 @@ public class GetdownApp
     }
     
     // record a few things for posterity
-    log.info("------------------ VM Info ------------------");
+    log.info("------------- Launcher VM Info --------------");
     log.info("-- OS Name: " + System.getProperty("os.name"));
     log.info("-- OS Arch: " + System.getProperty("os.arch"));
     log.info("-- OS Vers: " + System.getProperty("os.version"));
index 191df35..5ed4dc9 100644 (file)
Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ
index 191df35..5ed4dc9 100644 (file)
Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ
index 1bb8162..e3da4a5 100644 (file)
  */
 package jalview.bin;
 
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.PrintStream;
+import java.util.Locale;
 
 import jalview.log.JLogger;
 import jalview.log.JLoggerI.LogLevel;
 import jalview.log.JLoggerLog4j;
 import jalview.util.ChannelProperties;
-import jalview.util.Log4j;
-import jalview.util.Platform;
+import jalview.util.LaunchUtils;
 
 public class Console
 {
 
   public static JLoggerLog4j log;
 
+  private static PrintStream out = System.out;
+
+  private static PrintStream err = System.err;
+
+  private static File logfile = null;
+
+  public static PrintStream getOut()
+  {
+    return out;
+  }
+
+  public static PrintStream getErr()
+  {
+    return err;
+  }
+
+  public static void setOut(PrintStream p)
+  {
+    out = p;
+  }
+
+  public static void setErr(PrintStream p)
+  {
+    err = p;
+  }
+
+  public static boolean setLogFile(String filename, boolean append)
+  {
+    boolean usingLogfile = false;
+    if (filename != null)
+    {
+      if (filename.startsWith("~/"))
+      {
+        filename = System.getProperty("user.home") + File.separator
+                + filename.substring(2);
+      }
+      logfile = new File(filename);
+
+      try
+      {
+        PrintStream logFilePrintStream = new PrintStream(
+                new BufferedOutputStream(
+                        new FileOutputStream(logfile, append)),
+                true);
+
+        Console.setOut(logFilePrintStream);
+        Console.setErr(logFilePrintStream);
+
+        Console.info(LaunchUtils.LOGFILE_HANDOVER);
+
+        Console.info(ChannelProperties.getProperty("app_name")
+                .toUpperCase(Locale.ROOT) + " start of logging");
+        Console.debug(ChannelProperties.getProperty("app_name")
+                + " logging to " + filename);
+
+        usingLogfile = true;
+      } catch (FileNotFoundException e)
+      {
+        Console.errPrintln("Error opening logfile: " + e.getMessage());
+      }
+    }
+    return usingLogfile;
+  }
+
   public static void debug(String message, Throwable t)
   {
     if (Console.initLogger())
@@ -45,7 +113,6 @@ public class Console
       outPrintln(message);
       Console.printStackTrace(t);
     }
-
   }
 
   public static void info(String message)
@@ -248,15 +315,8 @@ public class Console
         logLevel = getCachedLogLevel();
       }
 
-      if (!Platform.isJS())
-      {
-        if (!Jalview.quiet())
-        {
-          jalview.bin.Console.errPrintln(
-                  "Setting initial log level to " + logLevel.name());
-        }
-        Log4j.init(logLevel);
-      }
+      JLoggerLog4j.setLogfile(logfile);
+
       // log output
       // is laxis used? Does getLogger do anything without a Logger object?
       // Logger laxis = Log4j.getLogger("org.apache.axis", myLevel);
@@ -299,13 +359,14 @@ public class Console
       Console.debug("Invalid log level '" + logLevelString + "'");
       return;
     }
+    setLogLevel(l);
+  }
+
+  public static void setLogLevel(LogLevel l)
+  {
     if (l != null)
     {
       log.setLevel(l);
-      if (!Platform.isJS())
-      {
-        Log4j.init(l);
-      }
       JLoggerLog4j.getLogger("org.apache.axis", l);
     }
   }
@@ -342,11 +403,11 @@ public class Console
             && Jalview.getInstance().getBootstrapArgs() != null
             && Jalview.getInstance().getBootstrapArgs().outputToStdout())
     {
-      return System.err;
+      return err;
     }
     else
     {
-      return System.out;
+      return out;
     }
   }
 
@@ -376,12 +437,12 @@ public class Console
 
   public static void errPrint(Object message)
   {
-    System.err.print(message);
+    err.print(message);
   }
 
   public static void errPrintln(Object message)
   {
-    System.err.println(message);
+    err.println(message);
   }
 
   public static void debugPrintStackTrace(Throwable t)
@@ -397,7 +458,7 @@ public class Console
   public static void printStackTrace(Throwable t)
   {
     // send message to stderr if output to stdout is expected
-    t.printStackTrace(System.err);
+    t.printStackTrace(err);
   }
 
   public final static String LOGGING_TEST_MESSAGE = "Logging to STDERR";
index f8d5c66..6b88cfa 100755 (executable)
@@ -21,7 +21,6 @@
 package jalview.bin;
 
 import java.awt.Color;
-import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -320,42 +319,16 @@ public class Jalview implements JalviewObjectI
     // get args needed before proper ArgParser
     bootstrapArgs = BootstrapArgs.getBootstrapArgs(args);
 
+    boolean usingLogfile = false;
     if (!Platform.isJS())
     {
-      boolean usingLogfile = false;
 
       // are we using a logfile?
-      String logFileName = System.getProperty("installer.logfile");
-      if (logFileName != null)
-      {
-        try
-        {
-          if (logFileName.startsWith("~/"))
-          {
-            logFileName = System.getProperty("user.home") + File.separator
-                    + logFileName.substring(2);
-          }
-          File logFile = new File(logFileName);
-
-          PrintStream logFilePrintStream = new PrintStream(
-                  new BufferedOutputStream(
-                          new FileOutputStream(logFile, true)),
-                  true);
-
-          Console.info(LaunchUtils.LOGFILE_HANDOVER);
-          System.setOut(logFilePrintStream);
-          System.setErr(logFilePrintStream);
-          Console.info(ChannelProperties.getProperty("app_name")
-                  .toUpperCase(Locale.ROOT) + " starting to log");
-          Console.info(ChannelProperties.getProperty("app_name")
-                  + " logging to " + logFileName);
-
-          usingLogfile = true;
-        } catch (FileNotFoundException e)
-        {
-          Console.errPrintln("Error opening logfile: " + e.getMessage());
-        }
-      }
+      String logfilename = System.getProperty("installer.logfile");
+      boolean append = Boolean
+              .parseBoolean(System.getProperty("installer.logfile_append"));
+
+      usingLogfile = Console.setLogFile(logfilename, append);
 
       // are we being --quiet ? (doesn't matter if using a logfile)
       if (!usingLogfile && bootstrapArgs.contains(Arg.QUIET))
@@ -363,7 +336,6 @@ public class Jalview implements JalviewObjectI
         QUIET = true;
         OutputStream devNull = new OutputStream()
         {
-
           @Override
           public void write(int b)
           {
@@ -424,50 +396,17 @@ public class Jalview implements JalviewObjectI
       }.start();
     }
 
-    if (!quiet() || !bootstrapArgs.outputToStdout()
+    if ((usingLogfile || !quiet()) || !bootstrapArgs.outputToStdout()
             || bootstrapArgs.contains(Arg.VERSION))
     {
-      Console.outPrintln(
-              "Java version: " + System.getProperty("java.version"));
-      Console.outPrintln("Java home: " + System.getProperty("java.home"));
-      Console.outPrintln("Java arch: " + System.getProperty("os.arch") + " "
-              + System.getProperty("os.name") + " "
-              + System.getProperty("os.version"));
-
-      String val = System.getProperty("sys.install4jVersion");
-      if (val != null)
-      {
-        Console.outPrintln("Installer version: " + val);
-      }
-      val = System.getProperty("installer.template_version");
-      if (val != null)
-      {
-        Console.outPrintln("Installer template version: " + val);
-      }
-      val = System.getProperty("installer.appdir");
-      if (val != null)
-      {
-        Console.outPrintln("Installer appdir: " + val);
-      }
-      val = System.getProperty("installer.extrainfo");
-      if (val != null)
-      {
-        Console.outPrintln("Installer extrainfo: " + val);
-      }
-      val = System.getProperty("launcher.version");
-      if (val != null)
-      {
-        Console.outPrintln("Launcher version: " + val);
-      }
-      val = appdirString;
-      if (val != null)
+      if (usingLogfile)
       {
-        Console.outPrintln("Launcher appdir: " + val);
+        Console.outPrintln("-------");
       }
-      val = System.getProperty("launcher.appbase");
-      if (val != null)
+      Console.outPrint(Cache.getVersionDetailsForConsole());
+      if (usingLogfile)
       {
-        Console.outPrintln("Launcher appbase: " + val);
+        Console.outPrintln("-------");
       }
     }
 
@@ -699,6 +638,7 @@ public class Jalview implements JalviewObjectI
     }
     System.setProperty("http.agent", UserAgent.getUserAgent());
 
+    // Initialise the logger
     try
     {
       Console.initLogger();
index 554b997..6d1cf06 100644 (file)
@@ -116,11 +116,13 @@ public abstract class JLogger implements JLoggerI
     return registry.get(name);
   }
 
+  @Override
   public LogLevel getLevel()
   {
     return this.level;
   }
 
+  @Override
   public void setLevel(LogLevel level)
   {
     this.level = level;
@@ -155,71 +157,85 @@ public abstract class JLogger implements JLoggerI
     }
   }
 
+  @Override
   public void trace(String message)
   {
     trace(message, null);
   }
 
+  @Override
   public void trace(String message, Throwable t)
   {
     println(LogLevel.TRACE, message, t);
   }
 
+  @Override
   public void debug(String message)
   {
     debug(message, null);
   }
 
+  @Override
   public void debug(String message, Throwable t)
   {
     println(LogLevel.DEBUG, message, t);
   }
 
+  @Override
   public void info(String message)
   {
     info(message, null);
   }
 
+  @Override
   public void info(String message, Throwable t)
   {
     println(LogLevel.INFO, message, t);
   }
 
+  @Override
   public void warn(String message)
   {
     warn(message, null);
   }
 
+  @Override
   public void warn(String message, Throwable t)
   {
     println(LogLevel.WARN, message, t);
   }
 
+  @Override
   public void error(String message)
   {
     error(message, null);
   }
 
+  @Override
   public void error(String message, Throwable t)
   {
     println(LogLevel.ERROR, message, t);
   }
 
+  @Override
   public void fatal(String message)
   {
     fatal(message, null);
   }
 
+  @Override
   public void fatal(String message, Throwable t)
   {
     println(LogLevel.FATAL, message, t);
   }
 
+  @Override
   public boolean isDebugEnabled()
   {
     return level.compareTo(LogLevel.DEBUG) <= 0;
   }
 
+  @Override
   public boolean isTraceEnabled()
   {
     return level.compareTo(LogLevel.TRACE) <= 0;
index 22f3a55..99ed507 100644 (file)
  */
 package jalview.log;
 
+import java.io.File;
+
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.core.Appender;
 
+import jalview.bin.Jalview;
 import jalview.util.Log4j;
 import jalview.util.Platform;
 
@@ -30,9 +33,11 @@ public class JLoggerLog4j extends JLogger implements JLoggerI
 {
   private Logger logger = null;
 
+  private static File logfile = null;
+
   public static JLoggerLog4j getLogger(Class c)
   {
-    return getLogger(c);
+    return getLogger(c.getCanonicalName());
   }
 
   public static JLoggerLog4j getLogger(Class c, LogLevel loglevel)
@@ -45,8 +50,24 @@ public class JLoggerLog4j extends JLogger implements JLoggerI
     return getLogger(name, LogLevel.INFO);
   }
 
+  // This must be called before Log4j.init(), so before JLoggerLog4j.getLogger()
+  public static void setLogfile(File f)
+  {
+    logfile = f;
+  }
+
   public static JLoggerLog4j getLogger(String name, LogLevel loglevel)
   {
+    if (!Platform.isJS())
+    {
+      if (!Jalview.quiet())
+      {
+        jalview.bin.Console
+                .errPrintln("Setting log level to " + loglevel.name());
+      }
+      Log4j.init(loglevel, logfile);
+    }
+
     return registryContainsKey(name) ? (JLoggerLog4j) registryGet(name)
             : new JLoggerLog4j(name, loglevel);
   }
index 6517703..67c2770 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.util;
 
+import java.io.File;
 import java.util.Map;
 
 import org.apache.logging.log4j.Level;
@@ -38,6 +39,7 @@ import org.apache.logging.log4j.core.config.builder.api.AppenderComponentBuilder
 import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilder;
 import org.apache.logging.log4j.core.config.builder.api.FilterComponentBuilder;
 import org.apache.logging.log4j.core.config.builder.api.LayoutComponentBuilder;
+import org.apache.logging.log4j.core.config.builder.api.RootLoggerComponentBuilder;
 import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration;
 import org.apache.logging.log4j.core.filter.ThresholdFilter;
 import org.apache.logging.log4j.core.layout.PatternLayout;
@@ -50,6 +52,8 @@ public class Log4j
 
   public final static String SIMPLE_PATTERN = "%level - %m%n";
 
+  public final static String TIME_PATTERN = "%d{yyyy-MM-dd HH:mm:ss} %level - %m%n";
+
   private static boolean init = false;
 
   public static boolean isInit()
@@ -67,18 +71,30 @@ public class Log4j
     init(log4jLevel(myLevel));
   }
 
+  public static void init(JLogger.LogLevel myLevel, File logfile)
+  {
+    init(log4jLevel(myLevel), logfile);
+  }
+
   public static void init(Level myLevel)
   {
+    init(myLevel, null);
+  }
+
+  public static void init(Level myLevel, File logfile)
+  {
     if (init)
+    {
       return;
+    }
     try
     {
       // configure the root logger to stderr
       ConfigurationBuilder<BuiltConfiguration> configBuilder = Log4j
               .getConfigurationBuilder();
+      configBuilder.setStatusLevel(Level.INFO);
 
-      configBuilder.setStatusLevel(Level.WARN);
-
+      // Console
       String consoleLoggerName = "STDERR";
       AppenderComponentBuilder appenderBuilder = configBuilder
               .newAppender(consoleLoggerName, "Console");
@@ -88,8 +104,23 @@ public class Log4j
       appenderBuilder.add(Log4j.getThresholdFilterBuilder());
       configBuilder.add(appenderBuilder);
 
-      configBuilder.add(configBuilder.newRootLogger(myLevel)
-              .add(configBuilder.newAppenderRef(consoleLoggerName)));
+      RootLoggerComponentBuilder root = configBuilder
+              .newRootLogger(myLevel);
+      root.add(configBuilder.newAppenderRef(consoleLoggerName));
+
+      if (logfile != null)
+      {
+        String fileLoggerName = "LOGFILE";
+        appenderBuilder = configBuilder.newAppender(fileLoggerName, "File")
+                .addAttribute("fileName", logfile.getAbsolutePath());
+        appenderBuilder.add(Log4j.getTimeLayoutBuilder());
+        appenderBuilder.add(Log4j.getThresholdFilterBuilder());
+
+        configBuilder.add(appenderBuilder);
+
+        root.add(configBuilder.newAppenderRef(fileLoggerName));
+      }
+      configBuilder.add(root);
 
       Configurator.initialize(configBuilder.build());
 
@@ -124,11 +155,22 @@ public class Log4j
     return ConfigurationFactory.newConfigurationBuilder();
   }
 
+  public static Layout getTimeLayout()
+  {
+    return PatternLayout.newBuilder().withPattern(TIME_PATTERN).build();
+  }
+
   public static Layout getSimpleLayout()
   {
     return PatternLayout.newBuilder().withPattern(SIMPLE_PATTERN).build();
   }
 
+  public static LayoutComponentBuilder getTimeLayoutBuilder()
+  {
+    return getConfigurationBuilder().newLayout("PatternLayout")
+            .addAttribute("pattern", Log4j.TIME_PATTERN);
+  }
+
   public static LayoutComponentBuilder getSimpleLayoutBuilder()
   {
     return getConfigurationBuilder().newLayout("PatternLayout")
index 2e4631f..ed40b84 100644 (file)
  */
 package jalview.ws.jws2;
 
-import jalview.bin.Cache;
-import jalview.bin.Console;
-import jalview.gui.AlignFrame;
-import jalview.gui.Desktop;
-import jalview.gui.JvSwingUtils;
-import jalview.util.MessageManager;
-import jalview.ws.WSMenuEntryProviderI;
-import jalview.ws.jws2.jabaws2.Jws2Instance;
-import jalview.ws.params.ParamDatastoreI;
-
 import java.awt.Color;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -53,6 +43,15 @@ import javax.swing.JMenu;
 import javax.swing.JMenuItem;
 
 import compbio.ws.client.Services;
+import jalview.bin.Cache;
+import jalview.bin.Console;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.gui.JvSwingUtils;
+import jalview.util.MessageManager;
+import jalview.ws.WSMenuEntryProviderI;
+import jalview.ws.jws2.jabaws2.Jws2Instance;
+import jalview.ws.params.ParamDatastoreI;
 
 /**
  * discoverer for jws2 services. Follows the lightweight service discoverer
@@ -314,7 +313,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
     {
       services = new Vector<>();
     }
-    jalview.bin.Console.outPrintln(
+    jalview.bin.Console.info(
             "Discovered service: " + jwsservers + " " + service.toString());
     // Jws2Instance service = new Jws2Instance(jwsservers, srv.toString(),
     // service2);
index 5648bf5..5b70b50 100755 (executable)
@@ -180,7 +180,7 @@ case $OS in
       echo "Removing '$APPLICATIONS/$APP.app'"
       /bin/rm -r "$APPLICATIONS/$APP.app"
       echo "Syncing '$MOUNTEDAPP' to '$APPLICATIONS/'"
-      rsync -avh "$MOUNTEDAPP" "$APPLICATIONS/"
+      rsync --delete -avh "$MOUNTEDAPP" "$APPLICATIONS/"
       echo "Unmounting '/Volumes/$INSTALLERVOL'"
       hdiutil detach "/Volumes/$INSTALLERVOL"
     else
index ed4ef85..59d5079 100644 (file)
           <versionLine x="85" y="109" text="version ${compiler:sys.version}" />
         </text>
       </splashScreen>
-      <java mainClass="com.threerings.getdown.launcher.GetdownApp" vmParameters="-Duserdefaultappdir=true -Dpopulatedefaultappdir=true -Dappid=jalview -Dinstaller.template_version=${compiler:INSTALLER_TEMPLATE_VERSION} -Dinstaller.appdir=&quot;${launcher:sys.launcherDirectory}&quot; -Dinstaller.application_folder=&quot;${compiler:APPLICATION_FOLDER}&quot; -Dchannel.app_name=&quot;${compiler:JALVIEW_APPLICATION_NAME}&quot; -Dinstaller.icon=&quot;${compiler:PNG_ICON_FILE}&quot; -Dinstaller.mac_icons=&quot;${compiler:MAC_ICONS_FILE}&quot; -Dinstaller.logfile=&quot;~/.${compiler:LOG_FILE}&quot;" arguments="&quot;&quot; &quot;&quot;">
+      <java mainClass="com.threerings.getdown.launcher.GetdownApp" vmParameters="-Duserdefaultappdir=true -Dpopulatedefaultappdir=true -Dappid=jalview -Dinstaller.template_version=${compiler:INSTALLER_TEMPLATE_VERSION} -Dinstaller.appdir=&quot;${launcher:sys.launcherDirectory}&quot; -Dinstaller.application_folder=&quot;${compiler:APPLICATION_FOLDER}&quot; -Dchannel.app_name=&quot;${compiler:JALVIEW_APPLICATION_NAME}&quot; -Dinstaller.icon=&quot;${compiler:PNG_ICON_FILE}&quot; -Dinstaller.mac_icons=&quot;${compiler:MAC_ICONS_FILE}&quot; -Dinstaller.logfile=&quot;~/.${compiler:LOG_FILE}&quot; -Dinstaller.logfile_append=true" arguments="&quot;&quot; &quot;&quot;">
         <classPath>
           <archive location="getdown-launcher.jar" failOnError="false" />
           <archive location="${compiler:GETDOWN_INSTALL_DIR}/getdown-launcher.jar" failOnError="false" />