JAL-3111 report build type and commit in stdout from command line and in About/Splash...
[jalview.git] / src / jalview / bin / Jalview.java
index c7738da..74889d7 100755 (executable)
@@ -64,6 +64,8 @@ import java.util.Vector;
 import javax.swing.LookAndFeel;
 import javax.swing.UIManager;
 
+import com.threerings.getdown.util.LaunchUtil;
+
 import groovy.lang.Binding;
 import groovy.util.GroovyScriptEngine;
 
@@ -105,7 +107,7 @@ public class Jalview
         perms.add(new AllPermission());
         return (perms);
       }
-
+    
       @Override
       public void refresh()
       {
@@ -200,7 +202,26 @@ public class Jalview
     System.out.println(System.getProperty("os.arch") + " "
             + System.getProperty("os.name") + " "
             + System.getProperty("os.version"));
+    // report Jalview version
+    Cache.loadBuildProperties(true);
+
+    String appdirString = System.getProperty("getdownappdir");
+    if (appdirString != null && appdirString.length() > 0)
+    {
+      final File appdir = new File(appdirString);
+      new Thread()
+      {
+        @Override
+        public void run()
+        {
+          LaunchUtil.upgradeGetdown(
+                  new File(appdir, "getdown-launcher-old.jar"),
+                  new File(appdir, "getdown-launcher.jar"),
+                  new File(appdir, "getdown-launcher-new.jar"));
+        }
+      }.start();
 
+    }
     ArgsParser aparser = new ArgsParser(args);
     boolean headless = false;
 
@@ -335,6 +356,20 @@ public class Jalview
     {
       desktop = new Desktop();
       desktop.setInBatchMode(true); // indicate we are starting up
+
+      try
+      {
+        JalviewTaskbar.setTaskbar(this);
+      } catch (Exception e)
+      {
+        System.out.println("Cannot set Taskbar");
+        // e.printStackTrace();
+      } catch (Throwable t)
+      {
+        System.out.println("Cannot set Taskbar");
+        // t.printStackTrace();
+      }
+
       desktop.setVisible(true);
       desktop.startServiceDiscovery();
       if (!aparser.contains("nousagestats"))
@@ -538,7 +573,8 @@ public class Jalview
           data.replaceAll("%20", " ");
 
           ColourSchemeI cs = ColourSchemeProperty
-                  .getColourScheme(af.getViewport().getAlignment(), data);
+                  .getColourScheme(af.getViewport(),
+                          af.getViewport().getAlignment(), data);
 
           if (cs != null)
           {
@@ -962,7 +998,7 @@ public class Jalview
     }
     try
     {
-      Map<String, Object> vbinding = new HashMap<>();
+      Map<String, java.lang.Object> vbinding = new HashMap<>();
       vbinding.put("Jalview", this);
       if (af != null)
       {