launcher/src/wombat/launcher/Wombat.java
private static void loadVersionFile() {
		try {
			if (!(VersionFile.exists() && VersionFile.canRead())) {
				if (JOptionPane.NO_OPTION == 
						JOptionPane.showConfirmDialog(
								null, 
								"Wombat has not been installed.\n\n" + 
									"Do you want to install it to this directory:\n" + 
									CurrentDir.getAbsolutePath() + "\n" + 
									"\n" + 
									"NOTE: You will not be able to launch Wombat without installing.", 
								"Install Wombat?", JOptionPane.YES_NO_OPTION))
					System.exit(0);
				
				installAll();
			}
				
			// Scan the file.
			Scanner s = new Scanner(VersionFile);
			while (s.hasNextLine()) {
				String line = s.nextLine().trim();
				if ("".equals(line)) continue;
				Version v = new Version(line);
				if (v.Filename != null) Versions.add(v);
			}
			s.close();
			
			// Check the launcher version.
			if (Version.Constants.containsKey("Launcher")) {
				Version myLauncherVersion = new Version("Launcher," + LauncherVersion);
				if (myLauncherVersion.compareTo(Version.Constants.get("Launcher")) < 0)
					JOptionPane.showMessageDialog(
							null, 
							"Your wombat launcher (wombat.jar) is out of date.\n" +
									"Please download a new copy.",
							"Wombat Launcher Error",
							JOptionPane.INFORMATION_MESSAGE);
			}
			
		} catch(Exception e) {
			throw new Error("Unable to read version file:\n" + e.getMessage());
		}
	}
/**
	 * Load the version file from the current directory.
	 * 
	 * If it doesn't exist, proceed to do a full install.
	 */
Load the version file from the current directory.

If it doesn't exist, proceed to do a full install.
Load the version file from the current directory . If it doesn ' t exist proceed to do a full install .
private static void loadVersionFile() {
		try {
			if (!(VersionFile.exists() && VersionFile.canRead())) {
				if (JOptionPane.NO_OPTION == 
						JOptionPane.showConfirmDialog(
								null, 
								"Wombat has not been installed.\n\n" + 
									"Do you want to install it to this directory:\n" + 
									CurrentDir.getAbsolutePath() + "\n" + 
									"\n" + 
									"NOTE: You will not be able to launch Wombat without installing.", 
								"Install Wombat?", JOptionPane.YES_NO_OPTION))
					System.exit(0);
				installAll();
			}
			Scanner s = new Scanner(VersionFile);
			while (s.hasNextLine()) {
				String line = s.nextLine().trim();
				if ("".equals(line)) continue;
				Version v = new Version(line);
				if (v.Filename != null) Versions.add(v);
			}
			s.close();
			if (Version.Constants.containsKey("Launcher")) {
				Version myLauncherVersion = new Version("Launcher," + LauncherVersion);
				if (myLauncherVersion.compareTo(Version.Constants.get("Launcher")) < 0)
					JOptionPane.showMessageDialog(
							null, 
							"Your wombat launcher (wombat.jar) is out of date.\n" +
									"Please download a new copy.",
							"Wombat Launcher Error",
							JOptionPane.INFORMATION_MESSAGE);
			}
		} catch(Exception e) {
			throw new Error("Unable to read version file:\n" + e.getMessage());
		}
	}
private static void loadVersionFile ( ) { try { if ( ! ( VersionFile . exists ( ) && VersionFile . canRead ( ) ) ) { if ( JOptionPane . NO_OPTION == JOptionPane . showConfirmDialog ( null , "Wombat has not been installed.\n\n" + "Do you want to install it to this directory:\n" + CurrentDir . getAbsolutePath ( ) + "\n" + "\n" + "NOTE: You will not be able to launch Wombat without installing." , "Install Wombat?" , JOptionPane . YES_NO_OPTION ) ) System . exit ( 0 ) ; installAll ( ) ; } Scanner s = new Scanner ( VersionFile ) ; while ( s . hasNextLine ( ) ) { String line = s . nextLine ( ) . trim ( ) ; if ( "" . equals ( line ) ) continue ; Version v = new Version ( line ) ; if ( v . Filename != null ) Versions . add ( v ) ; } s . close ( ) ; if ( Version . Constants . containsKey ( "Launcher" ) ) { Version myLauncherVersion = new Version ( "Launcher," + LauncherVersion ) ; if ( myLauncherVersion . compareTo ( Version . Constants . get ( "Launcher" ) ) < 0 ) JOptionPane . showMessageDialog ( null , "Your wombat launcher (wombat.jar) is out of date.\n" + "Please download a new copy." , "Wombat Launcher Error" , JOptionPane . INFORMATION_MESSAGE ) ; } } catch ( Exception e ) { throw new Error ( "Unable to read version file:\n" + e . getMessage ( ) ) ; } }
Load the version file from the current directory.
Load the version file from the current directory .
// Scan the file. // Check the launcher version.