<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="Extra Command Line Options" id="3074" beanClass="com.install4j.runtime.beans.actions.control.RunScriptAction" rollbackBarrierExitCode="0">
+ <serializedBean>
+ <property name="script">
+ <object class="com.install4j.api.beans.ScriptProperty">
+ <property name="value" type="string">String[] args = context.getExtraCommandLineArguments();
+
+for (int i = 0; i < args.length; i++) {
+ String arg = args[i];
+ switch(arg) {
+ case "-a":
+ if (args.length - 1 < i + 1) {
+ System.out.println("Option " + arg + " requires a value. Ignoring.");
+ }
+ context.setInstallationDirectory(new File(args[i + 1]));
+ i++;
+ break;
+ case "-u":
+ if (args.length - 1 < i + 1) {
+ System.out.println("Option " + arg + " requires a value. Ignoring.");
+ }
+ context.setVariable("userAppdirPath", args[i + 1]);
+ context.setVariable("advancedOptions", true);
+ context.setVariable("allowSetUserAppdirPath", true);
+ i++;
+ break;
+ case "-U":
+ context.setVariable("allowUserDefaultAppdirUpdates", false);
+ context.setVariable("advancedOptions", true);
+ break;
+ case "-S":
+ context.setVariable("disableAllUpdates", true);
+ context.setVariable("advancedOptions", true);
+ break;
+ default:
+ System.out.println("Option " + arg + " not recognised. Ignoring.");
+ break;
+ }
+}
+
+return true;</property>
+ </object>
+ </property>
+ </serializedBean>
+ </action>
</actions>
</screen>
</startup>
boolean set = aid.endsWith("-true");
boolean got = aa.isSelected();
aa.setSelected(set);
- System.err.println("##### Setting '"+aid+"' from "+got+" to "+set);
+ System.err.println("Setting '"+aid+"' from "+got+" to "+set);
}
}
-//context.gotoScreen(s);
-//boolean b = formEnvironment.saveFormComponents();
-//System.err.println("##### saveFormComponents was "+b);
-formEnvironment.reinitializeFormComponents();</property>
+context.gotoScreen(s);
+//formEnvironment.reinitializeFormComponents();</property>
</object>
</property>
<property name="buttonText" type="string">Reset</property>
<property name="script">
<object class="com.install4j.api.beans.ScriptProperty">
<property name="value" type="string">String dir = (String)context.getVariable("sys.installationDir");
-System.out.println("##### sys.installationDir = " + dir);
String hash = getCanonicalFullPathToDirectoryHash(dir);
-System.out.println("##### sys.installationDir hash = " + dir);
return (Object) hash;
</property>
</object>
<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 ? !( allowUser || allowInstaller ) : false;</property>
+return advanced ? disableAllUpdates || !( allowUser || allowInstaller ) : false;</property>
</object>
</property>
<property name="variableName" type="string">disableUpdates</property>