This file explains how to compile wcd for DOS, Windows, and OS/2
with the Open Watcom C compiler.

For Unix/Linux/Cygwin compile instructions see file UNIX.txt
For DJGPP/MinGW/EMX compile instructions see file GCC_DOS.txt
For MS Visual C++ compile instructions see file VISUALC.txt

For how to install the program on DOS, Windows, OS/2 see file INST_DOS.txt.


Prerequisites
=============

* Watcom C compiler.
* pdcurses  : CRT screen handling and optimization package
* perl      : Practical Extraction and Report Language (perlpod)

Needed for building packages:

* zip         : compressor-archiver


Watcom C
========

There is a free version of the Watcom C compiler available
at http://www.openwatcom.org/

It includes cross compilation. From a Windows machine you
can also create DOS and OS/2 programs.


PDCurses
========

To build wcd with PDCurses interface you need to have the PDCurses
library installed. Get PDCurses at http://sourceforge.net/projects/pdcurses/
Compile it and copy the library file into the proper \lib directory
and the curses.h file in the \watcom\h directory.

The Windows versions of wcd require PDCurses with wide character support,
also if you build a non-Unicode version of wcd for Windows.


Perl
====

Perl is required for the generation of the manual in text and html format. The
wcd source package in DOS text format includes all documentation files. When
you have the Unix package, which does not include the manuals, or just want to
recreate the manuals, then you need a 'perl' installation.

There exist ready-to-run perl packages.

    DOS:
        DJGPP project: http://www.delorie.com/djgpp/
        ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/perl588b.zip

    Windows:
        Strawberry Perl: http://strawberryperl.com/
        Active Perl    : http://www.activestate.com/activeperl


Problems on Windows VISTA/7
===========================

To be able to run `wmake install' you may need adminstrator rights. You can get
a Command Prompt with administrator rights if you right click on the Command
Prompt icon and select `run as administrator'.


Basic Installation
==================

dos16    : DOS 16 bit
dos32    : DOS 32 bit
dos32bsh : DOS 32 bit for BASH
win32    : Windows 32 bit console version.
win32zsh : Windows 32 bit for WinZsh or MSYS.
win32psh : Windows 32 bit PowerShell version.
os2      : OS/2 32 bit console version.

Change to the appropriate directory `dos16', `dos32', `dos32bsh', `win32',
`win32zsh', `win32psh', 'os2'. Then change to the `watcom' subdirectory when
it is present.


Build wcd:

  Type `wmake' to compile the package.

Install wcd:

  Type `wmake install' to install the package.

  `wmake install' will also compile the package if it wasn't done yet.

To start clean:

  Type `wmake clean'

Mostly clean:

  The target `mostlyclean' will preserve the documentation files.

  Type `wmake mostlyclean'


Curses interface
================

The default interface is pdcurses.

win32* uses PDCurses with wide character support (CURSES=pdcursesw)

To disable CURSES and compile with stdio interface, reset the CURSES variable:

  wmake CURSES=


Graphical tree
==============

By default the graphical tree is drawn with line drawing
characters. If these are not available on your system you
can set ASCII_TREE=1 so that ASCII characters are used instead.

  wmake ASCII_TREE=1


Unicode support
===============

To activate Unicode support add UCS=1 to the wmake command:

  wmake UCS=1

This requires a (pd/n)curses installation with wide character support.
Not supported for DOS and OS/2 versions of wcd.

Unicode is only supported in Windows PowerShell, and Command Prompt
on Windows 7 or higher.


Installation Names
==================

By default `wmake install' will install the program in /usr/bin, the
language files in /usr/share/locale and the man file in
/usr/share/man. You can specify an installation prefix other than
`/usr' by giving `wmake' the option `prefix=PATH'.


Example:

  wmake clean
  wmake
  wmake install prefix=c:\Users\waterlan

The default prefixes are the same for Watcom C as for GCC.

dos16    : The default PREFIX is c:\dos
dos32    : The default PREFIX is c:\dos32
dos32bsh : The default PREFIX is c:\dos32
win32    : The default PREFIX is c:\usr\local
win32zsh : The default PREFIX is c:\usr\local
win32psh : The default PREFIX is c:\usr\local
os2      : The default PREFIX is c:\usr


manual pages in html and text format
====================================

To create the manuals in txt and html format type:

  wmake doc

To install the manuals in txt and html format type:

  wmake install-doc



distribution package
====================

After installation a ready-to-run binary distribution package can be created.

  Type `wmake dist' to create the package.

