This file explains how to compile wcd for Windows
with the Microsoft Visual C++ compiler.

For Unix/Linux/Cygwin compile instructions see file UNIX.txt
For DJGPP/MinGW/EMX compile instructions see file GCC_DOS.txt
For Watcom C compile instructions see file WATCOMC.txt

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


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

* Visual C++ compiler.
* pdcurses  : CRT screen handling and optimization package


Optional
========

For rebuilding the documenation.

* perl      : Practical Extraction and Report Language (perlpod)

Needed for building packages:

* zip       : compressor-archiver https://sourceforge.net/projects/infozip/


Visual C++
==========

You can get a free community version via this web page:
https://www.visualstudio.com/vs/community/


PDCurses
========

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

Build PDCurses width wide character support (WIDE=Y), also when you build a wcd
version without Unicode support. A non-Unicode Windows version of wcd will
still use Unicode for the interface. Name the library "pdcursesw.lib".

Support for resizing of ConEmu or Windows 10 console requires PDCurses version
3.7 or higher.


Perl
====

Perl is required for the generation of the manual in text and html format. The
wcd source package includes all documentation files. When you want to recreate
the manuals, you need a 'perl' installation.

There exist ready-to-run perl packages.

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


Problems on Windows VISTA and higher
====================================

To be able to run `nmake 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
==================

win32    : Windows 32 bit console version.
win32psh : Windows 32 bit PowerShell version.
win32zsh : Windows 32 bit for WinZsh or MSYS.
win64    : Windows 64 bit console version.
win64psh : Windows 64 bit PowerShell version.
win64zsh : Windows 64 bit for WinZsh or MSYS.

Change to the appropriate directory `win32', `win32psh', `win32zsh',
`win64', `win64psh', or `win64zsh' directory. Then change to the `vc'
subdirectory.


Build wcd:

  Type `nmake' to compile the package.

Install wcd:

  Type `nmake install' to install the package.

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

To start clean:

  Type `nmake clean'


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

The default interface is pdcurses.

Wcd uses PDCurses with wide character support (CURSES=pdcursesw)

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

  nmake 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.

  nmake ASCII_TREE=1


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

Unicode support is by default enabled.
To disable add UCS= to the make command:

  nmake UCS=


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

By default `nmake 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 `nmake' the option `prefix=PATH'.


Example:

  nmake mostlyclean
  nmake
  nmake install prefix=c:\Users\waterlan

The default prefixes are the same for as for GCC.

win32    : The default PREFIX is c:\usr\local
win32zsh : The default PREFIX is c:\usr\local
win32psh : The default PREFIX is c:\usr\local
win64    : The default PREFIX is c:\usr\local64
win64psh : The default PREFIX is c:\usr\local64
win64zsh : The default PREFIX is c:\usr\local64


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

To create the manuals in txt and html format type:

  nmake doc

To install the manuals in txt and html format type:

  nmake install-doc



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

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

  Type `nmake dist' to create the package.
