WorldForge Update Tool (WFUT)
----------------------------

Software updater tool for WorldForge applications.
WFUT allows the automatic updating of "channels" which are available on a server. The channels are specified by an XML file (which also has an XSL file associated with it for viewing in a web browser). Each channel has an associated XML document listing the files available in the channel and the current version number.WFUT compares this file list with a similar file on the local machine to determine what files need updating.
WFUT performs a CRC32 check on each file downloaded before overwriting any existing ones. WFUT keeps a list of files downloaded in a temporary file (which will not be completely valid XML due to missing end tag) in something happens during an update which does not allow the local list to be saved.

Requirements
------------
WFUT has been built on Java 1.4.1 but may run on earlier versions. WFUT will mostly run under gcj 4.1 with a few minor GUI issues.


Building
--------

There are three ways to build WFUT. By using the standard autotools, you can compile using gcj. A file called Makefile.jdk is located in the src directory for building with a Sun SDK located in the current path.

And recently maven build files have been added (maven jar to build for maven 1.x or mvn package for maven 2.x)
The addition of maven allows you to build eclipse project files by running "maven eclipse" or "mvn eclipse" for maven 2.x

Configuration Options
---------------------

WFUT can read a config file called "wfut_config.properties", the path of which needs to be specified in the classpath.


 read out of the current directory. Entries are in the form of "key = value", with one entry per line.

Current config items are;
serverRoot = Server root from which WFUT operates in. Example "serverRoot = http://www.ecs.soton.ac.uk/wfut/"

Alternatively, parameters can be set on the command line. If using a jar file, you can specify args in the form;

java -Dname1=value1 -Dname2=value2 -jar WFUT.jar ...

or if using a native build you can set parameters in the GCJ_PROPERTIES environment variable before running the binary;

GCJ_PROPERTIES="name1=value1 name2=value2"

Usage
-----

*NOTE* This application reads and writes all files in the current directory. This can be problematic when running WFUT through a browser using java web start as the current directory can be the browser install directory.

Launch GUI;
java -jar WFUT.jar

Command line;
java -jar WFUT.jar list

java -jar WFUT.jar update channel1 {channel2 channel3 ...}

or with a config file in the current dir

java -cp .:WFUT.jar WFUT/Client update channel1

It is possible to use two separate directories, one in a read-only location (e.g. installed from a system package) and another to download any updates into (e.g. the home dir).

java -jar WFUT.jar ref /read-only/channel_name dest $HOME/.hidden_dir/ update channel_name

This will look in /read-only/channel_name for an existing wfut.xml for the channel. It will then look for a dir called channel_name in $HOME/.hidden_dir/ to download the updates into. If the current dir is already $HOME/.hidden_dir then this and the "dest" parameter can be omitted.

If the current directory is a channel (it contains a wfut.xml file), then you can pass . as the channel name when updating. WFUT will get the real channel name from the wfut.xml file.

EMAIL:  wfut@simongoodall.co.uk
