<property name="variableName" type="string">allowInstallerAppdirUpdates</property>
</serializedBean>
</action>
- <action name="SYSTEMSPACE: Set disableAllUpdates" id="3075" 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">Boolean.FALSE</property>
- </object>
- </property>
- <property name="variableName" type="string">disableAllUpdates</property>
- </serializedBean>
- </action>
<action name="BOTHSPACE: Set userDefaultAppdirBase for tooltip explanation" id="2981" beanClass="com.install4j.runtime.beans.actions.control.SetVariableAction" rollbackBarrierExitCode="0">
<serializedBean>
<property name="script">
<property name="variableName" type="string">osName</property>
</serializedBean>
</action>
+ <action name="CONSOLE: Set consoleDisableUserAppdir" id="3075" 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">Boolean.FALSE</property>
+ </object>
+ </property>
+ <property name="variableName" type="string">consoleDisableUserAppdir</property>
+ </serializedBean>
+ </action>
+ <action name="CONSOLE: Set consoleDisableAllUpdates" id="3076" 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">Boolean.FALSE</property>
+ </object>
+ </property>
+ <property name="variableName" type="string">consoleDisableAllUpdates</property>
+ </serializedBean>
+ </action>
+ <action name="CONSOLE: Set consoleAllowUserAppdirPath" id="3077" 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">Boolean.FALSE</property>
+ </object>
+ </property>
+ <property name="variableName" type="string">consoleAllowUserAppdirPath</property>
+ </serializedBean>
+ </action>
<action name="Extra Command Line Options" id="3074" beanClass="com.install4j.runtime.beans.actions.control.RunScriptAction" rollbackBarrierExitCode="0">
<serializedBean>
<property name="script">
System.out.println("Option " + arg + " requires a value. Ignoring.");
}
context.setVariable("userAppdirPath", args[i + 1]);
- context.setVariable("advancedOptions", true);
- context.setVariable("allowSetUserAppdirPath", true);
+ context.setVariable("consoleAllowUserAppdirPath", true);
i++;
break;
case "-U":
- context.setVariable("allowUserDefaultAppdirUpdates", false);
- context.setVariable("advancedOptions", true);
+ context.setVariable("consoleDisableUserAppdir", true);
break;
case "-S":
- context.setVariable("disableAllUpdates", true);
- context.setVariable("advancedOptions", true);
+ context.setVariable("consoleDisableAllUpdates", true);
break;
default:
System.out.println("Option " + arg + " not recognised. Ignoring.");
</object>
</property>
</serializedBean>
+ <condition>context.isConsole() || context.isUnattended()</condition>
</action>
</actions>
</screen>
<object class="com.install4j.api.beans.ScriptProperty">
<property name="value" type="string">boolean advanced = context.getBooleanVariable("advancedOptions");
boolean allowUser = context.getBooleanVariable("allowUserDefaultAppdirUpdates");
-
+boolean consoleDisableUserAppdir = context.getBooleanVariable("consoleDisableUserAppdir");
+if (consoleDisableUserAppdir) {
+ return true;
+}
return advanced ? !allowUser : false;</property>
</object>
</property>
boolean allowSetUserAppdirPath = context.getBooleanVariable("allowSetUserAppdirPath");
String userAppdirPath = (String)context.getVariable("userAppdirPath");
boolean saneValue = userAppdirPath != null && userAppdirPath.length() > 0;
-
+boolean consoleAllowUserAppdirPath = context.getBooleanVariable("consoleAllowUserAppdirPath");
+if (consoleAllowUserAppdirPath && saneValue) {
+ return userAppdirPath;
+}
return advanced && allowUser && allowSetUserAppdirPath && saneValue ? userAppdirPath : null;</property>
</object>
</property>
<property name="value" type="string">boolean advanced = context.getBooleanVariable("advancedOptions");
boolean allowUser = context.getBooleanVariable("allowUserDefaultAppdirUpdates");
boolean allowInstaller = context.getBooleanVariable("allowInstallerAppdirUpdates");
-boolean disableAllUpdates = context.getBooleanVariable("disableAllUpdates");
-
-return advanced ? disableAllUpdates || !( allowUser || allowInstaller ) : false;</property>
+boolean consoleDisableAllUpdates = context.getBooleanVariable("consoleDisableAllUpdates");
+if (consoleDisableAllUpdates) {
+ return true;
+}
+return advanced ? !( allowUser || allowInstaller ) : false;</property>
</object>
</property>
<property name="variableName" type="string">disableUpdates</property>