}
}
+ // set individual session preferences
+ if (bootstrapArgs.contains(Arg.P))
+ {
+ for (String kev : bootstrapArgs.getValueList(Arg.P))
+ {
+ if (kev == null)
+ {
+ continue;
+ }
+ int equalsIndex = kev.indexOf(ArgParser.EQUALS);
+ if (equalsIndex > -1)
+ {
+ String key = kev.substring(0, equalsIndex);
+ String val = kev.substring(equalsIndex + 1);
+ Cache.setSessionProperty(key, val);
+ }
+ }
+ }
+
// Move any new getdown-launcher-new.jar into place over old
// getdown-launcher.jar
String appdirString = System.getProperty("getdownappdir");
testoutput(argparser, Arg.WEBSERVICEDISCOVERY);
}
- boolean usagestats = bootstrapArgs.getBoolean(Arg.USAGESTATS);
+ boolean usagestats = !bootstrapArgs.getBoolean(Arg.NOUSAGESTATS);
if (aparser.contains("nousagestats"))
usagestats = false;
if (usagestats)
{
startUsageStats(desktop);
- testoutput(argparser, Arg.USAGESTATS);
+ testoutput(argparser, Arg.NOUSAGESTATS);
}
else
{
System.out.println("CMD [-nousagestats] executed successfully!");
- testoutput(argparser, Arg.USAGESTATS);
+ testoutput(argparser, Arg.NOUSAGESTATS);
}
boolean questionnaire = bootstrapArgs.getBoolean(Arg.QUESTIONNAIRE);
if (!Platform.isJS() && !headless && file == null
&& Cache.getDefault("SHOW_STARTUP_FILE", true)
- && !cmds.commandArgsProvided())
+ && !cmds.commandArgsProvided()
+ && !bootstrapArgs.getBoolean(Arg.NOSTARTUPFILE))
// don't open the startup file if command line args have been processed
// (&& !Commands.commandArgsProvided())
/**
}
/*
- * testoutput for boolean values
+ * testoutput for boolean and unary values
*/
protected static void testoutput(ArgParser ap, Arg a)
{
private static void testoutput(boolean yes, Arg a)
{
- System.out.println("[TESTOUTPUT] arg "
- + (yes ? a.argString() : a.negateArgString()) + " was set");
+ String message = null;
+ if (a.hasOption(Opt.BOOLEAN))
+ {
+ message = (yes ? a.argString() : a.negateArgString()) + " was set";
+ }
+ else if (a.hasOption(Opt.UNARY))
+ {
+ message = a.argString() + (yes ? " was set" : " was not set");
+ }
+ System.out.println("[TESTOUTPUT] arg " + message);
}
}