JAL-3449 don't assume install4j jar in classpath of getdown
[jalview.git] / getdown / src / getdown / launcher / src / main / java / com / threerings / getdown / launcher / StatusPanel.java
index f74546a..4b5e05f 100644 (file)
@@ -32,7 +32,6 @@ import com.threerings.getdown.data.Build;
 import com.threerings.getdown.util.MessageUtil;
 import com.threerings.getdown.util.Rectangle;
 import com.threerings.getdown.util.StringUtil;
-
 import static com.threerings.getdown.Log.log;
 
 /**
@@ -107,7 +106,7 @@ public final class StatusPanel extends JComponent
         // maybe update the progress label
         if (_progress != percent) {
             _progress = percent;
-            if (!_ifc.hideProgressText) {
+            if (_ifc != null && !_ifc.hideProgressText) {
                 String msg = MessageFormat.format(get("m.complete"), percent);
                 _newplab = createLabel(msg, new Color(_ifc.progressText, true));
             }
@@ -129,7 +128,7 @@ public final class StatusPanel extends JComponent
             }
             remaining /= values;
 
-            if (!_ifc.hideProgressText) {
+            if (_ifc != null && !_ifc.hideProgressText) {
                 // now compute our display value
                 int minutes = (int)(remaining / 60), seconds = (int)(remaining % 60);
                 String remstr = minutes + ":" + ((seconds < 10) ? "0" : "") + seconds;
@@ -266,20 +265,27 @@ public final class StatusPanel extends JComponent
      */
     protected void updateStatusLabel ()
     {
+        if (_ifc == null) {
+               return;
+        }
         String status = _status;
         if (!_displayError) {
             for (int ii = 0; ii < _statusDots; ii++) {
                 status += " .";
             }
         }
-        
        StringBuilder labelText = new StringBuilder();
        if (_ifc.displayVersion) {
-               labelText.append("version: "+Build.version());
+               labelText.append("launcher version: " + Build.version());
+               labelText.append("\n");
+               labelText.append("install4j version: " + i4jVersion);
+               labelText.append("\n");
+               labelText.append("installer version: " + System.getProperty("installer_template_version"));
                labelText.append("\n");
        }
        if (_ifc.displayAppbase) {
-               labelText.append("appbase: "+_appbase);
+               labelText.append("appbase: " + _appbase);
                labelText.append("\n");
        }
        labelText.append(status); 
@@ -412,4 +418,6 @@ public final class StatusPanel extends JComponent
     protected static final Font FONT = new Font("SansSerif", Font.BOLD, 12);
     
     public String _appbase;
+    
+    public static String i4jVersion = null;
 }