<property name="obtainIfNormalWin" type="boolean" value="true" />
</serializedBean>
</action>
- <action name="USERSPACE: Set unixUserBinDir (Linux or Unix)" id="2738" beanClass="com.install4j.runtime.beans.actions.control.SetVariableAction" rollbackBarrierExitCode="0">
+ <action name="USERSPACE: Set unixBinDir (Linux or Unix)" id="2738" beanClass="com.install4j.runtime.beans.actions.control.SetVariableAction" rollbackBarrierExitCode="0">
<serializedBean>
<property name="script">
<object class="com.install4j.api.beans.ScriptProperty">
tryPaths.add(userHome + File.separator + ".local" + File.separator + "bin");
tryPaths.add(userHome + File.separator + "opt" + File.separator + "bin");
-if (Util.isMacOS()) { // && root permission?
- tryPaths.add(File.separator + "usr" + File.separator + "local" + File.separator + "bin");
+for (int i = 0; i < tryPaths.size(); i++) {
+ String tryPath = tryPaths.get(i);
+ File unixBinDir = new File(tryPath);
+ if (unixBinDir.exists()) {
+ return tryPath;
+ }
}
+return null;
+</property>
+ </object>
+ </property>
+ <property name="variableName" type="string">unixBinDir</property>
+ </serializedBean>
+ <condition>!Util.hasFullAdminRights()
+&&
+(
+ Util.isLinux()
+ || Util.isUnixInstaller()
+ || Util.isMacOS()
+)</condition>
+ </action>
+ <action name="SYSTEMSPACE: Set unixBinDir (Linux or Unix)" id="2845" beanClass="com.install4j.runtime.beans.actions.control.SetVariableAction" rollbackBarrierExitCode="0">
+ <serializedBean>
+ <property name="script">
+ <object class="com.install4j.api.beans.ScriptProperty">
+ <property name="value" type="string">ArrayList<String> tryPaths = new ArrayList<> ();
+tryPaths.add(File.separator + "opt" + File.separator + "bin");
+tryPaths.add(File.separator + "usr" + File.separator + "local" + File.separator + "bin");
+
for (int i = 0; i < tryPaths.size(); i++) {
String tryPath = tryPaths.get(i);
- File unixUserBinDir = new File(tryPath);
- if (unixUserBinDir.exists()) {
+ File unixBinDir = new File(tryPath);
+ if (unixBinDir.exists()) {
return tryPath;
}
}
</property>
</object>
</property>
- <property name="variableName" type="string">unixUserBinDir</property>
+ <property name="variableName" type="string">unixBinDir</property>
</serializedBean>
- <condition>!Util.hasFullAdminRights()
+ <condition>Util.hasFullAdminRights()
&&
(
Util.isLinux()
</screen>
<screen id="20" beanClass="com.install4j.runtime.beans.screens.FinishedScreen" rollbackBarrierExitCode="0" finishScreen="true">
<actions>
- <action name="macOS/Linux Jalview Appname->java symlink" id="2813" beanClass="com.install4j.runtime.beans.actions.files.CreateSymlinkAction" rollbackBarrierExitCode="0" errorMessage="Could not make symlink to wrapper script">
+ <action name="macOS/Linux Jalview->java symlink" id="2814" beanClass="com.install4j.runtime.beans.actions.files.CreateSymlinkAction" rollbackBarrierExitCode="0" errorMessage="Could not make symlink to wrapper script">
<serializedBean>
<property name="file">
<object class="java.io.File">
</property>
<property name="linkFile">
<object class="java.io.File">
- <string>${compiler:JRE_DIR}/bin/${compiler:JALVIEW_APPLICATION_NAME}</string>
+ <string>${compiler:JRE_DIR}/bin/${compiler:JALVIEW_NAME}</string>
</object>
</property>
<property name="removeOnUninstall" type="boolean" value="false" />
</serializedBean>
- <condition>Util.isLinux()</condition>
+ <condition>Util.isLinux() || Util.isMacOS()</condition>
</action>
- <action name="macOS/Linux Jalview->java symlink" id="2814" beanClass="com.install4j.runtime.beans.actions.files.CreateSymlinkAction" rollbackBarrierExitCode="0" errorMessage="Could not make symlink to wrapper script">
+ <action name="macOS/Linux Jalview Appname->java symlink" id="2813" beanClass="com.install4j.runtime.beans.actions.files.CreateSymlinkAction" rollbackBarrierExitCode="0" errorMessage="Could not make symlink to wrapper script">
<serializedBean>
<property name="file">
<object class="java.io.File">
</property>
<property name="linkFile">
<object class="java.io.File">
- <string>${compiler:JRE_DIR}/bin/${compiler:JALVIEW_NAME}</string>
+ <string>${compiler:JRE_DIR}/bin/${compiler:JALVIEW_APPLICATION_NAME}</string>
</object>
</property>
<property name="removeOnUninstall" type="boolean" value="false" />
</serializedBean>
- <condition>Util.isLinux()</condition>
+ <condition>(Util.isLinux() || Util.isMacOS())
+&& !((String)context.getCompilerVariable("JALVIEW_APPLICATION_NAME")).equals((String)context.getCompilerVariable("JALVIEW_NAME"))</condition>
</action>
<action name="USERSPACE: Create start menu item" id="2012" beanClass="com.install4j.runtime.beans.actions.desktop.CreateStartMenuEntryAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
<serializedBean>
&&
context.getBooleanVariable("appendToPathAction")</condition>
</action>
- <action name="Linux/Unix symlink" id="2733" beanClass="com.install4j.runtime.beans.actions.files.CreateSymlinkAction" rollbackBarrierExitCode="0" errorMessage="Could not make symlink to wrapper script">
+ <action name="USERSPACE: Create macOS symbolic link to jalview in user's local bin" id="2743" beanClass="com.install4j.runtime.beans.actions.files.CreateSymlinkAction" rollbackBarrierExitCode="0" errorMessage="Could not make a ${compiler:WRAPPER_LINK} symbolic link in ~/${installer:unixBinDir}">
<serializedBean>
<property name="file">
<object class="java.io.File">
- <string>${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:BASH_WRAPPER_SCRIPT}</string>
- </object>
- </property>
- <property name="linkFile">
- <object class="java.io.File">
- <string>${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:WRAPPER_LINK}</string>
- </object>
- </property>
- </serializedBean>
- <condition>(
- Util.isLinux()
- || Util.isUnixInstaller()
- || Util.isMacOS()
-)</condition>
- </action>
- <action name="USERSPACE: Create Linux/Unix user symbolic link to jalview.sh in user's local bin" id="2739" beanClass="com.install4j.runtime.beans.actions.files.CreateSymlinkAction" rollbackBarrierExitCode="0" errorMessage="Could not make a ${compiler:WRAPPER_LINK} symbolic link in ~/${installer:unixUserBinDir}">
- <serializedBean>
- <property name="file">
- <object class="java.io.File">
- <string>${installer:sys.contentDir}/${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:BASH_WRAPPER_SCRIPT}</string>
+ <string>${installer:macWrapperLinkLocation}</string>
</object>
</property>
<property name="linkFile">
<object class="java.io.File">
- <string>${installer:unixUserBinDir}/${compiler:WRAPPER_LINK}</string>
+ <string>${installer:unixBinDir}/${compiler:WRAPPER_LINK}</string>
</object>
</property>
</serializedBean>
<condition>!Util.hasFullAdminRights()
&&
(
- context.getBooleanVariable("makeUserSymbolicLinkAction")
- && (
- Util.isLinux()
- || Util.isUnixInstaller()
- )
- && context.getVariable("unixUserBinDir") != null
+ Util.isMacOS()
+ && context.getBooleanVariable("makeUserSymbolicLinkAction")
+ && context.getVariable("unixBinDir") != null
+ && context.getVariable("macWrapperLinkLocation") != null
)</condition>
</action>
- <action name="USERSPACE: Create macOS symbolic link to jalview in user's local bin" id="2743" beanClass="com.install4j.runtime.beans.actions.files.CreateSymlinkAction" rollbackBarrierExitCode="0" errorMessage="Could not make a ${compiler:WRAPPER_LINK} symbolic link in ~/${installer:unixUserBinDir}">
+ <action name="Linux/Unix symlink" id="2733" beanClass="com.install4j.runtime.beans.actions.files.CreateSymlinkAction" rollbackBarrierExitCode="0" errorMessage="Could not make symlink to wrapper script">
<serializedBean>
<property name="file">
<object class="java.io.File">
- <string>${installer:macWrapperLinkLocation}</string>
+ <string>${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:BASH_WRAPPER_SCRIPT}</string>
</object>
</property>
<property name="linkFile">
<object class="java.io.File">
- <string>${installer:unixUserBinDir}/${compiler:WRAPPER_LINK}</string>
+ <string>${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:WRAPPER_LINK}</string>
</object>
</property>
</serializedBean>
- <condition>!Util.hasFullAdminRights()
-&&
-(
- Util.isMacOS()
- && context.getBooleanVariable("makeUserSymbolicLinkAction")
- && context.getVariable("unixUserBinDir") != null
- && context.getVariable("macWrapperLinkLocation") != null
+ <condition>(
+ Util.isLinux()
+ || Util.isUnixInstaller()
+ || Util.isMacOS()
)</condition>
</action>
<action name="Windows copy BAT file" id="2817" beanClass="com.install4j.runtime.beans.actions.files.CopyFileAction" rollbackBarrierExitCode="0">
</serializedBean>
<condition>Util.isWindows() && !(((String)context.getCompilerVariable("WRAPPER_LINK")+".ps1").equals((String)context.getCompilerVariable("POWERSHELL_WRAPPER_SCRIPT")))</condition>
</action>
+ <action name="SYSTEMSPACE: Create start menu item" id="2846" beanClass="com.install4j.runtime.beans.actions.desktop.CreateStartMenuEntryAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
+ <serializedBean>
+ <property name="categories" type="string">${compiler:APPLICATION_CATEGORIES}</property>
+ <property name="entryName" type="string">${compiler:JALVIEW_APPLICATION_NAME}</property>
+ <property name="file">
+ <object class="java.io.File">
+ <string>${installer:sys.contentDir}/${compiler:EXECUTABLE_NAME}</string>
+ </object>
+ </property>
+ <property name="icon">
+ <object class="com.install4j.api.beans.ExternalFile">
+ <string>${compiler:JALVIEW_DIR}/${compiler:ICONS_DIR}/${compiler:WINDOWS_ICONS_FILE}</string>
+ </object>
+ </property>
+ <property name="programGroupName" type="string">${compiler:JALVIEW_NAME}</property>
+ <property name="runAsAdministrator" type="boolean" value="true" />
+ <property name="unixIconFile">
+ <object class="com.install4j.api.beans.ExternalFile">
+ <string>${compiler:JALVIEW_DIR}/${compiler:ICONS_DIR}/${compiler:PNG_ICON_FILE}</string>
+ </object>
+ </property>
+ </serializedBean>
+ <condition>Util.hasFullAdminRights()
+&&
+!context.getBooleanVariable("sys.programGroupDisabled")</condition>
+ </action>
+ <action name="SYSTEMSPACE: Add a desktop link" id="2847" beanClass="com.install4j.runtime.beans.actions.desktop.CreateDesktopLinkAction" actionElevationType="elevated" rollbackBarrierExitCode="0" errorMessage="Could not make desktop link">
+ <serializedBean>
+ <property name="description" type="string">${compiler:JALVIEW_APPLICATION_NAME}</property>
+ <property name="file">
+ <object class="java.io.File">
+ <string>${installer:sys.contentDir}/${compiler:EXECUTABLE_NAME}</string>
+ </object>
+ </property>
+ <property name="name" type="string">${compiler:JALVIEW_APPLICATION_NAME}</property>
+ <property name="runAsAdministrator" type="boolean" value="true" />
+ <property name="unixIconFile">
+ <object class="com.install4j.api.beans.ExternalFile">
+ <string>${compiler:JALVIEW_DIR}/${compiler:ICONS_DIR}/${compiler:PNG_ICON_FILE}</string>
+ </object>
+ </property>
+ <property name="winIconFile">
+ <object class="com.install4j.api.beans.ExternalFile">
+ <string>${compiler:JALVIEW_DIR}/${compiler:ICONS_DIR}/${compiler:WINDOWS_ICONS_FILE}</string>
+ </object>
+ </property>
+ </serializedBean>
+ <condition>Util.hasFullAdminRights()
+&&
+context.getBooleanVariable("createDesktopLinkAction")</condition>
+ </action>
+ <action name="SYSTEMSPACE: Add Jalview bin to the user's path (Windows)" id="2849" beanClass="com.install4j.runtime.beans.actions.misc.ModifyEnvironmentVariableAction" actionElevationType="elevated" rollbackBarrierExitCode="0" errorMessage="Could not add "${installer:sys.contentDir}\${compiler:WRAPPER_SCRIPT_BIN_DIR}" to the Path environment variable">
+ <serializedBean>
+ <property name="type" type="enum" class="com.install4j.runtime.beans.actions.misc.ModifyStringType" value="APPEND" />
+ <property name="userSpecific" type="boolean" value="false" />
+ <property name="value" type="string">${installer:sys.contentDir}\${compiler:WRAPPER_SCRIPT_BIN_DIR}</property>
+ <property name="variableName" type="string">Path</property>
+ </serializedBean>
+ <condition>Util.hasFullAdminRights()
+&&
+context.getBooleanVariable("appendToPathAction")</condition>
+ </action>
+ <action name="SYSTEMSPACE: macOS /etc/paths.d entry" id="2852" beanClass="com.install4j.runtime.beans.actions.text.WriteTextFileAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
+ <serializedBean>
+ <property name="file">
+ <object class="java.io.File">
+ <string>/etc/paths.d/${compiler:APPLICATION_FOLDER}</string>
+ </object>
+ </property>
+ <property name="text" type="string">/Applications/${compiler:JALVIEW_APPLICATION_NAME}.app/Contents/MacOS</property>
+ </serializedBean>
+ <condition>Util.hasFullAdminRights()
+&& Util.isMacOS()</condition>
+ </action>
+ <action name="BOTHSPACE: Create Linux/Unix user symbolic link to jalview.sh in system bin" id="2850" beanClass="com.install4j.runtime.beans.actions.files.CreateSymlinkAction" rollbackBarrierExitCode="0" errorMessage="Could not make a ${compiler:WRAPPER_LINK} symbolic link in ~/${installer:unixBinDir}">
+ <serializedBean>
+ <property name="file">
+ <object class="java.io.File">
+ <string>${installer:sys.contentDir}/${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:BASH_WRAPPER_SCRIPT}</string>
+ </object>
+ </property>
+ <property name="linkFile">
+ <object class="java.io.File">
+ <string>${installer:unixBinDir}/${compiler:WRAPPER_LINK}</string>
+ </object>
+ </property>
+ </serializedBean>
+ <condition>(
+ context.getBooleanVariable("makeUserSymbolicLinkAction")
+ && (
+ Util.isLinux()
+ || Util.isUnixInstaller()
+ )
+ && context.getVariable("unixBinDir") != null
+)</condition>
+ </action>
</actions>
<formComponents>
<formComponent id="21" beanClass="com.install4j.runtime.beans.formcomponents.MultilineLabelComponent" insetBottom="10">
<property name="labelText" type="string">${form:finishedMessage}</property>
</serializedBean>
</formComponent>
- <formComponent name="Add a desktop link" id="574" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
+ <formComponent name="Add a desktop link" id="574" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent" resetInitOnPrevious="true">
<serializedBean>
<property name="checkboxText" type="string">${i18n:CreateDesktopIcon}</property>
<property name="variableName" type="string">createDesktopLinkAction</property>
</serializedBean>
- <visibilityScript>!Util.isMacOS()</visibilityScript>
+ <visibilityScript>!Util.isMacOS()
+&& !Util.hasFullAdminRights()
+</visibilityScript>
</formComponent>
<formComponent name="Add an executable to the dock" id="577" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
<serializedBean>
<property name="initiallySelected" type="boolean" value="true" />
<property name="variableName" type="string">addToDockAction</property>
</serializedBean>
- <visibilityScript>Util.isMacOS()</visibilityScript>
+ <visibilityScript>Util.isMacOS()
+&& !Util.hasFullAdminRights()
+</visibilityScript>
</formComponent>
<formComponent name="Add jalview bin to the user's Path environment variable (Windows)" id="2734" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
<serializedBean>
</serializedBean>
<visibilityScript>Util.isWindows()</visibilityScript>
</formComponent>
- <formComponent name="USERSPACE: Make a symbolic link to jalview.sh bash script in the user's local bin (Linux or Unix)" id="2736" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
+ <formComponent name="BOTHSPACE: Make a symbolic link to jalview.sh bash script in the user's/system local bin (Linux or Unix)" id="2736" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
<serializedBean>
- <property name="checkboxText" type="string">Make a ${compiler:WRAPPER_LINK} symbolic link in ${installer:unixUserBinDir}</property>
+ <property name="checkboxText" type="string">Make a ${compiler:WRAPPER_LINK} symbolic link in ${installer:unixBinDir}</property>
<property name="initiallySelected" type="boolean" value="true" />
<property name="variableName" type="string">makeUserSymbolicLinkAction</property>
</serializedBean>
- <visibilityScript>!Util.hasFullAdminRights()
-&&
-(
+ <visibilityScript>(
Util.isLinux()
|| Util.isUnixInstaller()
|| (
&& context.getVariable("macWrapperLinkLocation") != null
)
)
- && context.getVariable("unixUserBinDir") != null</visibilityScript>
+ && context.getVariable("unixBinDir") != null</visibilityScript>
</formComponent>
</formComponents>
</screen>
</formComponent>
<formComponent name="Make a symbolic link to jalview.sh bash script in the user's local bin (Linux or Unix)" id="2777" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
<serializedBean>
- <property name="checkboxText" type="string">Make a ${compiler:WRAPPER_LINK} symbolic link in ${installer:unixUserBinDir}</property>
+ <property name="checkboxText" type="string">Make a ${compiler:WRAPPER_LINK} symbolic link in ${installer:unixBinDir}</property>
<property name="initiallySelected" type="boolean" value="true" />
<property name="variableName" type="string">makeUserSymbolicLinkAction</property>
</serializedBean>
&& context.getVariable("macWrapperLinkLocation") != null
)
)
- && context.getVariable("unixUserBinDir") != null</visibilityScript>
+ && context.getVariable("unixBinDir") != null</visibilityScript>
</formComponent>
<formComponent id="2780" beanClass="com.install4j.runtime.beans.formcomponents.MultilineLabelComponent">
<serializedBean>