Building ToolboxLib
===================

1. Introduction
---------------

The building of ToolboxLib is automated, but not as automated as possible. 
This document describes how to build toolboxlib and what needs to be done by
hand.


2. Generating the source files
------------------------------

This is described in the 'MethodGen' document.


3. Generating the makefile
--------------------------

This is described in the 'MakeGen' document.


4. Setting paths
----------------

Before you start a build you will need to set 'ToolboxLib$Path' to point at
the directory where the sources are kept.


5. Building toolboxlib
----------------------

To build toolboxlib you will need to select the directory where the sources
are kept and then type :-

 	amu -f makefile
 	
If you are building from scratch then this will take a long time.


6. Editing toolboxlib
---------------------

The following needs to be taken into account when you edit any of the sources
or header files of toolboxlib need editing :-

- The structures, definitions etc... in the header files were written by
hand.

- The header file 'toolbox' and its sources (sources.toolbox.c.*) are written
by hand.  If any changes are needed here then you will need alter the header
file or sources by hand.

- The header file 'window' contains two SWI veneers that are written by hand. 
These are 'Window_GetPointerInfo' and 'Window_WimpToToolbox'.  If any changes
need to be made to the sources or there prototypes in the header file, then
these will need to be done by hand.  If you re-save the prototypes for the
methods then the prototypes for the above will get overwritten.  If this does
happen they can be extracted from the sources.

- In the header file 'window' the veneer for Window_RemoveKeyboardShortcuts
gets truncated and the final character is missed off.  This causes an error
at compile time if it is not corrected after source or prototype generation. 
You will need to alter the source and/or header file by hand if any changes
are made.

- If you change any of the class definition files and need to alter the
prototypes in the header file then you should save the prototypes from
MethodGen WITHOUT the 'C Header Wrappings' option turned on.  To alter the
prototypes you will need cut out the relevant section from the header and
save in the new prototypes from makegen.

- The header file for 'Gadgets' contains all the veneers and definitions for
all the gadgets.  As the different gadgets types have different definition
files then care with cutting and pasting needs to be taken when alter the
header file is done.


7. Setting the version number
-----------------------------

When any changes are maded to toolboxlib the version number should be
incremeted.  The version number is stored in
'toolboxlib.sources.version.s.version'.  The version number is exported as
symbol 'toolboxlib_version'.
