          WWWOFFLE - World Wide Web Offline Explorer - Version 2.5a
          =========================================================


There are only 10 steps required to install WWWOFFLE from the source code to a
fully working and tested program.  If you are using a binary release (Win32)
then you should skip over the first 3 steps.

Compilation
-----------

The following ten steps should be sufficient to demonstrate WWWOFFLE running.

1) Edit the Makefile and set the following:
        The name & port of the server (LOCALHOST) - default localhost:8080
        The path for installation (INSTDIR)       - default /usr/local
        The spool directory (SPOOLDIR)            - default /var/spool/wwwoffle
        The configuration file location (CONFDIR) - default /var/spool/wwwoffle
        The optional web page language (LANG)     - default English only
        The compiler options (CC and CFLAGS).
   (The Makefile includes some machine specific options for non-Linux machines
    that may need to be uncommented.)

2) Compile the programs
     make all

        **** Important ****
   From this version of WWWOFFLE onwards I will not be supplying the C source
   code that is generated from the lex source files (*.l).  This will mean that
   you need a working version of lex or flex installed to compile WWWOFFLE.
        **** Important ****


3) Install the programs and create the spool directory
     make install

        **** Important ****
   If you already use WWWOFFLE then you should stop the existing version running
   before doing the installation of the new version.
        **** Important ****

   You should look out for any output from make that is prefixed with
   'WWWOFFLE:' this is important information and indicates that the installation
   process has found something that requires your action during the install.

        **** Important * If you currently use version 2.0/2.1 ****
    You *MUST* run the program endian-cache to convert your cache from the broken
    version 2.0/2.1 format to version 2.2 format.  Read the file CONVERT for details.
        **** Important * If you currently use version 2.0/2.1 ****

        **** Important * If you currently use version 1.x ****
    You *MUST* run the program upgrade-cache to convert your cache from version
    1.x format to version 2.x format.  Read the file UPGRADE for details.
        **** Important * If you currently use version 1.x ****


Configuration
-------------

4) Edit the configuration file
   wwwoffle.conf

        **** Important * If you must use an external HTTP proxy ****
    You will need to add the name of the proxy and the port number to the
    configuration file wwwoffle.conf, read it for instructions.
        **** Important * If you must use an external HTTP proxy ****

        **** Important * If you currently use version 1.x ****
    The configuration file wwwoffle.conf has changed, the file CHANGES.CONF
    explains the differences since version 1.3.
        **** Important * If you currently use version 1.x ****

        **** Important * If you currently use version 2.x ****
    The configuration file wwwoffle.conf has changed, the file CHANGES.CONF
    explains the differences and upgrade-config.pl can fix them.
        **** Important * If you currently use version 2.x ****

5) Start the WWWOFFLE demon running.
   wwwoffled -c wwwoffle.conf

6) Start your WWW Browser and set up localhost:8080 as the proxy.
   Disable caching between sessions within the browser.


Testing
-------

7) a) Connect to the internet
   b) Tell the WWWOFFLE demon that you are online
        wwwoffle -online
   c) Start browsing
   d) Tell the WWWOFFLE demon that you are offline
        wwwoffle -offline
   e) Disconnect from the internet

8) Go back and browse the pages again while not connected, follow some different
   links this time (you will see a WWWOFFLE server message in the browser).

9) a) Connect to the internet
   b) Tell the WWWOFFLE demon that you are online
        wwwoffle -online
   c) Tell the WWWOFFLE demon to fetch the new pages
        wwwoffle -fetch
   d) Tell the WWWOFFLE demon that you are offline
        wwwoffle -offline
   e) Disconnect from the internet

10)a) Go to http://localhost:8080/index/ and find the newly downloaded pages.
   b) Browse the new pages that have just been fetched.




Compile Time Options
--------------------

In the file wwwoffle.h there are a number of extra compile time options that you
may want to change.


The first three are the compiled in defaults for the options in the StartUp
section of the wwwoffle.conf file.  They are also used as the compiled in
defaults for the wwwoffle program.

/*+ The default port number to use for the http proxy demon. +*/
#define DEF_HTTP_PORT 8080

/*+ The default port number to use for the WWWOFFLE control. +*/
#define DEF_WWWOFFLE_PORT 8081

/*+ The default spool directory. +*/
#define DEF_SPOOL "/var/spool/wwwoffle"

/*+ The default configuration file directory. +*/
#define DEF_CONF "/var/spool/wwwoffle"


The next four limit the number of connections that wwwoffled will accept at a
time and the number of servers that it will fork in response to this.  A total
of MAX_SERVERS, including up to MAX_FETCH_SERVERS when 'wwwoffle -fetch' is run.
These are options in wwwoffle.conf, but the absolute maximum values can be
changed here as well as the default values.

/*+ The absolute maximum number of servers to fork in total. +*/
#define MAX_SERVERS 64
/*+ The default total number of servers to fork. +*/
#define DEF_MAX_SERVERS 8

/*+ The absolute maximum number of servers to fork for fetching previously
    requested pages. +*/
#define MAX_FETCH_SERVERS 48
/*+ The default number of servers to fork for fetching pages. +*/
#define DEF_MAX_FETCH_SERVERS 4


The next one is the number of prevtime directories that are created to allow a
history back beyond the latest time online.  If this number is changed then the
file /var/spool/wwwoffle/html/messages/IndexLastTime-Tail.html must be edited
for the links to these to be visible.

/*+ The number of pretime directories to create (lasttime history). +*/
#define NUM_PREVTIME_DIR 3


The next one is the size of the buffer that is used when reading data from the
cache or from the network socket.

/*+ The size of the buffer to use when reading from the cache or a socket. +*/
#define READ_BUFFER_SIZE 1024


The next two give the permissions that are used for the creation of directories
and files in the cache (Don't forget the leading '0' for octal).

/*+ The default permission for creating directories. +*/
#define DEF_DIR_PERM  0755
/*+ The default permission for creating files. +*/
#define DEF_FILE_PERM 0644
