From 10e8b9e824de1252e5e5ede67f96fb9f2b6a79c4 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 26 Jul 2024 15:38:28 +0100 Subject: [PATCH] JAL-3631 Some minor bugfixes to the install4j installer and word changes to match macos-install-jalview.sh --- utils/install4j/install4j10_template.install4j | 73 ++++++++++++++++++------ 1 file changed, 54 insertions(+), 19 deletions(-) diff --git a/utils/install4j/install4j10_template.install4j b/utils/install4j/install4j10_template.install4j index 6916041..d2e2c0a 100644 --- a/utils/install4j/install4j10_template.install4j +++ b/utils/install4j/install4j10_template.install4j @@ -164,7 +164,9 @@ # For example, to adjust the maximum memory usage to 512 MB, uncomment the following line: # -Xmx512m # To include another file, uncomment the following line: -# -include-options [path to other .vmoption file] +# -include-options [path to other .vmoption file] + +# Jalview specific options below ${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")} @@ -353,7 +355,7 @@ public static void showInvalidUserAppdirPathWarning(Context context, FormEnviron boolean userUpdates = ((JCheckBox) fc_userUpdates.getConfigurationObject()).isSelected(); // get boolean status of "Customise the user-space path" checkbox - boolean allowUserAppdirPath = ((JCheckBox) fc_allowUserAppdirPath).isSelected(); + boolean allowUserAppdirPath = ((JCheckBox) fc_allowUserAppdirPath.getConfigurationObject()).isSelected(); // show/hide warning boolean showInvalidPathWarning = advancedOptions && userUpdates && allowUserAppdirPath && !isUserAppdirPathValid(context, fc_userAppdirPath); @@ -1516,7 +1518,7 @@ return context.getBooleanVariable("allowUserDefaultAppdirUpdates") && co - + ${compiler:APPLICATION_CATEGORIES} @@ -1538,7 +1540,7 @@ return context.getBooleanVariable("allowUserDefaultAppdirUpdates") && co - !Util.hasFullAdminRights() && !context.getBooleanVariable("sys.programGroupDisabled") + !context.getBooleanVariable("sys.programGroupDisabled") @@ -1561,7 +1563,7 @@ return context.getBooleanVariable("allowUserDefaultAppdirUpdates") && co - !Util.hasFullAdminRights() && context.getBooleanVariable("createDesktopLinkAction") + context.getBooleanVariable("createDesktopLinkAction") @@ -1571,9 +1573,7 @@ return context.getBooleanVariable("allowUserDefaultAppdirUpdates") && co - !Util.hasFullAdminRights() -&& -context.getBooleanVariable("addToDockAction") + context.getBooleanVariable("addToDockAction") @@ -1581,7 +1581,7 @@ context.getBooleanVariable("addToDockAction") ${installer:sys.contentDir}\${compiler:WRAPPER_SCRIPT_BIN_DIR} Path - !Util.hasFullAdminRights() && context.getBooleanVariable("appendToPathAction") + context.getBooleanVariable("appendToPathAction") @@ -1596,8 +1596,7 @@ context.getBooleanVariable("addToDockAction") - Util.isMacOS() && !Util.hasFullAdminRights() // Admin on macOS will add path to /etc/paths.d -&& + Util.isMacOS() && ( context.getBooleanVariable("makeSymbolicLinkAction") && context.getVariable("unixBinDir") != null @@ -1615,7 +1614,7 @@ context.getBooleanVariable("addToDockAction") - + ${compiler:APPLICATION_CATEGORIES} ${compiler:JALVIEW_APPLICATION_NAME} @@ -1662,7 +1661,7 @@ context.getBooleanVariable("addToDockAction") context.getBooleanVariable("createDesktopLinkAction") - + @@ -1701,7 +1700,7 @@ return (Object) hash; - + @@ -1765,12 +1764,48 @@ return advanced ? !( allowUser || allowInstaller ) : false; disableUpdates + + + + + String file = (String)context.getVariable("sys.mediaFile"); +int i = file.lastIndexOf(File.separator); +return file.substring(i+1); + + + installerFilename + + + + + + + String date = (String)context.getVariable("sys.date"); +String time = (String)context.getVariable("sys.time"); +StringBuilder sb = new StringBuilder(); +sb.append(date.substring(0,4)); +sb.append("-"); +sb.append(date.substring(4,6)); +sb.append("-"); +sb.append(date.substring(6,8)); +sb.append(" "); +sb.append(time.substring(0,2)); +sb.append(":"); +sb.append(time.substring(2,4)); +sb.append(":"); +sb.append(time.substring(4,6)); +return sb.toString(); + + + + installDateTime + + 2823 - - # - # Jalview specific options below + + # Jalview options added by ${installer:installerFilename} at ${installer:installDateTime} @@ -1862,7 +1897,7 @@ return advanced ? !( allowUser || allowInstaller ) : false; - Util.isLinux() || Util.isMacOS() + Util.isLinux() || ( Util.isMacOS() && !Util.isUnixInstaller() ) @@ -1878,7 +1913,7 @@ return advanced ? !( allowUser || allowInstaller ) : false; - (Util.isLinux() || Util.isMacOS()) + ( Util.isLinux() || ( Util.isMacOS() && !Util.isUnixInstaller() ) ) && !((String)context.getCompilerVariable("JALVIEW_APPLICATION_NAME")).equals((String)context.getCompilerVariable("JALVIEW_NAME")) -- 1.7.10.2