From: Ben Soares Date: Tue, 17 Dec 2019 13:32:25 +0000 (+0000) Subject: JAL-3449 correctly catch absence of install4j in getdown - probably for developers... X-Git-Tag: Develop-2_11_2_0-d20201215~80^2~28^2~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f274a3fc218cfdf410b4e68bc40fa4e15c602ab1;p=jalview.git JAL-3449 correctly catch absence of install4j in getdown - probably for developers only --- diff --git a/getdown/lib/getdown-core.jar b/getdown/lib/getdown-core.jar index 31742c1..8f9d06f 100644 Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ diff --git a/getdown/lib/getdown-launcher-local.jar b/getdown/lib/getdown-launcher-local.jar index e0dd04c..1c021ef 100644 Binary files a/getdown/lib/getdown-launcher-local.jar and b/getdown/lib/getdown-launcher-local.jar differ diff --git a/getdown/lib/getdown-launcher.jar b/getdown/lib/getdown-launcher.jar index 6d2c2f9..024855c 100644 Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java index 944fbde..8d65d28 100644 --- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java +++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java @@ -589,6 +589,21 @@ public class Application { return _initialisedConfig; } + + try { + Application.i4jVersion = com.install4j.api.launcher.Variables.getCompilerVariable("sys.install4jVersion"); + } catch (IOException e) + { + System.err.println("install4j version not available"); + } catch (NoClassDefFoundError e) + { + log.warning("Starting without install4j classes"); + } catch (Throwable t) + { + System.err.println("install4j not available"); + t.printStackTrace(); + } + Config config = null; File cfgfile = _config; Config.ParseOpts opts = Config.createOpts(checkPlatform); @@ -1063,7 +1078,7 @@ public class Application // add the marker indicating the app is running in getdown args.add("-D" + Properties.GETDOWN + "=true"); - args.add("-Dsys.install4jVersion=" + Variables.getCompilerVariable("sys.install4jVersion")); + args.add("-Dsys.install4jVersion=" + Application.i4jVersion); args.add("-Dinstaller_template_version=" + System.getProperty("installer_template_version")); args.add("-Dlauncher_version=" + Build.version()); @@ -2008,4 +2023,6 @@ public class Application private boolean _initialised = false; private Config _initialisedConfig = null; + + public static String i4jVersion = null; } diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java index c76c727..fee1d3e 100644 --- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java +++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java @@ -107,14 +107,6 @@ 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")); @@ -122,7 +114,7 @@ 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 Vers: " + Application.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")); diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/StatusPanel.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/StatusPanel.java index 4b5e05f..a144c83 100644 --- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/StatusPanel.java +++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/StatusPanel.java @@ -27,6 +27,7 @@ import com.samskivert.swing.LabelStyleConstants; import com.samskivert.swing.util.SwingUtil; import com.samskivert.util.Throttle; +import com.threerings.getdown.data.Application; import com.threerings.getdown.data.Application.UpdateInterface; import com.threerings.getdown.data.Build; import com.threerings.getdown.util.MessageUtil; @@ -279,7 +280,7 @@ public final class StatusPanel extends JComponent if (_ifc.displayVersion) { labelText.append("launcher version: " + Build.version()); labelText.append("\n"); - labelText.append("install4j version: " + i4jVersion); + labelText.append("install4j version: " + Application.i4jVersion); labelText.append("\n"); labelText.append("installer version: " + System.getProperty("installer_template_version")); labelText.append("\n"); @@ -418,6 +419,4 @@ 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; } diff --git a/getdown/src/getdown/launcher/src/main/java/jalview/bin/StartupNotificationListener.java b/getdown/src/getdown/launcher/src/main/java/jalview/bin/StartupNotificationListener.java index 5c6c7c3..b3cfa9a 100644 --- a/getdown/src/getdown/launcher/src/main/java/jalview/bin/StartupNotificationListener.java +++ b/getdown/src/getdown/launcher/src/main/java/jalview/bin/StartupNotificationListener.java @@ -1,6 +1,7 @@ package jalview.bin; import com.threerings.getdown.launcher.GetdownApp; +import com.threerings.getdown.launcher.StatusPanel; import static com.threerings.getdown.Log.log; public class StartupNotificationListener { diff --git a/j11lib/getdown-core.jar b/j11lib/getdown-core.jar index 31742c1..8f9d06f 100644 Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ diff --git a/j8lib/getdown-core.jar b/j8lib/getdown-core.jar index 31742c1..8f9d06f 100644 Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ