/*
 * FREE 2000
 *
 * Copyright (c) Jason Kitcat, University of Warwick
 *
 * jeep@thecouch.org   http://www.thecouch.org/free/
 *
 * Knoll Cottage, Sutton Place, Nr.Abinger, Dorking, Surrey RH5 6RN United Kingdom
 *
 * Tel: 07956 886 508  Fax: 0870 052 7114
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program (gpl.txt); if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */

INSTALL

======================
- Installing FREE 1.4
======================

Before you can run FREE you will need to make some alterations to the code.

As of this version you need to run the FreeInstall program for a full, secure
installation of FREE. To run the installation:

-MacOS Users:
Double-click the FreeInstall.app icon

-Other OS Users:
Run FreeInstall.Install from FreeInstall.jar in the FREE-1.3 directory

On a typical Solaris setup with Java SDK 1.2 you would do it with a command like
this (change the paths according to your system):

"/usr/java1.2/bin/java -cp FreeInstall.jar:log4j-full.jar FreeInstall.Install"

Other command-line systems will use the same or nearly the same syntax.

(Note that you'll need a Java 1.1.x compiler and Virtual Machine to do
all this, see http://java.sun.com for more info)


======================
- Finishing Off
======================

By using the installation program, FreeInstall, a key security file in
the Util directory will have changed. This encodes some important security info
which is unique to your implementation. It is stored, along with other common
FREE files in freeutil.jar - a copy is included if you want to quickly run FREE for
demo purposes. For secure implementation you MUST create your own copy of freeutil.jar
and here's how (NB those using CodeWarrior can do it from the IDE):

1) Rename the existing freeutil.jar to freeutil.old.jar

2) In the Util directory create a "Free" sub-directory, followed by a "util" 
	subdirectory of "Free". Copy the two .java files in Util into the new
	"util" subdirectory. (Note that the case of these new directory names is
	very important!)
	
3) Compile the files, in our typical Solaris implementation this would be with:

	"/usr/java1.2/bin/javac *.java"
	
	which would be run when you are in FREE-1.4/Util/Free/util/ directory.
	
4) Create a jar file, in our typical Solaris setup we would type:

	"/usr/java1.2/bin/jar -cf freeutil.jar *.class"

	which would be run when you are in FREE-1.4/Util/Free/util/ directory.
	
5) Finish off by copying the new freeutil.jar to the FREE-1.4 directory.


>>>>>>>>>>>>>>>> JNLP NOTE <<<<<<<<<<<<<<<<<<<<

If you plan on using JNLP to distribute the FREE client then you need to do
one minor code change until we alter the install system.

Open FreeClient/FClient.java and remove line 122:

	"splash.setVisible(true);"
	
(or comment it out!)

Now carry on... when done read JNLP-INSTALL for more.

>>>>>>>>>>>>>>>> EOF JNLP NOTE <<<<<<<<<<<<<<<<<<<<


Now you need to compile the main FREE programs which all depend on the freeutil.jar
file we've just made.

To compile & run FREE programs you need to make sure that you set a compile time
classpath which includes the FREE-1.4 directory as well as a copy of swingall.jar
and the following files included with FREE:

-freeutil.jar
	A new copy of common FREE files
-hsql.jar
	The Hypersonic SQL database system
-log4j-full.jar
	The log4j logging system
-cryptix32.jar
	Encryption & security algorithms
	
Most Java installations will automatically have access to swingall.jar and the directory
they are being run from. MacOS users will experience some differences - make sure you
have a copy of swingall.jar (available from http://java.sun.com or CodeWarrior CD) in

	"System Folder:Extensions:MRJ Libraries:MRJ Classes:"
	
Make sure you are in the "FREE-1.4" directory before you compile the 3 FREE programs.
(Again CodeWarriors users should just use the IDE).

In our example Solaris system you would compile using the following commands:

	"/usr/java1.2/bin/javac -classpath freeutil.jar:hsql.jar:log4j-full.jar Free/*.java"
	
	(Note that on Systems like Windows the classpath is seperated with a ";")
	
Run the command again but:

	"/usr/java1.2/bin/javac -classpath freeutil.jar:hsql.jar:log4j-full.jar ERServer/*.java"
	
And one more time for FreeClient:
	
	"/usr/java1.2/bin/javac -classpath freeutil.jar FreeClient/*.java"
	
And that's it! You should be all done.... Read on if you want to learn how to run the
programs.


======================
- Running FREE
======================

Running Java programs can be bit tricky to the uninitiated because you need to specify
the Package name and also the main class name. Now I'm the first to admit that the FREE
package names aren't all brilliant but I'm going to stick with them for the time being.
Anyway here are the names you need to invoke for the Java Virtual Machine:

Regional/Totaller Server		Free.RTServer
Electoral Roll Server			ERServer.ERServer
Voting Client program			FreeClient.FClient

So in our Solaris system that would be done (respectively):

	"/usr/java1.2/bin/java -cp freeutil.jar:hsql.jar:log4j-full.jar:$CLASSPATH Free.RTServer"
	
	"/usr/java1.2/bin/java -cp freeutil.jar:hsql.jar:log4j-full.jar:$CLASSPATH ERServer.ERServer"

	"/usr/java1.2/bin/java -cp freeutil.jar:$CLASSPATH FreeClient.FClient"
	
Why all that "$CLASSPATH" stuff? Because specifying a runtime classpath overrides the 
system classpath settings, but we don't want that to happen. So what doess $CLASSPATH
say? In this example it contains:

	"./:/package/java/lib/:/local/share/arch/solaris2/package/warwick-a1/lib/classes"
	
Your programs should be up and running now!

You still need to populate databases and build keys. Check the "Getting Started" document in
the Docs directory of your installation or on the website (filename: gs1.html) for information
on how to do this.

Once that's been done make sure you read the hints 'n tips and advice in the "Running Elections"
file (filename: re1.html) - have a good election!

Visit http://www.thecouch.org/free/ for more help and advice.
	
++++

Problems, bugs and updates for this file and FREE as a whole should go to jeep@thecouch.org

EOF INSTALL