   INSTALLING flP5 - The fast Light Parallel Port Production PIC Programmer
   ------------------------------------------------------------------------
              by Francesco Bradascio <fbradasc@katamail.com>

0. Table of contents
--------------------

  I. Requirements for the installation from sources

    I.1 For All platforms
    I.2 For Windows only

  II. Linux installation from sources

  III. Windows installation from sources

    III.1 Preparation
    III.2 Build
    III.3 Installation kit


I. Requirements for the installation from sources
-------------------------------------------------

  I.1 For All platforms
  ---------------------

  - FLTK 1.1.3 or later, the fast light toolkit
    Download the sources from: www.fltk.org

    Before compiling the FLTK 1.1.3 you have to apply a little patch.

    Edit the file fltk-1.1.3/src/Fl_Preferences.cxx and substitute the line
    #1100 from:

       for ( ; nd; nd = nd->next_ )

     to:

       for ( ; nd; np = nd, nd = nd->next_ )
                   ^^^^^^^^^

    Linux installation:

      as normal user> configure; make
      as root       > make install

    Windows installation:

      open in Visual Studio 6.0 the file fltk-1.1.3/visualc/fltk.dsw and build
      the fltkdll project

  - CMake, a multiplatform makefile tool
    Download from: http://www.cmake.org/CMake/HTML/Download.html

    Linux installation:

      as normal user> configure; make
      as root       > make install

    Windows installation:

      You can download and install the CMSetup.exe file.

  I.2 For Windows only
  --------------------

  - Visaul C/C++ 6.0

  - Tarma Installer 2.45, an easy to use Windows-compliant software installer.
    Download from: http://www.tarma.com

    Installation:

      Download and install the tin2.exe file.

  - DlPortIO, the DriverLINX's parallel port driver
    You don't have to do nothing it's included inside the flP5 sources
    distribution.

II. Linux installation from sources
-----------------------------------

Go to /where/you/estracted/flP5 and do:

  as normal user> cmake; make
  as root       > make install

The default installation path is /usr/local, you can override this setting
in three ways:

1. by prepending a prefix path:

     make install DESTDIR=prefix/path (i.e. make install DESTDIR=`pwd`)
  
   You can do that as a normal user if the prefix/path is accessible.
   In this way you will have prefix/path/usr/local and so on.

2. by setting a new default installation path in the CMakeFlags.cfg file:

   search the CMAKE_CONFIGURE_INSTALL_PREFIX variable and change /usr/local
   with what you want.

3. by using both the above methods.

III. Windows installation from sources
--------------------------------------

  III.1 Preparation
  -----------------

  - Add into the system path environment variable the directory:

      where:\you\installed\fltk-1.1.3\visualc

  - In a DOS terminal cd to the flP5 source directory and run cmake
    This command will create the VC/C++ project.

  - Run Visual Studio, you need to adjust some IDE settings by telling it where
    to find the fltk-1.1.3 headers and library, to do so:

    - open the "Directories" page from the "Options.." diaog

        Tools -> Options... -> Directories

    - From the "Show directories for:" chice select:

      - "Executable files" and add to the list:

          where:\you\installed\fltk-1.1.3\fluid
          where:\you\installed\fltk -1.1.3\visualc

      - "Include files" and add to the list:

          where:\you\installed\fltk-1.1.3

      - "Library files" and add to the list:

          where:\you\installed\fltk-1.1.3\lib
          where:\you\installed\fltk-1.1.3\visualc
          where:\you\installed\fltk-1.1.3\test

      - "Source files" and add to the list:

          where:\you\installed\fltk-1.1.3

  III.2 Build
  -----------

  Now you can open the flP5.dws workspace and build the flP5 project (to make
  the installation package you have to build the "Win32 Release" version).

  III.3 Installation kit
  ----------------------

  Now that the flP5.exe is built you have to prepare the installation kit.

  - Open the where:\you\estracted\flP5\win32\flP5.tin file.

  - select "() Build" from the tree on the left of the Tarma Installer window.

  - Choose the "Check" button, on the right, it will tell you which files
    can't be found, probably they could be fltkdll.dll and/or MSVCP60.DLL,
    you can see that at the bottom, in the messages list.

    - Select, from the messages list, the error message telling about the
      missing file, the "Project - Files" page will be shown.

    - click on the "[...]" button of the "Source path:" field and browse the
      system to select the missing file. If the missing file was fltkdll.dll
      you can go in:

        where:\you\installed\fltk-1.1.3\visualc

      If the missing file was MSVCP60.DLL you can go in the Windows system
      directory:

        C:\WINNT\System32 for WinNT/2000/XP
        C:\Windows\System for Win9x

    - Repeat the above two steps for all the missing files.

  - select "() Build" from the tree on the left and then choose the "Build"
    button, on the right, if it's all ok you can save the project and quit
    from the Tarma Installer.
    Inside the where:\you\estracted\flP5\win32 you will find the flP5Setup.exe,
    just run it to install flP5.
