More formatting tweaks.

This commit is contained in:
Michael Bayne
2019-02-25 17:53:12 -08:00
parent 06aa668ef6
commit f7586cf601
2 changed files with 28 additions and 27 deletions
@@ -50,32 +50,34 @@ public class SysProps
return System.getProperty("appbase_override");
}
/** If true, Getdown installs the app without ever bringing up a UI, except in the event of an
* error. NOTE: it does not launch the app. See {@link #launchInSilent}.
/** If true, Getdown installs the app without ever bringing up a UI (except in the event of an
* error). NOTE: it does not launch the app. See {@link #launchInSilent}.
* Usage: {@code -Dsilent}. */
public static boolean silent () {
return System.getProperty("silent") != null;
}
/** Instructs Getdown to install/update the app without ever bringing up a UI (except in the
* event of an error), and then launch it.
* Usage: {@code -Dsilent=launch}. */
public static boolean launchInSilent () {
return "launch".equals(System.getProperty("silent"));
}
/**
* Instructs Getdown to launch the app without updating it, or ever bringing up a UI (except
* in the event of an error).
* Usage: {@code -Dsilent=noupdate}.
*/
public static boolean noUpdate() {
return "noupdate".equals(System.getProperty("silent"));
}
/** If true, Getdown does not automatically install updates after downloading them. It waits
* for the application to call `Getdown.install`.
* Usage: {@code -Dno_install}. */
public static boolean noInstall () {
return System.getProperty("no_install") != null;
}
/**
* If true, Getdown launches the app without updating. Usage:
* {@code -Dsilent=noupdate}.
*/
public static boolean noUpdate() {
return "noupdate".equals(System.getProperty("silent"));
}
/** If true, Getdown installs the app without ever bringing up a UI and then launches it.
* Usage: {@code -Dsilent=launch}. */
public static boolean launchInSilent () {
return "launch".equals(System.getProperty("silent"));
return System.getProperty("no_install") != null;
}
/** Specifies the delay (in minutes) to wait before starting the update and install process.
@@ -54,8 +54,8 @@ public abstract class Getdown extends Thread
// launch, start the application after installing. Otherwise, just install and exit.
_silent = SysProps.silent();
if (_silent) {
_noUpdate = SysProps.noUpdate();
_launchInSilent = SysProps.launchInSilent();
_noUpdate = SysProps.noUpdate();
}
// If we're running in a headless environment and have not otherwise customized
// silence, operate without a UI and do launch the app.
@@ -257,7 +257,6 @@ public abstract class Getdown extends Thread
*/
protected void getdown ()
{
try {
// first parses our application deployment file
try {
@@ -293,6 +292,13 @@ public abstract class Getdown extends Thread
}
}
// if no_update was specified, directly start the app without updating
if (_noUpdate) {
log.info("Launching without update!");
launch();
return;
}
// we create this tracking counter here so that we properly note the first time through
// the update process whether we previously had validated resources (which means this
// is not a first time install); we may, in the course of updating, wipe out our
@@ -307,13 +313,6 @@ public abstract class Getdown extends Thread
_toInstallResources = new HashSet<>();
_readyToInstall = false;
// directly start the app with the noupdate flag
if (_noUpdate) {
log.info("Launching without update!");
launch();
return;
}
// setStep(Step.START);
for (int ii = 0; ii < MAX_LOOPS; ii++) {
// make sure we have the desired version and that the metadata files are valid...
@@ -1049,8 +1048,8 @@ public abstract class Getdown extends Thread
protected boolean _dead;
protected boolean _silent;
protected boolean _noUpdate;
protected boolean _launchInSilent;
protected boolean _noUpdate;
protected long _startup;
protected Set<Resource> _toInstallResources;