Version changes
authoramwaterhouse <Andrew Waterhouse>
Mon, 11 Jul 2005 15:56:39 +0000 (15:56 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 11 Jul 2005 15:56:39 +0000 (15:56 +0000)
src/jalview/bin/Cache.java
src/jalview/gui/Desktop.java
src/jalview/gui/SplashScreen.java

index 8e5e240..e2477d9 100755 (executable)
@@ -52,7 +52,6 @@ public class Cache
     public static void loadProperties(String propsFile)\r
     {\r
         applicationProperties = new Properties();\r
-\r
         propertiesFile = propsFile;\r
         if (propsFile == null)\r
         {\r
@@ -63,6 +62,8 @@ public class Cache
         {\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
@@ -96,16 +97,14 @@ public class Cache
         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
@@ -120,11 +119,18 @@ public class Cache
 \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
index ee9eb27..cd4608c 100755 (executable)
@@ -443,11 +443,11 @@ public class Desktop extends jalview.jbgui.GDesktop
                                               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
index 515b2a6..9f089a3 100755 (executable)
@@ -131,13 +131,14 @@ public class SplashScreen extends JPanel implements Runnable
                      "; 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