JAL-3449 don't assume install4j jar in classpath of getdown
[jalview.git] / getdown / src / getdown / launcher / src / main / java / com / threerings / getdown / launcher / GetdownApp.java
index 684de30..c76c727 100644 (file)
@@ -7,7 +7,6 @@ package com.threerings.getdown.launcher;
 
 import java.awt.Color;
 import java.awt.Container;
-import java.awt.EventQueue;
 import java.awt.Image;
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
@@ -29,6 +28,7 @@ import javax.swing.WindowConstants;
 
 import com.samskivert.swing.util.SwingUtil;
 import com.threerings.getdown.data.Application;
+import com.threerings.getdown.data.Build;
 import com.threerings.getdown.data.EnvConfig;
 import com.threerings.getdown.data.SysProps;
 import com.threerings.getdown.util.LaunchUtil;
@@ -92,7 +92,7 @@ public class GetdownApp
     }
     if (abort) System.exit(-1);
 
-    log.info("Starting .....");
+    log.info("Starting ...");
     try
     {
       jalview.bin.StartupNotificationListener.setListener();
@@ -107,6 +107,14 @@ public class GetdownApp
       t.printStackTrace();
     }
     
+    try {
+      StatusPanel.i4jVersion = com.install4j.api.launcher.Variables.getCompilerVariable("sys.install4jVersion");
+    } catch (IOException e) {
+      System.err.println("install4j version not available");
+    } catch (Throwable t) {
+      System.err.println("install4j not available");
+      t.printStackTrace();
+    }
     // record a few things for posterity
     log.info("------------------ VM Info ------------------");
     log.info("-- OS Name: " + System.getProperty("os.name"));
@@ -114,9 +122,12 @@ public class GetdownApp
     log.info("-- OS Vers: " + System.getProperty("os.version"));
     log.info("-- Java Vers: " + System.getProperty("java.version"));
     log.info("-- Java Home: " + System.getProperty("java.home"));
+    log.info("-- Install4j Vers: " + StatusPanel.i4jVersion);
+    log.info("-- Install4j Template Vers: " + System.getProperty("installer_template_version"));
     log.info("-- User Name: " + System.getProperty("user.name"));
     log.info("-- User Home: " + System.getProperty("user.home"));
     log.info("-- Cur dir: " + System.getProperty("user.dir"));
+    log.info("-- Launcher version: "+Build.version());
     log.info("-- startupFilesParameterString: " + startupFilesParameterString);
     log.info("---------------------------------------------");
 
@@ -142,13 +153,6 @@ public class GetdownApp
           // move window to top, always on top
           if (_ifc.keepOnTop) {
                  log.info("Keep on top set to ", "keep_on_top", _ifc.keepOnTop);
-                         java.awt.EventQueue.invokeLater(new Runnable() {
-                                       @Override
-                                       public void run() {
-                                               _frame.toFront();
-                                               _frame.repaint();
-                                       }
-                               });
                          _frame.setAlwaysOnTop(true);
           }
 
@@ -209,6 +213,7 @@ public class GetdownApp
           SwingUtil.centerWindow(_frame);
           _frame.setVisible(true);
         }
+        _shownContainer = true;
       }
 
       @Override
@@ -264,7 +269,7 @@ public class GetdownApp
         super.fail(message);
         // super.fail causes the UI to be created (if needed) on the next UI tick, so we
         // want to wait until that happens before we attempt to redecorate the window
-        EventQueue.invokeLater(new Runnable() {
+        EQinvoke(new Runnable() {
           @Override
           public void run() {
             // if the frame was set to be undecorated, make window decoration available