More formatting tweaks.
This commit is contained in:
@@ -50,32 +50,34 @@ public class SysProps
|
|||||||
return System.getProperty("appbase_override");
|
return System.getProperty("appbase_override");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** If true, Getdown installs the app without ever bringing up a UI, except in the event of an
|
/** 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}.
|
* error). NOTE: it does not launch the app. See {@link #launchInSilent}.
|
||||||
* Usage: {@code -Dsilent}. */
|
* Usage: {@code -Dsilent}. */
|
||||||
public static boolean silent () {
|
public static boolean silent () {
|
||||||
return System.getProperty("silent") != null;
|
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
|
/** If true, Getdown does not automatically install updates after downloading them. It waits
|
||||||
* for the application to call `Getdown.install`.
|
* for the application to call `Getdown.install`.
|
||||||
* Usage: {@code -Dno_install}. */
|
* Usage: {@code -Dno_install}. */
|
||||||
public static boolean noInstall () {
|
public static boolean noInstall () {
|
||||||
return System.getProperty("no_install") != null;
|
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"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Specifies the delay (in minutes) to wait before starting the update and install process.
|
/** 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.
|
// launch, start the application after installing. Otherwise, just install and exit.
|
||||||
_silent = SysProps.silent();
|
_silent = SysProps.silent();
|
||||||
if (_silent) {
|
if (_silent) {
|
||||||
_noUpdate = SysProps.noUpdate();
|
|
||||||
_launchInSilent = SysProps.launchInSilent();
|
_launchInSilent = SysProps.launchInSilent();
|
||||||
|
_noUpdate = SysProps.noUpdate();
|
||||||
}
|
}
|
||||||
// If we're running in a headless environment and have not otherwise customized
|
// If we're running in a headless environment and have not otherwise customized
|
||||||
// silence, operate without a UI and do launch the app.
|
// silence, operate without a UI and do launch the app.
|
||||||
@@ -257,7 +257,6 @@ public abstract class Getdown extends Thread
|
|||||||
*/
|
*/
|
||||||
protected void getdown ()
|
protected void getdown ()
|
||||||
{
|
{
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// first parses our application deployment file
|
// first parses our application deployment file
|
||||||
try {
|
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
|
// 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
|
// 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
|
// 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<>();
|
_toInstallResources = new HashSet<>();
|
||||||
_readyToInstall = false;
|
_readyToInstall = false;
|
||||||
|
|
||||||
// directly start the app with the noupdate flag
|
|
||||||
if (_noUpdate) {
|
|
||||||
log.info("Launching without update!");
|
|
||||||
launch();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// setStep(Step.START);
|
// setStep(Step.START);
|
||||||
for (int ii = 0; ii < MAX_LOOPS; ii++) {
|
for (int ii = 0; ii < MAX_LOOPS; ii++) {
|
||||||
// make sure we have the desired version and that the metadata files are valid...
|
// 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 _dead;
|
||||||
protected boolean _silent;
|
protected boolean _silent;
|
||||||
protected boolean _noUpdate;
|
|
||||||
protected boolean _launchInSilent;
|
protected boolean _launchInSilent;
|
||||||
|
protected boolean _noUpdate;
|
||||||
protected long _startup;
|
protected long _startup;
|
||||||
|
|
||||||
protected Set<Resource> _toInstallResources;
|
protected Set<Resource> _toInstallResources;
|
||||||
|
|||||||
Reference in New Issue
Block a user