public enum Step
{
UPDATE_JAVA(10),
- VERIFY_METADATA(15, 65, 95),
- DOWNLOAD(40),
+ //VERIFY_METADATA(15, 65, 95),
+ VERIFY_METADATA(15, 45, 90),
+ DOWNLOAD(50),
PATCH(60),
- VERIFY_RESOURCES(70, 97),
- REDOWNLOAD_RESOURCES(90),
- UNPACK(98),
- LAUNCH(99);
+ //VERIFY_RESOURCES(70, 97),
+ VERIFY_RESOURCES(30, 60),
+ //REDOWNLOAD_RESOURCES(90),
+ REDOWNLOAD_RESOURCES(70),
+ //UNPACK(98),
+ UNPACK(90),
+ //LAUNCH(99);
+ LAUNCH(100);
/** What is the final percent value for this step? */
public final List<Integer> defaultPercents;
/** Whether progress text should be hidden or not. */
public final boolean hideProgressText;
+ /** Whether the splash screen should update non-asynchronously before being shown. */
+ public final boolean progressSync;
+
+ /** Whether the splash screen should update non-asynchronously after being shown. */
+ public final boolean progressSyncAfterShown;
+
/** Whether the splash screen should retain focus. */
public final boolean keepOnTop;
", pb=" + progressBar + ", srect=" + status + ", st=" + statusText +
", shadow=" + textShadow + ", err=" + installError + ", nrect=" + patchNotes +
", notes=" + patchNotesUrl + ", stepPercentages=" + stepPercentages +
- ", hideProgressText=" + hideProgressText + ", keepOnTop=" + keepOnTop + ", minShow=" + minShowSeconds +
+ ", hideProgressText=" + hideProgressText + ", keepOnTop=" + keepOnTop + ", progressSync=" + progressSync +
+ ", progressSyncAfterShown=" + progressSyncAfterShown + ", minShow=" + minShowSeconds +
", displayAppbase=" + displayAppbase + ", displayVersion=" + displayVersion + "]";
}
this.progress = config.getRect("ui.progress", new Rectangle(5, 5, 300, 15));
this.progressText = config.getColor("ui.progress_text", Color.BLACK);
this.hideProgressText = config.getBoolean("ui.hide_progress_text");
+ this.progressSync = config.getBoolean("ui.progress_sync");
+ this.progressSyncAfterShown = config.getBoolean("ui.progress_sync_after_shown");
this.keepOnTop = config.getBoolean("ui.keep_on_top");
this.displayAppbase = config.getBoolean("ui.display_appbase");
this.displayVersion = config.getBoolean("ui.display_version");
try {
Config tmpConfig = null;
+ Map<String, Object> tmpData = new HashMap<>();
if (_locatorFile.exists()) {
tmpConfig = Config.parseConfig(_locatorFile, opts);
+ // appbase is sanitised in HostWhitelist
+ Map<String, Object> tmpConfigData = tmpConfig.getData();
+ if (tmpConfig != null) {
+ for (Map.Entry<String, Object> entry : tmpConfigData.entrySet()) {
+ String key = entry.getKey();
+ Object value = entry.getValue();
+ String mkey = key.indexOf('.') > -1 ? key.substring(key.indexOf('.') + 1) : key;
+ if (Config.allowedReplaceKeys.contains(mkey) || Config.allowedMergeKeys.contains(mkey)) {
+ tmpData.put(key, value);
+ }
+ }
+ } else {
+ log.warning("Error occurred reading config file", "file", _locatorFile);
+ }
} else {
log.warning("Given locator file does not exist", "file", _locatorFile);
}
- // appbase is sanitised in HostWhitelist
- Map<String, Object> tmpData = new HashMap<>();
- for (Map.Entry<String, Object> entry : tmpConfig.getData().entrySet()) {
- String key = entry.getKey();
- Object value = entry.getValue();
- String mkey = key.indexOf('.') > -1 ? key.substring(key.indexOf('.') + 1) : key;
- if (Config.allowedReplaceKeys.contains(mkey) || Config.allowedMergeKeys.contains(mkey)) {
- tmpData.put(key, value);
- }
- }
locatorConfig = new Config(tmpData);
} catch (Exception e) {