# Chapter 1 - Installing HTMLDOC

This chapter describes the steps needed to install HTMLDOC on your system from any of the source or binary distributions.

## Installing a Binary Distribution

HTMLDOC binary distributions are available for a number of UNIX and Windows platforms.

### Requirements

HTMLDOC requires approximately 2MB of disk space and one of the following environments:

- AIX 4.3 or higher
- Compaq Tru64 UNIX 4.0 or higher
- FreeBSD 4.5 or higher
- HP-UX 10.20 or higher
- IRIX 5.3 or higher
- Linux 2.0 or higher
- MacOS X 10.2 or higher
- Microsoft Windows 95/98/Me/NT 4.0/2000/XP
- Solaris 2.5 or higher

HTMLDOC may compile and run on other platforms, however we have not tested nor do we provide support for platforms other than those listed previously.

### Installing HTMLDOC under Debian GNU/Linux

Run the following command to install HTMLDOC under Debian GNU/Linux:

    % dselect install htmldoc-version-linux-2.0-intel.deb ENTER

### Uninstalling HTMLDOC under Debian GNU/Linux

Run the following command to remove HTMLDOC under Debian GNU/Linux:

    % dselect remove htmldoc ENTER

### Installing HTMLDOC under Red Hat Linux

Run the following command to install HTMLDOC under Red Hat Linux:

    % rpm -i htmldoc-version-linux-2.0-intel.rpm ENTER

### Uninstalling HTMLDOC under Red Hat Linux

Run the following command to remove HTMLDOC from your Red Hat Linux system:

    % rpm -e htmldoc ENTER

### Installing HTMLDOC under UNIX

Run the following commands to install HTMLDOC under UNIX:

    % gunzip htmldoc-version-platform.tar.gz ENTER
    % tar xf htmldoc-version-platform.tar ENTER
    % ./setup ENTER

Substitute the correct version and platform strings as appropriate.

### Uninstalling HTMLDOC under UNIX

Run the following command to remove HTMLDOC from your UNIX system:

    % /etc/software/htmldoc.remove ENTER

### Installing HTMLDOC under MacOS X

Double-click on the HTMLDOC package in the finder and follow the installer prompts.

### Installing HTMLDOC under Windows

HTMLDOC is provided in a self-extracting installation file under Windows. Double-click on the setup icon to install HTMLDOC under Windows.

### Uninstalling HTMLDOC under Windows

Open the Control Panel window and double-click on the Add/Remove Software icon. When the available software list is displayed, select HTMLDOC and click on the Remove button.

## Installing HTMLDOC from the Source Distribution

The complete source to HTMLDOC is available to build HTMLDOC for different directories, architectures, or operating systems.

### Requirements

HTMLDOC requires ANSI C and C++ compilers - recent versions of GCC/EGCS work fine. To build the GUI you'll also need:

- Fast Light Tool Kit ("FLTK"), version 1.0 or newer (version 1.1.x preferred).
- X11 libraries, R5 or higher (needed to build under UNIX and OS/2 only.)

Secure (https) URL support can be enabled via the OpenSSL library. You should use at least version 0.9.6.

### Configuring the UNIX Source

HTMLDOC uses a configuration script produced by GNU autoconf to configure itself for your system. If your ANSI C compiler is not called cc or gcc, set the `CC` environment variable to the name and path of your ANSI C compiler:

    % setenv CC /path/to/compiler ENTER         [C Shell]
    % CC=/path/to/compiler; export CC ENTER     [Bourne/Korn Shell]

Similarly, if your C++ compiler is not called CC, gcc, c++, or g++, set the `CXX` environment variable to the name and path of your C++ compiler:

    % setenv CXX /path/to/compiler ENTER        [C Shell]
    % CXX=/path/to/compiler; export CXX ENTER   [Bourne/Korn Shell]

Then run the following command to configure HTMLDOC for installation in the default directories:

    % ./configure ENTER

The default configuration will install HTMLDOC in the /usr/bin directory with the data files under /usr/share/htmldoc and the documentation and on-line help under /usr/share/doc/htmldoc. Use the `--prefix` option to change the installation prefix to /usr/local:

    % ./configure --prefix=/usr/local ENTER

If the FLTK library is not installed in a standard location for your compilers, use the `--with-fltk-includes` and `--with-fltk-libs` options to point to the FLTK library:

    % ./configure --with-fltk-libs=/path/to/fltk/lib \
            --with-fltk-includes=/path/to/fltk ENTER

Finally, if the OpenSSL library is not installed in a standard location for your compilers, use the `--with-openssl-includes` and `--with-openssl-libs` options to point to the OpenSSL library:

    % ./configure --with-openssl-libs=/path/to/openssl/lib \
            --with-openssl-includes=/path/to/openssl ENTER

### Compiling under UNIX

HTMLDOC is built from a Makefile in the distribution's main directory. Simply run the "make" command to build HTMLDOC:

    % make ENTER

If you get any fatal errors, please subscribe to the HTMLDOC mailing list and send a copy of the make/compiler output to "htmldoc@easysw.com" for assistance. Please note the version of HTMLDOC that you are using as well as any pertinent system information (operating system, OS version, compiler, etc.)

To subscribe to the HTMLDOC mailing list, send a message to "majordomo@easysw.com" with the text:

    subscribe htmldoc

in the message body. You must subscribe to the list to post questions and comments.

### Installing under UNIX

To install HTMLDOC simply run the "make install" command:

    % make install ENTER

If you are installing in a restricted directory like /usr then you'll need to be logged in as root.

### Compiling with Visual C++

A Visual C++ 6.0 workspace file and associated project files are included in the source distribution under the "visualc" directory. Open the workspace file "htmldoc.dsw", adjust the FLTK include and project file locations, and then build the HTMLDOC target.

### Installing with Visual C++

The Windows installation package is created using InstallShield for Visual C++ 6. The "visualc/HTMLDOC" directory contains the installation information for HTMLDOC needed to build a binary distribution with InstallShield.

To install HTMLDOC without InstallShield, create an installation directory and copy the htmldoc.exe executable, the afm directory, the data directory, and the doc directory to it.

Then use the regedit program to create the following two string entries:

`HKEY_LOCAL_MACHINE\Software\Easy Software Products\HTMLDOC\data`
  C:\installation\directory
`HKEY_LOCAL_MACHINE\Software\Easy Software Products\HTMLDOC\doc`
  C:\installation\directory\doc