public static void loadProperties(String propsFile)\r
{\r
applicationProperties = new Properties();\r
-\r
propertiesFile = propsFile;\r
if (propsFile == null)\r
{\r
{\r
FileInputStream fis = new FileInputStream(propertiesFile);\r
applicationProperties.load(fis);\r
+ applicationProperties.remove("LATEST_VERSION");\r
+ applicationProperties.remove("VERSION");\r
fis.close();\r
}\r
catch (Exception ex)\r
String jnlpVersion = System.getProperty("jalview.version");\r
String codeVersion = getProperty("VERSION");\r
\r
+\r
if(codeVersion==null)\r
{\r
// THIS SHOULD ONLY BE THE CASE WHEN TESTING!!\r
codeVersion = "Test";\r
jnlpVersion = "Test";\r
- setProperty("jalview.version", jnlpVersion);\r
- setProperty("VERSION", codeVersion);\r
}\r
\r
-\r
// jnlpVersion will be null if we're using InstallAnywhere\r
if(jnlpVersion==null)\r
{\r
\r
line = line.substring(line.indexOf("value=")+7);\r
line = line.substring(0, line.lastIndexOf("\""));\r
- setProperty("jalview.version", line);\r
+ jnlpVersion = line;\r
+ break;\r
}\r
}catch(Exception ex)\r
- { setProperty("jalview.version", codeVersion); }\r
+ { jnlpVersion = codeVersion; }\r
}\r
+\r
+ System.out.println("Version: "+codeVersion);\r
+ System.out.println("Latest : "+jnlpVersion);\r
+\r
+ setProperty("LATEST_VERSION", jnlpVersion);\r
+ setProperty("VERSION", codeVersion);\r
}\r
\r
/**\r
jalview.bin.\r
Cache.getProperty("BUILD_DATE"));\r
\r
- if (!jalview.bin.Cache.getProperty("jalview.version").equals(\r
+ if (!jalview.bin.Cache.getProperty("LATEST_VERSION").equals(\r
jalview.bin.Cache.getProperty("VERSION")))\r
{\r
message.append("\n\n!! Jalview version "\r
- + jalview.bin.Cache.getProperty("jalview.version")\r
+ + jalview.bin.Cache.getProperty("LATEST_VERSION")\r
+ " is available for download from http://www.jalview.org !!\n");\r
\r
}\r
"; Last updated: " + jalview.bin.Cache.getProperty("BUILD_DATE"),\r
180, y);\r
\r
- if (!jalview.bin.Cache.getProperty("jalview.version").equals(\r
+ if (!jalview.bin.Cache.getProperty("LATEST_VERSION").equals(\r
jalview.bin.Cache.getProperty("VERSION")))\r
{\r
// If the jnlp version and the code version differ, warn the user\r
g.setColor(Color.red);\r
+\r
g.drawString("!! Jalview version " +\r
- jalview.bin.Cache.getProperty("jalview.version")\r
+ jalview.bin.Cache.getProperty("LATEST_VERSION")\r
+ " is available for download from http://www.jalview.org !!",\r
50, y += fontSize + 10);\r
y += 5;\r