JAL-3631 Group/box and simplify visibility of advanced options on additional tasks...
authorBen Soares <b.soares@dundee.ac.uk>
Sat, 20 Jul 2024 16:55:37 +0000 (17:55 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Sat, 20 Jul 2024 16:55:37 +0000 (17:55 +0100)
utils/install4j/install4j10_template.install4j

index eb0dcba..119c1d8 100644 (file)
     <applications>
       <application id="installer" beanClass="com.install4j.runtime.beans.applications.InstallerApplication" actionElevationType="elevated" styleId="35" customIcnsFile="${compiler:JALVIEW_DIR}/${compiler:INSTALLER_MAC_ICON}" customIcoFile="${compiler:JALVIEW_DIR}/${compiler:INSTALLER_WINDOWS_ICON}">
         <serializedBean>
-          <property name="frameHeight" type="int" value="768" />
+          <property name="frameHeight" type="int" value="812" />
           <property name="frameWidth" type="int" value="1024" />
           <property name="useCustomIcon" type="boolean" value="true" />
         </serializedBean>
@@ -845,6 +845,7 @@ formEnvironment.getFormComponentById("US_NO_UPDATES_WARNING").setVisible(showWar
                 <serializedBean>
                   <property name="checkboxText" type="string">Enable advanced options for system installation</property>
                   <property name="coupledComponentIds">
+                    <add type="string">3030</add>
                     <add type="string">2985</add>
                     <add type="string">3013</add>
                     <add type="string">2986</add>
@@ -858,7 +859,8 @@ FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_US
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
 FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
-LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
+LayoutGroup lg_advancedGroup = formEnvironment.getLayoutGroupById("SS_ADVANCED_OPTIONS_GROUP");
+LayoutGroup lg_setUserAppdirPath = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
 
 
 
@@ -866,26 +868,21 @@ LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
 JCheckBox jcb_advancedOptions = (JCheckBox) fc_advancedOptions.getConfigurationObject();
 boolean advancedOptions = jcb_advancedOptions.isSelected();
 
-// set visibility of all "ADVANCEDITEM" components (does not include groups) and layout groups
-for (FormComponent fc: formEnvironment.getFormComponents()) {
-  String id = formEnvironment.getId(fc);
-  if (id.contains("ADVANCEDITEM")) {
-    fc.setVisible(advancedOptions);
-  }
-}
-lg.setVisible(advancedOptions);
+// set visibility of Advanced options layout group
+lg_advancedGroup.setVisible(advancedOptions);
 
 if (!advancedOptions) {
   return;
 }
 
 
+
 // get boolean status of "Allow user-space updates" checkbox
 JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
 boolean userUpdates = jcb_user.isSelected();
 
 // set enabled of customised user appdir path group
-lg.setEnabled(advancedOptions &amp;&amp; userUpdates);
+lg_setUserAppdirPath.setEnabled(advancedOptions &amp;&amp; userUpdates);
 
 // set enabled of allow installation updates checkbox
 fc_installerUpdates.setEnabled(advancedOptions &amp;&amp; !userUpdates);
@@ -906,36 +903,76 @@ JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject
 boolean installerUpdates = jcb_installer.isSelected();
 
 // should we show the No updates warning?
-boolean showWarning = advancedOptions &amp;&amp; !(userUpdates || installerUpdates);
-FormComponent fc_warning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
-fc_warning.setVisible(showWarning);
+boolean showNoUpdatesWarning = advancedOptions &amp;&amp; !(userUpdates || installerUpdates);
+FormComponent fc_noUpdatesWarning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
+fc_noUpdatesWarning.setVisible(advancedOptions &amp;&amp; showNoUpdatesWarning);
 
 
 
 // get String value of userAppdirPath text field
 JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
 String userAppdirPath = jtf_userAppdirPath.getText();
-// not using this yet</property>
+
+// should we show the invalid user-space path warning?
+boolean u = userAppdirPath.contains("%u");
+boolean h = userAppdirPath.contains("%h");
+boolean t = userAppdirPath.startsWith("~" + (String)context.getVariable("sys.fileSeparator"));
+
+boolean showInvalidPathWarning = !( userAppdirPath.length() == 0 || u || h || t );
+FormComponent fc_invalidPathWarning = formEnvironment.getFormComponentById("SS_INVALID_USER_APPDIR_PATH_WARNING");
+fc_invalidPathWarning.setVisible(advancedOptions &amp;&amp; userUpdates &amp;&amp; allowUserAppdirPath &amp;&amp; fc_userAppdirPath.isEnabled() &amp;&amp; showInvalidPathWarning);
+
+
+
+// set whether "Set defaults" button should be enabled
+FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFAULTS_ADVANCEDITEM");
+JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
+boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
+jb_setDefaults.setEnabled(enableSetDefaults);</property>
                     </object>
                   </property>
                   <property name="variableName" type="string">advancedOptions</property>
                 </serializedBean>
               </formComponent>
-              <formComponent name="Strongly recommended text" id="2985" customizedId="SS_LABEL_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.MultilineHtmlLabelComponent" insetLeft="16">
+              <group name="Advanced options group" id="3030" customizedId="SS_ADVANCED_OPTIONS_GROUP" beanClass="com.install4j.runtime.beans.groups.VerticalFormComponentGroup">
                 <serializedBean>
-                  <property name="labelHtml" type="string">&lt;html&gt;The following options are &lt;strong&gt;strongly recommended&lt;/strong&gt; to be left as default unless there is a particular reason to change them.&lt;/html&gt;</property>
-                </serializedBean>
-                <visibilityScript>context.getBooleanVariable("advancedOptions")
-</visibilityScript>
-              </formComponent>
-              <formComponent id="3013" customizedId="SS_VSPACE_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.SpacerComponent" insetLeft="16" />
-              <formComponent name="BOTHSPACE: Allow automatic updates in user's home directory" id="2986" customizedId="SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent" insetLeft="16">
-                <serializedBean>
-                  <property name="checkboxText" type="string">Allow user-space updates for ${compiler:JALVIEW_APPLICATION_NAME} components</property>
-                  <property name="coupledComponentIds">
-                    <add type="string">3021</add>
+                  <property name="borderSides">
+                    <object class="com.install4j.runtime.beans.formcomponents.BorderSides">
+                      <property name="bottom" type="boolean" value="true" />
+                      <property name="left" type="boolean" value="true" />
+                      <property name="right" type="boolean" value="true" />
+                      <property name="top" type="boolean" value="true" />
+                    </object>
                   </property>
-                  <property name="helpText" type="string">&lt;html&gt;This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME}
+                  <property name="insets">
+                    <object class="java.awt.Insets">
+                      <int>4</int>
+                      <int>4</int>
+                      <int>4</int>
+                      <int>4</int>
+                    </object>
+                  </property>
+                  <property name="visibilityScript">
+                    <object class="com.install4j.api.beans.ScriptProperty">
+                      <property name="value" type="string">context.getBooleanVariable("advancedOptions")
+</property>
+                    </object>
+                  </property>
+                </serializedBean>
+                <beans>
+                  <formComponent name="Strongly recommended text" id="2985" customizedId="SS_LABEL_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.MultilineHtmlLabelComponent" insetLeft="16">
+                    <serializedBean>
+                      <property name="labelHtml" type="string">&lt;html&gt;The following options are &lt;strong&gt;strongly recommended&lt;/strong&gt; to be left as default unless there is a particular reason to change them.&lt;/html&gt;</property>
+                    </serializedBean>
+                  </formComponent>
+                  <formComponent id="3013" customizedId="SS_VSPACE_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.SpacerComponent" insetLeft="16" />
+                  <formComponent name="BOTHSPACE: Allow automatic updates in user's home directory" id="2986" customizedId="SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent" insetLeft="16">
+                    <serializedBean>
+                      <property name="checkboxText" type="string">Allow user-space updates for ${compiler:JALVIEW_APPLICATION_NAME} components</property>
+                      <property name="coupledComponentIds">
+                        <add type="string">3021</add>
+                      </property>
+                      <property name="helpText" type="string">&lt;html&gt;This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME}
 &lt;br&gt;
 components to be automatically downloaded
 &lt;br&gt;
@@ -950,15 +987,16 @@ On ${installer:osName}, user updates will be installed under
 &lt;pre&gt;${installer:userDefaultAppdirBase}&lt;/pre&gt;
 unless customised below.
 &lt;/html&gt;</property>
-                  <property name="initiallySelected" type="boolean" value="true" />
-                  <property name="selectionScript">
-                    <object class="com.install4j.api.beans.ScriptProperty">
-                      <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+                      <property name="initiallySelected" type="boolean" value="true" />
+                      <property name="selectionScript">
+                        <object class="com.install4j.api.beans.ScriptProperty">
+                          <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
 FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
-LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
+LayoutGroup lg_advancedGroup = formEnvironment.getLayoutGroupById("SS_ADVANCED_OPTIONS_GROUP");
+LayoutGroup lg_setUserAppdirPath = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
 
 
 
@@ -966,26 +1004,21 @@ LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
 JCheckBox jcb_advancedOptions = (JCheckBox) fc_advancedOptions.getConfigurationObject();
 boolean advancedOptions = jcb_advancedOptions.isSelected();
 
-// set visibility of all "ADVANCEDITEM" components (does not include groups) and layout groups
-for (FormComponent fc: formEnvironment.getFormComponents()) {
-  String id = formEnvironment.getId(fc);
-  if (id.contains("ADVANCEDITEM")) {
-    fc.setVisible(advancedOptions);
-  }
-}
-lg.setVisible(advancedOptions);
+// set visibility of Advanced options layout group
+lg_advancedGroup.setVisible(advancedOptions);
 
 if (!advancedOptions) {
   return;
 }
 
 
+
 // get boolean status of "Allow user-space updates" checkbox
 JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
 boolean userUpdates = jcb_user.isSelected();
 
 // set enabled of customised user appdir path group
-lg.setEnabled(advancedOptions &amp;&amp; userUpdates);
+lg_setUserAppdirPath.setEnabled(advancedOptions &amp;&amp; userUpdates);
 
 // set enabled of allow installation updates checkbox
 fc_installerUpdates.setEnabled(advancedOptions &amp;&amp; !userUpdates);
@@ -1006,52 +1039,66 @@ JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject
 boolean installerUpdates = jcb_installer.isSelected();
 
 // should we show the No updates warning?
-boolean showWarning = advancedOptions &amp;&amp; !(userUpdates || installerUpdates);
-FormComponent fc_warning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
-fc_warning.setVisible(showWarning);
+boolean showNoUpdatesWarning = advancedOptions &amp;&amp; !(userUpdates || installerUpdates);
+FormComponent fc_noUpdatesWarning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
+fc_noUpdatesWarning.setVisible(advancedOptions &amp;&amp; showNoUpdatesWarning);
 
 
 
 // get String value of userAppdirPath text field
 JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
 String userAppdirPath = jtf_userAppdirPath.getText();
-// not using this yet</property>
-                    </object>
-                  </property>
-                  <property name="variableName" type="string">allowUserDefaultAppdirUpdates</property>
-                </serializedBean>
-                <visibilityScript>context.getBooleanVariable("advancedOptions")
-</visibilityScript>
-              </formComponent>
-              <group name="SYSTEMSPACE: Customise user appDir path" id="3021" customizedId="SS_SET_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.groups.HorizontalFormComponentGroup">
-                <serializedBean>
-                  <property name="insets">
-                    <object class="java.awt.Insets">
-                      <int>0</int>
-                      <int>32</int>
-                      <int>0</int>
-                      <int>0</int>
-                    </object>
-                  </property>
-                  <property name="visibilityScript">
-                    <object class="com.install4j.api.beans.ScriptProperty">
-                      <property name="value" type="string">context.getBooleanVariable("advancedOptions")
-</property>
-                    </object>
-                  </property>
-                </serializedBean>
-                <beans>
-                  <formComponent name="SYSTEMSPACE: Allow setting userAppdirPath" id="3022" customizedId="SS_ALLOW_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
+
+// should we show the invalid user-space path warning?
+boolean u = userAppdirPath.contains("%u");
+boolean h = userAppdirPath.contains("%h");
+boolean t = userAppdirPath.startsWith("~" + (String)context.getVariable("sys.fileSeparator"));
+
+boolean showInvalidPathWarning = !( userAppdirPath.length() == 0 || u || h || t );
+FormComponent fc_invalidPathWarning = formEnvironment.getFormComponentById("SS_INVALID_USER_APPDIR_PATH_WARNING");
+fc_invalidPathWarning.setVisible(advancedOptions &amp;&amp; userUpdates &amp;&amp; allowUserAppdirPath &amp;&amp; fc_userAppdirPath.isEnabled() &amp;&amp; showInvalidPathWarning);
+
+
+
+// set whether "Set defaults" button should be enabled
+FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFAULTS_ADVANCEDITEM");
+JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
+boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
+jb_setDefaults.setEnabled(enableSetDefaults);</property>
+                        </object>
+                      </property>
+                      <property name="variableName" type="string">allowUserDefaultAppdirUpdates</property>
+                    </serializedBean>
+                  </formComponent>
+                  <group name="SYSTEMSPACE: Customise user appDir path" id="3021" customizedId="SS_SET_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.groups.HorizontalFormComponentGroup">
                     <serializedBean>
-                      <property name="checkboxText" type="string">Customise the user-space path</property>
-                      <property name="selectionScript">
+                      <property name="insets">
+                        <object class="java.awt.Insets">
+                          <int>0</int>
+                          <int>32</int>
+                          <int>0</int>
+                          <int>0</int>
+                        </object>
+                      </property>
+                      <property name="visibilityScript">
                         <object class="com.install4j.api.beans.ScriptProperty">
-                          <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+                          <property name="value" type="string" />
+                        </object>
+                      </property>
+                    </serializedBean>
+                    <beans>
+                      <formComponent name="SYSTEMSPACE: Allow setting userAppdirPath" id="3022" customizedId="SS_ALLOW_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent">
+                        <serializedBean>
+                          <property name="checkboxText" type="string">Customise the user-space path</property>
+                          <property name="selectionScript">
+                            <object class="com.install4j.api.beans.ScriptProperty">
+                              <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
 FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
-LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
+LayoutGroup lg_advancedGroup = formEnvironment.getLayoutGroupById("SS_ADVANCED_OPTIONS_GROUP");
+LayoutGroup lg_setUserAppdirPath = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
 
 
 
@@ -1059,26 +1106,21 @@ LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
 JCheckBox jcb_advancedOptions = (JCheckBox) fc_advancedOptions.getConfigurationObject();
 boolean advancedOptions = jcb_advancedOptions.isSelected();
 
-// set visibility of all "ADVANCEDITEM" components (does not include groups) and layout groups
-for (FormComponent fc: formEnvironment.getFormComponents()) {
-  String id = formEnvironment.getId(fc);
-  if (id.contains("ADVANCEDITEM")) {
-    fc.setVisible(advancedOptions);
-  }
-}
-lg.setVisible(advancedOptions);
+// set visibility of Advanced options layout group
+lg_advancedGroup.setVisible(advancedOptions);
 
 if (!advancedOptions) {
   return;
 }
 
 
+
 // get boolean status of "Allow user-space updates" checkbox
 JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
 boolean userUpdates = jcb_user.isSelected();
 
 // set enabled of customised user appdir path group
-lg.setEnabled(advancedOptions &amp;&amp; userUpdates);
+lg_setUserAppdirPath.setEnabled(advancedOptions &amp;&amp; userUpdates);
 
 // set enabled of allow installation updates checkbox
 fc_installerUpdates.setEnabled(advancedOptions &amp;&amp; !userUpdates);
@@ -1099,24 +1141,40 @@ JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject
 boolean installerUpdates = jcb_installer.isSelected();
 
 // should we show the No updates warning?
-boolean showWarning = advancedOptions &amp;&amp; !(userUpdates || installerUpdates);
-FormComponent fc_warning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
-fc_warning.setVisible(showWarning);
+boolean showNoUpdatesWarning = advancedOptions &amp;&amp; !(userUpdates || installerUpdates);
+FormComponent fc_noUpdatesWarning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
+fc_noUpdatesWarning.setVisible(advancedOptions &amp;&amp; showNoUpdatesWarning);
 
 
 
 // get String value of userAppdirPath text field
 JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
 String userAppdirPath = jtf_userAppdirPath.getText();
-// not using this yet</property>
-                        </object>
-                      </property>
-                      <property name="variableName" type="string">allowSetUserAppdirPath</property>
-                    </serializedBean>
-                  </formComponent>
-                  <formComponent name="SYSTEMSPACE: Set userAppdirPath" id="3024" customizedId="SS_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.formcomponents.TextfieldComponent">
-                    <serializedBean>
-                      <property name="helpText" type="string">&lt;html&gt;The base path where individual users' updates
+
+// should we show the invalid user-space path warning?
+boolean u = userAppdirPath.contains("%u");
+boolean h = userAppdirPath.contains("%h");
+boolean t = userAppdirPath.startsWith("~" + (String)context.getVariable("sys.fileSeparator"));
+
+boolean showInvalidPathWarning = !( userAppdirPath.length() == 0 || u || h || t );
+FormComponent fc_invalidPathWarning = formEnvironment.getFormComponentById("SS_INVALID_USER_APPDIR_PATH_WARNING");
+fc_invalidPathWarning.setVisible(advancedOptions &amp;&amp; userUpdates &amp;&amp; allowUserAppdirPath &amp;&amp; fc_userAppdirPath.isEnabled() &amp;&amp; showInvalidPathWarning);
+
+
+
+// set whether "Set defaults" button should be enabled
+FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFAULTS_ADVANCEDITEM");
+JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
+boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
+jb_setDefaults.setEnabled(enableSetDefaults);</property>
+                            </object>
+                          </property>
+                          <property name="variableName" type="string">allowSetUserAppdirPath</property>
+                        </serializedBean>
+                      </formComponent>
+                      <formComponent name="SYSTEMSPACE: Set userAppdirPath" id="3024" customizedId="SS_USER_APPDIR_PATH" beanClass="com.install4j.runtime.beans.formcomponents.TextfieldComponent">
+                        <serializedBean>
+                          <property name="helpText" type="string">&lt;html&gt;The base path where individual users' updates
 &lt;br&gt;
 will be stored.
 &lt;br&gt;
@@ -1134,29 +1192,132 @@ The default value on ${installer:osName} is
 &lt;br&gt;
 &lt;pre&gt;${installer:userDefaultAppdirBase}&lt;/pre&gt;
 &lt;/html&gt;</property>
-                      <property name="inputVerifier">
-                        <object class="com.install4j.api.beans.ScriptProperty">
-                          <property name="value" type="string">boolean u = text.contains("%u");
-boolean h = text.contains("%h");
-boolean t = text.startsWith("~" + (String)context.getVariable("sys.fileSeparator"));
+                          <property name="inputVerifier">
+                            <object class="com.install4j.api.beans.ScriptProperty">
+                              <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
+FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
+FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
+FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
+LayoutGroup lg_advancedGroup = formEnvironment.getLayoutGroupById("SS_ADVANCED_OPTIONS_GROUP");
+LayoutGroup lg_setUserAppdirPath = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
 
-boolean valid = text.length() == 0 || u || h || t;
 
-if (!valid) {
-    // popup warning?
+
+// get boolean status of "Enable advanced options" checkbox
+JCheckBox jcb_advancedOptions = (JCheckBox) fc_advancedOptions.getConfigurationObject();
+boolean advancedOptions = jcb_advancedOptions.isSelected();
+
+// set visibility of Advanced options layout group
+lg_advancedGroup.setVisible(advancedOptions);
+
+if (!advancedOptions) {
+  return true;
 }
+
+
+
+// get boolean status of "Allow user-space updates" checkbox
+JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
+boolean userUpdates = jcb_user.isSelected();
+
+// set enabled of customised user appdir path group
+lg_setUserAppdirPath.setEnabled(advancedOptions &amp;&amp; userUpdates);
+
+// set enabled of allow installation updates checkbox
+fc_installerUpdates.setEnabled(advancedOptions &amp;&amp; !userUpdates);
+
+
+
+// get boolean status of "Customise the user-space path" checkbox
+JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
+boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
+
+// set enabled of userAppdirPath text field
+fc_userAppdirPath.setEnabled(advancedOptions &amp;&amp; allowUserAppdirPath &amp;&amp; fc_allowUserAppdirPath.isEnabled());
+
+
+
+// get boolean status of "Allow installation updates" checkbox
+JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
+boolean installerUpdates = jcb_installer.isSelected();
+
+// should we show the No updates warning?
+boolean showNoUpdatesWarning = advancedOptions &amp;&amp; !(userUpdates || installerUpdates);
+FormComponent fc_noUpdatesWarning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
+fc_noUpdatesWarning.setVisible(advancedOptions &amp;&amp; showNoUpdatesWarning);
+
+
+
+// get String value of userAppdirPath text field
+JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
+String userAppdirPath = jtf_userAppdirPath.getText();
+
+// should we show the invalid user-space path warning?
+boolean u = userAppdirPath.contains("%u");
+boolean h = userAppdirPath.contains("%h");
+boolean t = userAppdirPath.startsWith("~" + (String)context.getVariable("sys.fileSeparator"));
+
+boolean showInvalidPathWarning = !( userAppdirPath.length() == 0 || u || h || t );
+FormComponent fc_invalidPathWarning = formEnvironment.getFormComponentById("SS_INVALID_USER_APPDIR_PATH_WARNING");
+fc_invalidPathWarning.setVisible(advancedOptions &amp;&amp; userUpdates &amp;&amp; allowUserAppdirPath &amp;&amp; fc_userAppdirPath.isEnabled() &amp;&amp; showInvalidPathWarning);
+
+
+
+// set whether "Set defaults" button should be enabled
+FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFAULTS_ADVANCEDITEM");
+JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
+boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
+jb_setDefaults.setEnabled(enableSetDefaults);
+
+
+
 return true;</property>
-                        </object>
-                      </property>
-                      <property name="variableName" type="string">userAppdirPath</property>
-                    </serializedBean>
-                  </formComponent>
-                </beans>
-              </group>
-              <formComponent name="SYSTEMSPACE: Allow automatic updates in the installation directory" id="2974" customizedId="SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent" insetLeft="16">
-                <serializedBean>
-                  <property name="checkboxText" type="string">Allow installation updates for ${compiler:JALVIEW_APPLICATION_NAME} components</property>
-                  <property name="helpText" type="string">&lt;html&gt;This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME}
+                            </object>
+                          </property>
+                          <property name="keyListener">
+                            <object class="com.install4j.api.beans.ScriptProperty">
+                              <property name="value" type="string">// get String value of userAppdirPath text field
+FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
+JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
+String userAppdirPath = jtf_userAppdirPath.getText();
+boolean u = userAppdirPath.contains("%u");
+boolean h = userAppdirPath.contains("%h");
+boolean t = userAppdirPath.startsWith("~" + (String)context.getVariable("sys.fileSeparator"));
+
+boolean showInvalidPathWarning = !( userAppdirPath.length() == 0 || u || h || t );
+FormComponent fc_invalidPathWarning = formEnvironment.getFormComponentById("SS_INVALID_USER_APPDIR_PATH_WARNING");
+fc_invalidPathWarning.setVisible(showInvalidPathWarning);
+</property>
+                            </object>
+                          </property>
+                          <property name="keyValidator">
+                            <object class="com.install4j.api.beans.ScriptProperty">
+                              <property name="value" type="string" />
+                            </object>
+                          </property>
+                          <property name="variableName" type="string">userAppdirPath</property>
+                        </serializedBean>
+                        <initScript>FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
+FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
+FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
+FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
+
+JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
+boolean userUpdates = jcb_user.isSelected();
+
+JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
+boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
+
+configurationObject.setEnabled(userUpdates &amp;&amp; allowUserAppdirPath);</initScript>
+                      </formComponent>
+                    </beans>
+                  </group>
+                  <formComponent name="SYSTEMSPACE: Allow automatic updates in the installation directory" id="2974" customizedId="SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.CheckboxComponent" insetLeft="16">
+                    <serializedBean>
+                      <property name="checkboxText" type="string">Allow installation updates for ${compiler:JALVIEW_APPLICATION_NAME} components</property>
+                      <property name="helpText" type="string">&lt;html&gt;This option allows updates to ${compiler:JALVIEW_APPLICATION_NAME}
 &lt;br&gt;
 components to be automatically downloaded
 &lt;br&gt;
@@ -1179,14 +1340,15 @@ Installation updates will be installed into
 &lt;br&gt;
 &lt;pre&gt;${installer:sys.contentDir}&lt;/pre&gt;
 &lt;/html&gt;</property>
-                  <property name="selectionScript">
-                    <object class="com.install4j.api.beans.ScriptProperty">
-                      <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+                      <property name="selectionScript">
+                        <object class="com.install4j.api.beans.ScriptProperty">
+                          <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
 FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
 FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
 FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
-LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
+LayoutGroup lg_advancedGroup = formEnvironment.getLayoutGroupById("SS_ADVANCED_OPTIONS_GROUP");
+LayoutGroup lg_setUserAppdirPath = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
 
 
 
@@ -1194,26 +1356,21 @@ LayoutGroup lg = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
 JCheckBox jcb_advancedOptions = (JCheckBox) fc_advancedOptions.getConfigurationObject();
 boolean advancedOptions = jcb_advancedOptions.isSelected();
 
-// set visibility of all "ADVANCEDITEM" components (does not include groups) and layout groups
-for (FormComponent fc: formEnvironment.getFormComponents()) {
-  String id = formEnvironment.getId(fc);
-  if (id.contains("ADVANCEDITEM")) {
-    fc.setVisible(advancedOptions);
-  }
-}
-lg.setVisible(advancedOptions);
+// set visibility of Advanced options layout group
+lg_advancedGroup.setVisible(advancedOptions);
 
 if (!advancedOptions) {
   return;
 }
 
 
+
 // get boolean status of "Allow user-space updates" checkbox
 JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
 boolean userUpdates = jcb_user.isSelected();
 
 // set enabled of customised user appdir path group
-lg.setEnabled(advancedOptions &amp;&amp; userUpdates);
+lg_setUserAppdirPath.setEnabled(advancedOptions &amp;&amp; userUpdates);
 
 // set enabled of allow installation updates checkbox
 fc_installerUpdates.setEnabled(advancedOptions &amp;&amp; !userUpdates);
@@ -1234,55 +1391,185 @@ JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject
 boolean installerUpdates = jcb_installer.isSelected();
 
 // should we show the No updates warning?
-boolean showWarning = advancedOptions &amp;&amp; !(userUpdates || installerUpdates);
-FormComponent fc_warning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
-fc_warning.setVisible(showWarning);
+boolean showNoUpdatesWarning = advancedOptions &amp;&amp; !(userUpdates || installerUpdates);
+FormComponent fc_noUpdatesWarning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
+fc_noUpdatesWarning.setVisible(advancedOptions &amp;&amp; showNoUpdatesWarning);
 
 
 
 // get String value of userAppdirPath text field
 JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
 String userAppdirPath = jtf_userAppdirPath.getText();
-// not using this yet</property>
-                    </object>
-                  </property>
-                  <property name="variableName" type="string">allowInstallerAppdirUpdates</property>
-                </serializedBean>
-                <visibilityScript>context.getBooleanVariable("advancedOptions")
-</visibilityScript>
-              </formComponent>
-              <formComponent name="BOTHSPACE: No updates warning" id="2988" customizedId="SS_NO_UPDATES_WARNING" beanClass="com.install4j.runtime.beans.formcomponents.LabelComponent" insetLeft="16">
-                <serializedBean>
-                  <property name="labelIconFile">
-                    <object class="com.install4j.api.beans.ExternalFile">
-                      <string>${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png</string>
-                    </object>
-                  </property>
-                  <property name="labelText" type="string">No automatic updates will occur when Jalview is launched</property>
-                </serializedBean>
-                <visibilityScript>context.getBooleanVariable("advancedOptions")
-&amp;&amp;
-!(
+
+// should we show the invalid user-space path warning?
+boolean u = userAppdirPath.contains("%u");
+boolean h = userAppdirPath.contains("%h");
+boolean t = userAppdirPath.startsWith("~" + (String)context.getVariable("sys.fileSeparator"));
+
+boolean showInvalidPathWarning = !( userAppdirPath.length() == 0 || u || h || t );
+FormComponent fc_invalidPathWarning = formEnvironment.getFormComponentById("SS_INVALID_USER_APPDIR_PATH_WARNING");
+fc_invalidPathWarning.setVisible(advancedOptions &amp;&amp; userUpdates &amp;&amp; allowUserAppdirPath &amp;&amp; fc_userAppdirPath.isEnabled() &amp;&amp; showInvalidPathWarning);
+
+
+
+// set whether "Set defaults" button should be enabled
+FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFAULTS_ADVANCEDITEM");
+JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
+boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
+jb_setDefaults.setEnabled(enableSetDefaults);</property>
+                        </object>
+                      </property>
+                      <property name="variableName" type="string">allowInstallerAppdirUpdates</property>
+                    </serializedBean>
+                  </formComponent>
+                  <formComponent name="Set defaults" id="3029" customizedId="SS_SET_DEFAULTS_ADVANCEDITEM" beanClass="com.install4j.runtime.beans.formcomponents.ButtonComponent" insetTop="8" insetLeft="16">
+                    <serializedBean>
+                      <property name="actionScript">
+                        <object class="com.install4j.api.beans.ScriptProperty">
+                          <property name="value" type="string">FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
+FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
+FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
+FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
+LayoutGroup lg_advancedGroup = formEnvironment.getLayoutGroupById("SS_ADVANCED_OPTIONS_GROUP");
+LayoutGroup lg_setUserAppdirPath = formEnvironment.getLayoutGroupById("SS_SET_USER_APPDIR_PATH");
+
+
+// set defaults
+JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
+jcb_user.setSelected(true);
+
+JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
+jcb_allowUserAppdirPath.setSelected(false);
+
+JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
+jtf_userAppdirPath.setText("");
+
+JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
+jcb_installer.setSelected(false);
+
+
+
+// get boolean status of "Enable advanced options" checkbox
+JCheckBox jcb_advancedOptions = (JCheckBox) fc_advancedOptions.getConfigurationObject();
+boolean advancedOptions = jcb_advancedOptions.isSelected();
+
+// set visibility of Advanced options layout group
+lg_advancedGroup.setVisible(advancedOptions);
+
+if (!advancedOptions) {
+  return;
+}
+
+
+
+// get boolean status of "Allow user-space updates" checkbox
+boolean userUpdates = jcb_user.isSelected();
+
+// set enabled of customised user appdir path group
+lg_setUserAppdirPath.setEnabled(advancedOptions &amp;&amp; userUpdates);
+
+// set enabled of allow installation updates checkbox
+fc_installerUpdates.setEnabled(advancedOptions &amp;&amp; !userUpdates);
+
+
+
+// get boolean status of "Customise the user-space path" checkbox
+boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
+
+// set enabled of userAppdirPath text field
+fc_userAppdirPath.setEnabled(advancedOptions &amp;&amp; allowUserAppdirPath &amp;&amp; fc_allowUserAppdirPath.isEnabled());
+
+
+
+// get boolean status of "Allow installation updates" checkbox
+boolean installerUpdates = jcb_installer.isSelected();
+
+// should we show the No updates warning?
+boolean showNoUpdatesWarning = advancedOptions &amp;&amp; !(userUpdates || installerUpdates);
+FormComponent fc_noUpdatesWarning = formEnvironment.getFormComponentById("SS_NO_UPDATES_WARNING");
+fc_noUpdatesWarning.setVisible(advancedOptions &amp;&amp; showNoUpdatesWarning);
+
+
+
+// get String value of userAppdirPath text field
+String userAppdirPath = jtf_userAppdirPath.getText();
+
+// should we show the invalid user-space path warning?
+boolean u = userAppdirPath.contains("%u");
+boolean h = userAppdirPath.contains("%h");
+boolean t = userAppdirPath.startsWith("~" + (String)context.getVariable("sys.fileSeparator"));
+
+boolean showInvalidPathWarning = !( userAppdirPath.length() == 0 || u || h || t );
+FormComponent fc_invalidPathWarning = formEnvironment.getFormComponentById("SS_INVALID_USER_APPDIR_PATH_WARNING");
+fc_invalidPathWarning.setVisible(advancedOptions &amp;&amp; userUpdates &amp;&amp; allowUserAppdirPath &amp;&amp; fc_userAppdirPath.isEnabled() &amp;&amp; showInvalidPathWarning);
+
+
+
+// set whether "Set defaults" button should be enabled
+FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFAULTS_ADVANCEDITEM");
+JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
+boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
+jb_setDefaults.setEnabled(enableSetDefaults);</property>
+                        </object>
+                      </property>
+                      <property name="buttonText" type="string">Reset advanced options to defaults</property>
+                    </serializedBean>
+                    <initScript>FormComponent fc_advancedOptions = formEnvironment.getFormComponentById("SS_ADVANCED_OPTIONS");
+FormComponent fc_userUpdates = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_UPDATES_ADVANCEDITEM");
+FormComponent fc_userAppdirPath = formEnvironment.getFormComponentById("SS_USER_APPDIR_PATH");
+FormComponent fc_installerUpdates = formEnvironment.getFormComponentById("SS_ALLOW_INSTALLER_APPDIR_UPDATES_ADVANCEDITEM");
+FormComponent fc_allowUserAppdirPath = formEnvironment.getFormComponentById("SS_ALLOW_USER_APPDIR_PATH");
+
+JCheckBox jcb_user = (JCheckBox) fc_userUpdates.getConfigurationObject();
+boolean userUpdates = jcb_user.isSelected();
+
+JCheckBox jcb_allowUserAppdirPath = (JCheckBox) fc_allowUserAppdirPath.getConfigurationObject();
+boolean allowUserAppdirPath = jcb_allowUserAppdirPath.isSelected();
+
+JTextField jtf_userAppdirPath = (JTextField) fc_userAppdirPath.getConfigurationObject();
+String userAppdirPath = jtf_userAppdirPath.getText();
+
+JCheckBox jcb_installer = (JCheckBox) fc_installerUpdates.getConfigurationObject();
+boolean installerUpdates = jcb_installer.isSelected();
+
+
+// set whether "Set defaults" button should be enabled
+FormComponent fc_setDefaults = formEnvironment.getFormComponentById("SS_SET_DEFAULTS_ADVANCEDITEM");
+JButton jb_setDefaults = (JButton) fc_setDefaults.getConfigurationObject();
+boolean enableSetDefaults = !( userUpdates &amp;&amp; !allowUserAppdirPath &amp;&amp; userAppdirPath.length() == 0 &amp;&amp; !installerUpdates );
+jb_setDefaults.setEnabled(enableSetDefaults);</initScript>
+                  </formComponent>
+                  <formComponent name="BOTHSPACE: No updates warning" id="2988" customizedId="SS_NO_UPDATES_WARNING" beanClass="com.install4j.runtime.beans.formcomponents.LabelComponent" insetLeft="16">
+                    <serializedBean>
+                      <property name="labelIconFile">
+                        <object class="com.install4j.api.beans.ExternalFile">
+                          <string>${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png</string>
+                        </object>
+                      </property>
+                      <property name="labelText" type="string">No automatic updates will occur when ${compiler:JALVIEW_APPLICATION_NAME} is launched</property>
+                    </serializedBean>
+                    <visibilityScript>!(
   context.getBooleanVariable("allowUserDefaultAppdirUpdates")
   || context.getBooleanVariable("allowInstallerAppdirUpdates")
 )</visibilityScript>
-              </formComponent>
-              <formComponent name="SYSTEMSPACE: Invalid user-space path warning" id="3027" customizedId="SS_INVALID_USER_APPDIR_PATH_WARNING" beanClass="com.install4j.runtime.beans.formcomponents.LabelComponent" insetLeft="16">
-                <serializedBean>
-                  <property name="labelIconFile">
-                    <object class="com.install4j.api.beans.ExternalFile">
-                      <string>${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png</string>
-                    </object>
-                  </property>
-                  <property name="labelText" type="string">No automatic updates will occur when Jalview is launched</property>
-                </serializedBean>
-                <visibilityScript>context.getBooleanVariable("advancedOptions")
-&amp;&amp;
-!(
+                  </formComponent>
+                  <formComponent name="SYSTEMSPACE: Invalid user-space path warning" id="3027" customizedId="SS_INVALID_USER_APPDIR_PATH_WARNING" beanClass="com.install4j.runtime.beans.formcomponents.LabelComponent" insetLeft="16">
+                    <serializedBean>
+                      <property name="labelIconFile">
+                        <object class="com.install4j.api.beans.ExternalFile">
+                          <string>${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/warning.png</string>
+                        </object>
+                      </property>
+                      <property name="labelText" type="string">The user-space path should contain one of "~" (at the start), "%u" or "%h"</property>
+                    </serializedBean>
+                    <visibilityScript>!(
   context.getBooleanVariable("allowUserDefaultAppdirUpdates")
   || context.getBooleanVariable("allowInstallerAppdirUpdates")
 )</visibilityScript>
-              </formComponent>
+                  </formComponent>
+                </beans>
+              </group>
             </formComponents>
           </screen>
           <screen id="15" beanClass="com.install4j.runtime.beans.screens.InstallationScreen" rollbackBarrier="true" rollbackBarrierExitCode="0">