This file describes the various ways you can run PARI/GP in a win32 environment
(Windows 95,98,2000,NT). For earlier versions of Windows, see README.DOS.

WARNING: The only way to have a fully functional GP is to install GNU/Linux.
It's a one hour job to install a minimal Linux system from current Linux
distributions. Dual boot systems (LILO, Grub) enable you to have Windows and
Linux coexisting peacefully on your hard drive, so you can have the best of
both worlds. The other solutions stick to the Windows environment, suffer
from various problems, and are discussed in the rest of this document.

It is also advised, but not mandatory to get the Documentation and Examples
archive

  ftp://megrez.math.u-bordeaux.fr/pub/pari/dos/GPDxxx.ZIP

which contains the following directories:

  + DOC, containing
     - user's manual, tutorial and reference card in TeX format You will
       need TeX to compile them (see www.CTAN.org for how to get TeX). The
       same documents are available in PDF and PostScript format from

         ftp://megrez.math.u-bordeaux.fr/pub/pari/manuals/

       (and so is the "readline" reference manual if you use one of the
        solutions providing line editing)

     - the script GPHELP (translates Pari documentation to plain text and
       handles "apropos help"), which requires PERL (see www.CPAN.org for how
       to get it). You may have to fix paths in the first lines of the script.
       Set your GPRC file so that the 'help' default points to the place where
       you deposit GPHELP (see MISC/GPRC.DOS).

  + MISC, containing
      - a sample GPRC file (GPRC.DOS). Copy it to C:\_GPRC (or \etc\GPRC) and
        adapt it to your needs
      - a sample alias file (GPALIAS).

  + EXAMPLES, containing sample GP scripts, and a sample INPUTRC file (for
    readline, you can use it to customize GP line editing).

NOTE: all .gz and .ZIP files are compressed files (or archives). Extract them
[ with Winzip (see www.winzip.com) for instance ] once you have downloaded them.

%%%%%%%%%%%%%  Solution 1: The CYGWIN library  %%%%%%%%%%%%%%%%%%%%%%%%

This is the preferred solution, but it requires fetching the cygwin
compatibility library first. We provide this file as 

  ftp://megrez.math.u-bordeaux.fr/pub/pari/windows/cygwin1.dll.gz

(size: 268k, 600k uncompressed). It needs to be downloaded only once.
Then fetch the GP binary

  ftp://megrez.math.u-bordeaux.fr/pub/pari/windows/gp-xxx.exe.gz
 
and put it in the same directory as the dll (or dump the dll somewhere in
your PATH, as you prefer).

PROBLEMS:
  * no hi-res plots, most graphics commands disabled (you can still output to
    a PostScript file)

NOTE: if you're interested in a Unix-style development environment under
Windows, you might wish to download the full cygwin distribution from
  http://sources.redhat.com/cygwin/
You will then be able to build GP from the generic (unix) sources [ using the
standard './Configure; make' idiom ]

%%%%%%%%%%%%%  Solution 2: Build GP from sources   %%%%%%%%%%%%%%%%%%%

That is, the generic Unix sources

  ftp://megrez.math.u-bordeaux.fr/pub/pari/pari.tgz

It is quite easy to build (or cross-build) GP and readline from the unix
sources using mingw, but if you have installed mingw you probably also have
Cygwin, in which case it's even easier to use the generic build process as
under Unix, as mentioned in Solution 1. IMPORTANT NOTE: you have to type
"make gp-sta" since Configure defaults to building the dynamic version, which
doesn't work (see below) [this is a bug in Configure].

So I'm assuming from now on that you're stuck with something which is not
gcc. If you have MSVC, then check Odos/README.MSVC in the archive which
explains in detail all steps involved. If you have some other compiler, and
succeed in compiling GP, we'd be quite happy to hear from you.

PROBLEMS:
  * no hi-res plots, most graphics commands disabled (you can still output to
    a PostScript file).

  * slower than gcc-compiled binaries.

  * no extended on-line help

  * no line-editing facilities (GP not linked with readline).

%%%%%%%%%%%%%  What about library programming ? %%%%%%%%%%%%%%%%%%%%%%

Building a static LIBPARI.A Library should be straightforward. It is possible
but painful to build a LIBPARI.DLL and .def file using gcc-mingw (or
gcc-cygwin) + dlltool and some header magic; but GP itself, when linked with
such a library, crashes on startup.  No other decent compiler being available
to us, we won't provide prebuilt libraries. For this one, you're on your own.
Sorry.
