reportRsyncCommand = true
break
- case ~/^SCRATCH(|-\w*)$/:
+ case ~/^SCRATCH(|-[-\w]*)$/:
getdown_channel_name = CHANNEL
getdownDir = getdown_channel_name + "/" + JAVA_VERSION
getdown_app_base = getdown_channel_base + "/" + getdownDir
def additional_compiler_args = []
// these are getdown.txt properties defined dependent on the JAVA_VERSION
def getdown_alt_java_min_version
+def getdown_alt_java_max_version
// this property is assigned below and expanded to multiple lines in the getdown task
def getdown_alt_multi_java_location
// this property is for the Java library used in eclipse
compile_source_compatibility = 1.8
compile_target_compatibility = 1.8
getdown_alt_java_min_version = getdown_alt_java8_min_version
+ getdown_alt_java_max_version = getdown_alt_java8_max_version
getdown_alt_multi_java_location = getdown_alt_java8_txt_multi_java_location
eclipse_java_runtime_name = "JavaSE-1.8"
} else if (JAVA_VERSION.equals("11")) {
compile_source_compatibility = 11
compile_target_compatibility = 11
getdown_alt_java_min_version = getdown_alt_java11_min_version
+ getdown_alt_java_max_version = getdown_alt_java11_max_version
getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
eclipse_java_runtime_name = "JavaSE-11"
additional_compiler_args += [
compile_source_compatibility = JAVA_VERSION
compile_target_compatibility = JAVA_VERSION
getdown_alt_java_min_version = getdown_alt_java11_min_version
+ getdown_alt_java_max_version = getdown_alt_java11_max_version
getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
eclipse_java_runtime_name = "JavaSE-11"
additional_compiler_args += [
copy {
from buildProperties
rename(buildPropertiesFile, getdown_build_properties)
- into project.ext.getdownWebsiteDir
+ into project.ext.getdownAppDir
}
- getdownWebsiteResourceFilenames += getdown_build_properties
+ getdownWebsiteResourceFilenames += getdown_app_dir+"/"+getdown_build_properties
// go through properties looking for getdown_txt_...
def props = project.properties.sort { it.key }
- props.put("getdown_txt_java_min_version", getdown_alt_java_min_version)
- props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location)
+ if (getdown_alt_java_min_version.length() > 0) {
+ props.put("getdown_txt_java_min_version", getdown_alt_java_min_version)
+ }
+ if (getdown_alt_java_max_version.length() > 0) {
+ props.put("getdown_txt_java_max_version", getdown_alt_java_max_version)
+ }
+ props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location)
props.put("getdown_txt_appbase", getdown_app_base)
props.each{ prop, val ->
def fromDir = getdownWebsiteDir + (getdownWebsiteDir.endsWith("/")?"":"/")
def toDir = getdown_rsync_dest + "/" + getdownDir + (getdownDir.endsWith("/")?"":"/")
println "LIKELY RSYNC COMMAND:"
- println "rsync -avh --delete '$fromDir' '$toDir'"
+ println "mkdir -p '$toDir'\nrsync -avh --delete '$fromDir' '$toDir'"
if (RUNRSYNC == "true") {
exec {
commandLine "mkdir", "-p", toDir
<parent>
<groupId>com.threerings.getdown</groupId>
<artifactId>getdown</artifactId>
- <version>1.8.3-1.0_JVL</version>
+ <version>1.8.3-1.1_JVL</version>
</parent>
<artifactId>getdown-ant</artifactId>
<parent>
<groupId>com.threerings.getdown</groupId>
<artifactId>getdown</artifactId>
- <version>1.8.3-1.0_JVL</version>
+ <version>1.8.3-1.1_JVL</version>
</parent>
<artifactId>getdown-core</artifactId>
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
-import com.sun.management.OperatingSystemMXBean;
-import java.lang.management.ManagementFactory;
import jalview.bin.MemorySetting;
{
/** The name of our configuration file. */
public static final String CONFIG_FILE = "getdown.txt";
+
+ /** Dir where a backup config file might reside */
+ public static final String BACKUP_CONFIG_DIR = "install";
/** The name of our target version file. */
public static final String VERSION_FILE = "version.txt";
DOWNLOAD(50),
PATCH(60),
//VERIFY_RESOURCES(70, 97),
- VERIFY_RESOURCES(30, 60),
+ VERIFY_RESOURCES(30, 90),
//REDOWNLOAD_RESOURCES(90),
- REDOWNLOAD_RESOURCES(70),
+ REDOWNLOAD_RESOURCES(75),
//UNPACK(98),
- UNPACK(90),
+ UNPACK(95),
//LAUNCH(99);
LAUNCH(100);
this.name = config.getString("ui.name");
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.hideProgressText = config.getBoolean("ui.hide_progress_text");
+ this.progressSync = config.getBoolean("ui.progress_sync_before_shown");
+ 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");
public Application (EnvConfig envc) {
_envc = envc;
_config = getLocalPath(envc.appDir, CONFIG_FILE);
+ _backupConfig = getLocalPath(new File(envc.appDir.getAbsolutePath()+File.separator+BACKUP_CONFIG_DIR), CONFIG_FILE);
}
/**
*/
public Resource getConfigResource ()
{
+ Resource res = null;
try {
- return createResource(CONFIG_FILE, Resource.NORMAL);
+ res = createResource(CONFIG_FILE, Resource.NORMAL);
} catch (Exception e) {
- throw new RuntimeException("Invalid appbase '" + _vappbase + "'.", e);
+ log.warning("Invalid appbase '" + _vappbase + "'.", e);
+ }
+ if (res == null) {
+ try {
+ String backupConfig = BACKUP_CONFIG_DIR + File.separator + CONFIG_FILE;
+ log.warning("Could not read config '"+CONFIG_FILE+"'. Attempting to use backup '"+backupConfig+"'");
+ res = createResource(backupConfig, Resource.NORMAL);
+ } catch (Exception ex) {
+ throw new RuntimeException("Invalid appbase in backup config'" + _vappbase + "'.", ex);
+ }
}
+ return res;
}
/**
} catch (Exception e) {
log.warning("Failure reading config file", "file", _config, e);
}
+ if (config == null || config.getString("appbase") == null || config.getString("appbase").isEmpty()) {
+ try {
+ config = Config.parseConfig(_backupConfig, opts);
+ log.warning("Using backup config file", "appdir", getAppDir(), "backupConfig", _backupConfig.getAbsoluteFile());
+ } catch (Exception e) {
+ log.warning("Failure reading backup config file", "file", _backupConfig, e);
+ }
+ }
// see if there's an override config from locator file
Config locatorConfig = createLocatorConfig(opts);
log.warning("Failure reading locator file", "file", _locatorFile, e);
}
- log.info("Returning locatorConfig", locatorConfig);
-
return locatorConfig;
}
protected final EnvConfig _envc;
protected File _config;
+ protected File _backupConfig;
protected Digest _digest;
protected long _version = -1;
<parent>
<groupId>com.threerings.getdown</groupId>
<artifactId>getdown</artifactId>
- <version>1.8.3-1.0_JVL</version>
+ <version>1.8.3-1.1_JVL</version>
</parent>
<artifactId>getdown-launcher</artifactId>
}
});
- if (! _addedStatusLayer) {
+ if (_status != null && ! _addedStatusLayer) {
_layers.add(_status, Integer.valueOf(2));
_addedStatusLayer = true;
initInterface();
try {
EventQueue.invokeAndWait(r);
//r.run();
- log.warning("INVOKEANDWAIT", "shownContainer", _shownContainer);
} catch (Exception e) {
log.warning("Tried to invokeAndWait but couldn't. Going to invokeLater instead", "Exception", e.getMessage());
EventQueue.invokeLater(r);
}
} else {
EventQueue.invokeLater(r);
- log.warning("INVOKELATER", "ifc", _ifc, "shownContainer", _shownContainer);
//r.run();
}
<groupId>com.threerings.getdown</groupId>
<artifactId>getdown</artifactId>
<packaging>pom</packaging>
- <version>1.8.3-1.0_JVL</version>
+ <version>1.8.3-1.1_JVL</version>
<name>getdown</name>
<description>An application installer and updater.</description>
getdown_txt_strict_comments = true
getdown_txt_title = Jalview
getdown_txt_ui.name = Jalview
-getdown_txt_ui.progress_sync = true
+getdown_txt_ui.progress_sync_before_shown = true
getdown_txt_ui.progress_sync_after_shown = false
getdown_txt_ui.keep_on_top = true
getdown_txt_ui.display_appbase = true
getdown_txt_ui.install_error = http://www.jalview.org/faq/getdownerror
getdown_txt_ui.mac_dock_icon = resources/images/jalview_logos.ico
getdown_alt_java8_min_version = 01080000
+getdown_alt_java8_max_version = 01089999
getdown_alt_java11_min_version = 11000000
+getdown_alt_java11_max_version =
getdown_alt_java11_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre11.jar,[linux-amd64] /getdown/jre/linux-jre11.tgz,[mac os x] /getdown/jre/macos-jre11.tgz
getdown_alt_java8_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre1.8.tgz,[linux-amd64] /getdown/jre/linux-jre1.8.tgz,[mac os x] /getdown/jre/macos-jre1.8.tgz
JRE_installs = /Users/bsoares/Java/installs
getdown_channel_base = http://www.jalview.org/getdown
getdown_channel_name = SCRATCH-DEFAULT
getdown_app_dir_release = release
-getdown_install_dir = install
getdown_app_dir_alt = alt
+getdown_install_dir = install
getdown_rsync_dest = /Volumes/jalview/docroot/getdown
reportRsyncCommand =
RUNRSYNC=false