JAL-3594 Allow setting of getdownappbase and getdowndistdir properties for DEVELOP...
[jalview.git] / src / jalview / bin / Cache.java
index 13532e7..50db03b 100755 (executable)
@@ -310,6 +310,9 @@ public class Cache
     }
   };
 
+  /* build Properties (not all saved to .jalview_properties) */
+  public static Properties buildProperties = new Properties();
+
   /** Default file is ~/.jalview_properties */
   static String propertiesFile;
 
@@ -633,8 +636,13 @@ public class Cache
       String buildDetails = resolveResourceURLFor("/.build_properties");
       URL localJarFileURL = new URL(buildDetails);
       InputStream in = localJarFileURL.openStream();
-      applicationProperties.load(in);
+      buildProperties.load(in);
       in.close();
+      applicationProperties.put("BUILD_DATE",
+              buildProperties.get("BUILD_DATE"));
+      applicationProperties.put("INSTALLATION",
+              buildProperties.get("INSTALLATION"));
+      applicationProperties.put("VERSION", buildProperties.get("VERSION"));
     } catch (Exception ex)
     {
       System.out.println("Error reading build details: " + ex);
@@ -1651,6 +1659,11 @@ public class Cache
     String distDir = System.getProperty("getdowndistdir");
     if (appbase == null)
     {
+      appbase = buildProperties.getProperty("GETDOWNAPPBASE");
+      distDir = buildProperties.getProperty("GETDOWNAPPDISTDIR");
+    }
+    if (appbase == null)
+    {
       appbase = releaseAppbase;
       distDir = "release";
     }