| 1 |
|
| 2 |
INSTALL INSTRUCTIONS FOR Win32 Systems |
| 3 |
======================================= |
| 4 |
|
| 5 |
Author: "Sisyphus" - sisyphus1 at optusnet dot com dot au |
| 6 |
|
| 7 |
Last update to this file: Apr 10th 2006 |
| 8 |
|
| 9 |
Caveats |
| 10 |
======= |
| 11 |
|
| 12 |
|
| 13 |
Here's how to build the PGPLOT perl module on Win32 ... or at least |
| 14 |
here's one way to do it. There are no doubt other approaches that |
| 15 |
will work. |
| 16 |
|
| 17 |
These instructions relate to a native Win32 environment, NOT Cygwin. |
| 18 |
PGPLOT-2.19 should build straight out of the box on Cygwin if the pgplot C |
| 19 |
library can be found. I don't know what sort of graphics display Cygwin |
| 20 |
users have for running the test suite - they may also need to specify |
| 21 |
'/PNG'. |
| 22 |
|
| 23 |
|
| 24 |
From here on, I shall refer to the pgplot C library as "pgplot" - |
| 25 |
and to the perl module as "PGPLOT". |
| 26 |
|
| 27 |
============= |
| 28 |
PRELIMINARIES |
| 29 |
============= |
| 30 |
|
| 31 |
First up you need a pgplot C library against which to build PGPLOT. |
| 32 |
I've used Jose Fonseca's (MinGW-built) pgplot library available from |
| 33 |
http://www.kalinabears.com.au/w32perl/pgplot-5.2.2-mingw32.tar.bz2. |
| 34 |
|
| 35 |
It's an old port, but is adequate for building PGPLOT if you can't find |
| 36 |
a more recent port - and don't want to (or can't) build pgplot yourself. |
| 37 |
If you do want to build pgplot yourself using MinGW, then the diff at |
| 38 |
the following location might be useful to you: |
| 39 |
|
| 40 |
http://jrfonseca.home.dyndns.org/projects/gnu-win32/software/ported/patches/pgplot-5.2.2-mingw32.diff.gz |
| 41 |
|
| 42 |
Anyway, Fonseca's port of pgplot has all the files needed to build |
| 43 |
PGPLOT for both MinGW-built perl and MSVC++-built perl: |
| 44 |
|
| 45 |
pgplot/bin/cpgplot.dll |
| 46 |
pgplot/bin/pgplot.dll |
| 47 |
pgplot/bin/grfont.dat |
| 48 |
pgplot/include/cpgplot.h |
| 49 |
pgplot/lib/cpgplot.a |
| 50 |
pgplot/lib/pgplot.a |
| 51 |
|
| 52 |
The location of the 2 dll's (cpgplot.dll and pgplot.dll) needs to be added to the |
| 53 |
system path. |
| 54 |
|
| 55 |
We also need to set an environment variable so the system can find grfont.dat: |
| 56 |
|
| 57 |
set PGPLOT_FONT=\full_path\to_grfont.dat\grfont.dat |
| 58 |
|
| 59 |
On Win32 I don't have a decent graphics display, so I use PGPLOT's capability to write |
| 60 |
images to a png file. For that it's also necessary to add the location of libpng.dll and |
| 61 |
zlib.dll to the system path. (These can both be readily Googled if you don't have them.) |
| 62 |
|
| 63 |
The pgplot library needs to be found by the PGPLOT build process. To make sure that |
| 64 |
happens copy libcpgplot.a and libpgplot.a from Fonseca's library to X:\usr\lib. And copy |
| 65 |
cpgplot.h from Fonseca's library to X:\usr\include. (You'll need to replace X with |
| 66 |
whatever letter it is that denotes the drive you're building PGPLOT in - ie if your |
| 67 |
PGPLOT build directory is in the D drive, copy to D:\usr\lib and D:\usr\include |
| 68 |
respectively.) |
| 69 |
|
| 70 |
Install dmake (available from http://search.cpan.org/dist/dmake/) if you don't |
| 71 |
already have it and add the location of dmake.exe to your path. |
| 72 |
|
| 73 |
Install MinGW (available from http://www.mingw.org/download.shtml) if you don't |
| 74 |
already have it and add the MinGW\bin folder to your path. |
| 75 |
|
| 76 |
That should take care of the preliminaries. |
| 77 |
|
| 78 |
================ |
| 79 |
MINGW-BUILT PERL |
| 80 |
================ |
| 81 |
|
| 82 |
Having done the preliminaries: |
| 83 |
|
| 84 |
Install ExtUtils::F77-1.15 or later (from CPAN source). |
| 85 |
|
| 86 |
Then build PGPLOT by simply running (as per usual): |
| 87 |
|
| 88 |
perl Makefile.PL |
| 89 |
dmake |
| 90 |
dmake test (Here you'll be prompted to specify '/PNG' so that the tests can be written to |
| 91 |
png files and viewed at the conclusion of the test suite.) |
| 92 |
dmake install |
| 93 |
|
| 94 |
|
| 95 |
=========================================================== |
| 96 |
MSVC-BUILT PERL (including ActiveState and IndigoStar perl) |
| 97 |
=========================================================== |
| 98 |
|
| 99 |
Having done the preliminaries: |
| 100 |
|
| 101 |
Install Extutils::FakeConfig (according to the instructions in its readme). |
| 102 |
|
| 103 |
Install Extutils::F77-1.15 or later (from CPAN source) by running: |
| 104 |
|
| 105 |
perl -MConfig_m Makefile.PL |
| 106 |
dmake |
| 107 |
dmake test |
| 108 |
dmake install |
| 109 |
|
| 110 |
Then build PGPLOT by running: |
| 111 |
|
| 112 |
perl -MConfig_m Makefile.PL |
| 113 |
dmake |
| 114 |
dmake test (Here you'll be prompted to specify '/PNG' so that the tests can be written to |
| 115 |
png files and viewed at the conclusion of the test suite.) |
| 116 |
dmake install |
| 117 |
|
| 118 |
For ActiveState builds 815 and later it should NOT be necessary to install |
| 119 |
ExtUtils::FakeConfig as these builds should work seamlessly with dmake and the MinGW |
| 120 |
compiler. If you have such a build of ActiveState perl and opt to NOT install |
| 121 |
ExtUtils::FakeConfig, then do NOT supply the '-MConfig_m' option whenever running |
| 122 |
'perl Makefile.PL'. Other than that, the procedure is identical. |
| 123 |
|
| 124 |
If that involves too much work there are ppm packages (which include the png and zlib |
| 125 |
dll's) for PGPLOT available from http://www.kalinabears.com.au/w32perl/pgplot.html |
| 126 |
(for both perl-5.6 and perl-5.8). |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|