# Chapter 1 - Installing HTMLDOC

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

## Requirements

HTMLDOC requires ANSI C and C++ compilers - recent versions of GCC work fine. Secure (https) URL support can be enabled via the OpenSSL library. You should use at least version 0.9.8a.

## Compiling under UNIX/Linux

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 a different directory such as /usr/local:

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

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

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 report them on the `htmldoc.general` newsgroup at:

        http://www.easysw.com/newsgroups.php

Please note the version of HTMLDOC that you are using as well as any pertinent system information such as the operating system, OS version, compiler, and so forth. Omitting this information may delay or prevent a solution to your problem.

Once you have compiled the software successfully, you may install HTMLDOC by running the following 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 on Windows Using Visual C++.NET

A Visual C++.NET solution file and associated project files are included in the source distribution under the "visualc" directory. Open the solution file "htmldoc.sln" and then build the HTMLDOC target.

Note: You also need to download the OpenSSL library in order to compile HTMLDOC with Visual C++.NET.

## Installing with Visual C++.NET

To install HTMLDOC with Visual C++.NET, create an installation directory and copy the htmldoc.exe executable, the fonts 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