From: Ben Soares Date: Thu, 13 Jun 2024 20:20:54 +0000 (+0100) Subject: JAL-3845 Add a popup error message, with instructions, when Jalview launched from... X-Git-Tag: Release_2_11_4_0~24^2~40 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1a5f7cbd4317ce285a94f064c23ce982fccd2a85;p=jalview.git JAL-3845 Add a popup error message, with instructions, when Jalview launched from the Installer Volume --- diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 92ac5fc..148f9c0 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -706,6 +706,8 @@ public class Jalview implements JalviewObjectI */ { + String appName = ChannelProperties.getProperty("app_name"); + /** * Check to see that the JVM version being run is suitable for the Java * version this Jalview was compiled for. Popup a warning if not. @@ -714,7 +716,8 @@ public class Jalview implements JalviewObjectI { Console.warn("The Java version being used (Java " + LaunchUtils.getJavaVersion() - + ") may lead to problems. This installation of Jalview should be used with Java " + + ") may lead to problems. This installation of " + + appName + " should be used with Java " + LaunchUtils.getJavaCompileVersion() + "."); if (!LaunchUtils @@ -734,6 +737,29 @@ public class Jalview implements JalviewObjectI } } + /** + * Check to see if we've been launched from the installer volume + * (macOS). + */ + String installerappdirString = System + .getProperty("installer.appdir"); + if (Platform.isMac() && installerappdirString != null + && installerappdirString.startsWith("/Volumes/")) + { + Console.warn("You appear to be running " + appName + + " from the Installer volume. Please drag and drop the " + + appName + " icon into the Applications folder."); + + Object[] options = { MessageManager.getString("action.quit") }; + JOptionPane.showOptionDialog(null, MessageManager.formatMessage( + "warning.running_from_installer_volume_message", appName), + MessageManager.getString( + "warning.running_from_installer_volume_title"), + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, + null, options, options[0]); + quit(); + } + boolean webservicediscovery = bootstrapArgs .getBoolean(Arg.WEBSERVICEDISCOVERY); if (aparser.contains("nowebservicediscovery"))