summaryrefslogtreecommitdiff
path: root/obsolete/graphics/metapost/MetaPost4OS2/install
blob: 0a29c9d984c4e37cd79b31db02f7b93ad7fe3cbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
On behalf of the original OS/2 implementor Peter Miller
(miller@hac2arpa.hac.com) I'm pleased to announce the availabilitry of
MetaPost 0.62 for OS/2.

From John D. Hobby's original announcement of the public release of
MetaPost: "The MetaPost language is based on METAFONT, but it outputs
PostScript and it has the facilities for including TeX output and
manipulating the resuling picture."

Peter announced his implementation on the emtex-discussion list on Jan 9, 1995:

    "I compiled it for OS/2 using Eberhard Mattes' emx+gcc 0.9a (patch level 
    2), nearly straight out of the box. I don't know yet how good the port is
    because I haven't really tested it that much (...). The examples and the
    manual run fine, but I didn't run the trip tests yet. It probably only 
    runs on an HPFS drive (an 'mp.pool' file gets created in the process). 
    BTW, this demonstrates what a great tool emx+gcc is for porting Unix 
    applications to OS/2.
    (...)
    In any event, it sounds like a robust port to OS/2 (certainly HPFS) may 
    not be that difficult. (...) I'd be willing to share anything I have 
    (patch files or executables) with anyone interested, but who knows what 
    I've missed with such a few changes to the Unix code."

When I contacted him early march it passed the trip-test. Since then I
installed and tested his implementation. When I asked him to make a package 
ready for distribution on CTAN he suggested that I should do this. 
So here it is.


Files
=====

The package consists of:

  1. mp_exe.zip   -   mp.exe
  2. config.mp    -   text file containing Peter's metapost setup for CONFIG.SYS
  3. mp_lib1.zip  -   containing the contents of the mp/bin library:
                      mp/bin/dmp.exe
                      mp/bin/dvitomp.exe
                      mp/bin/makempx (sh script for MS-Shell 2.3)
                      mp/bin/mptotex.exe
                      mp/bin/mptotr.exe
                      mp/bin/newer.exe
                      mp/bin/troffmpx (there was an error in this one)
  4. mp_lib2.zip  -   containing the remaining contents of the mp/ library:
                      mp/boxes.mp
                      mp/charlib/*
                      mp/examples.mp
                      mp/format.mp
                      mp/graph.mp
                      mp/marith.mp
                      mp/mfplain.mem
                      mp/mfplain.mp
                      mp/mp.pool
                      mp/plain.mem
                      mp/plain.mp
                      mp/psfonts.map
                      mp/rboxes.mp
                      mp/sarith.mp
                      mp/string.mp
                      mp/TEX.mp
                      mp/texnum.mp
                      mp/trchars.adj
                      mp/trfonts.map
                      mp/troffnum.mp
  5. mp_test.zip  -   contains a little test file to test the installation.
                      mp/test/examples.mp
                      mp/test/mpintro.bib
                      mp/test/mpintro.ps  (processed mpintro.dvi with dvips)
                      mp/test/mpintro.tex
                      mp/test/processed/* (processed examples.mp with my
                                          installation)

MP uses an Unix shell-script during runtime, so you have to install

  6. mh_sh23.zip  -   DataLogic Shell Version 2.3

If you do not have at least emtex beta12 you also have to install the latest
emx-runtime

  7. emxrt.zip    -   emx runtime package

To compile the original sources, which can be found on CTAN at
tex-archive/graphics/metapost, you need

  8. tftopl.zip   -   containing tftopl.exe
  9. pltotf.zip   -   containing pltotf.exe
 10. tangle.zip   -   containing tangle.exe
 11. web2c.zip    -   containing web2c.exe
 12. patches.zip  -   containing the patches Peter applied to the original
                      sources
                      patches.pem
                      README.pem



Installation
============

The installation procedure describes the OS/2 installation. For a DOS
installation the DOS-part is at the end of this description.

For unpacking of the zip-files you should use a port of Info-ZIP's unzip. If
you have to use pkunzip use pkunzip 2.04g or later and use the -d option to
restore the subdirectory structure.

    1. Install emxrt.zip (emx 0.9a FIX 02 or later) if you do not have emtex
       beta12 or later. For OS/2 it should be sufficient to put the dll-files
       into a directory thats in your LIBPATH.

REM ***** ENVIRONMENT FOR EMX (needed for recompiling etc)
SET C_INCLUDE_PATH=e:/emx/include;e:/usr/include;
SET LIBRARY_PATH=e:/emx/lib;e:/usr/lib;
SET CPLUS_INCLUDE_PATH=e:/emx/include/cpp;e:/emx/include;e:/usr/include;
SET PROTODIR=e:/emx/include/cpp/gen
SET INFOPATH=e:/emacs/19.27/info;e:/emx/info;e:/usr/info;g:/info
SET EMXBOOK=emxdev.inf+libref.inf+gnudev.inf+bsddev.inf
SET PMREF=pmfun.inf+pmgpi.inf+pmhok.inf+pmmsg.inf+pmrel.inf+pmwin.inf+pmwkp.inf
SET HELPNDX=epmkwhlp.ndx+helpndx.ndx+emxbook.ndx
SET EMXOPT=-re
SET GCCLOAD=5
SET GCCOPT=-pipe

REM ***** ENVIRONMENT FOR GNU MAKE
SET MAKE_SHELL=e:/bin/sh.exe


    2. Install MH_SH23B.ZIP. This archive contains several executables
       (16- and 32-bit versions for DOS and OS/2). Read the accompaning
       installation instructions in the INSTALL-file. I suggest using
       shemx.exe and renaming it to sh.exe

       Peter Miller used a minimum installation, which is:
       a.  Install 'profile.sh' in your HOME directory, which is
           defined in your CONFIG.SYS.  Remove all lines from it
           except for:

            #!sh
            BETA=V205Beta
            DATE=`date '+%.2y%.2m%.2d'`
            export MAILBOX EXINIT TERMCAP TERM LOGNAME MAIL ...
            export MAILCHECK MAILBOX LINK TIMEIN TIMEOUT BETA

       b.  Install 'profile.etc' as 'x:/etc/profile.sh', where 'x' is
           your boot drive.  Delete all lines except:

            #!sh
            HISTFILE=e:/etc/history.sh
            export EXINIT PATH TERM TZ HISTFILE

       c.  Install 'extend.lst' in your HOME directory, and put the
           following in your CONFIG.SYS

            SET EXTENDED_LINE=${HOME}/extend.lst

       d.  Install 'sh.ini' in the same directory you put sh.exe, and
           change its 'RootDrive' line to indicate the boot drive.  My
           boot drive is E:, so I set RootDrive to 5.

    3. Modify your CONFIG.SYS according to the supplied CONFIG.MP and set the
       environment for emTeX and MetaPost. Note that this is valid for the
       betatest EmTeX configuration prior to March 20, 1995!

REM ***** ENVIRONMENT FOR EMTEX
SET EMTEXDIR=e:/emtex
SET TEXINPUT=e:\emtex\texinput!!;g:\lib\emtex\texinput
    REM SET EMTEXOPT
    REM SET EMTEXED
    REM SET TEXDATA=E:\EMTEX\DATA
    REM SET TEXINPUTS=E:/EMTEX/TEXINPUT;G:/LIB/EMTEX/TEXINPUT
    REM SET TEXFMT=E:\EMTEX\TEXFMTS
    REM SET BTEXFMT=E:\EMTEX\BTEXFMTS
SET TEXTFM=e:\emtex\tfm;e:\emtex\texfonts\tfm;g:\lib\emtex\tfm
    REM SET TEXFONTS=.;E:\EMTEX\TEXFONTS\TFM;G:\LIB\EMTEX\TFM
SET MFINPUT=e:\emtex\mfinput;g:\lib\emtex\mfinput
    REM SET MFBAS=E:\LIB\EMTEX\MFBASES
    REM SET BMFBAS=E:\EMTEX\BMFBASES
SET MFJOB=e:\emtex\mfjob;g:\lib\emtex\mfjob
SET BIBINPUT=g:\lib\emtex\bibinput
SET DVIDRVINPUT=g:\lib\emtex\doc;g:\lib\emtex\doc\english
SET DVIDRVFONTS=e:\emtex\texfonts;g:\lib\emtex\texfonts
SET DVIDRVGRAPH=g:\lib\emtex\doc\gr@rr
SET MFJOBOPT=/3
SET TEXCONFIG=e:/emtex/ps;g:/lib/emtex/ps
SET DVIPSHEADERS=e:/emtex/ps

REM ***** ENVIRONMENT FOR METAPOST
SET MPINPUTS=.;e:/usr/lib/mp
SET MFINPUTS=e:/emtex/mfinput;g:/lib/emtex/mfinput
SET TEXFONTS=.;e:/emtex/tfm;e:/emtex/texfonts/tfm;g:/lib/emtex/tfm
SET MPXCOMMAND=sh /usr/lib/mp/bin/makempx
SET TEX=tex386.exe
    REM SET TROFF=
SET MPMEMS=.;/usr/lib/mp
SET MPPOOL=.;/usr/lib/mp
SET MPEDITOR=emacsclient
SET TEXVFONTS=e:/emtex/texfonts/vf


    4. Reboot to make the changes valid.

    5. Install MetaPost.
       a.   Unpack MP.ZIP and put mp.exe in a directory that's in your path.
       b.   Create a directory e:\usr and use unzip to unpack MP_LIB1.ZIP
            and MP_LIB2.ZIP.
            This will produce three directories:

                e:\usr\lib\mp
                e:\usr\lib\mp\bin
                e:\usr\lib\mp\charlib

    6. If you would like to use another directory structure you have to
       modify your CONFIG.SYS and the file MAKEMPX (lines 1-7).


    7. Here's my installation:

       I have installed the MetaPost-library in e:/lib and modified MAKEMPX as
       follows:

            #!/unix/sh

            # PATH is used for echo, cat, rm, mv, as well as tex, latex
            # MPLIB is where newer, mptotex, and dvitomp are installed
            PATH=e:/unix\;d:/emtex/bin
            MPLIB=e:/lib/mp/bin
            DOTEX=${TEX:-tex386}


       This is the relevant portion of my CONFIG.SYS:

            SET MPINPUTS=.;e:/lib/mp
            SET MFINPUTS=D:/EMTEX/MFINPUTS/BASE
            SET TEXFONTS=D:/EMTEX/TEXTFMS1;D:/EMTEX/TEXTFMS2;E:/EMTEX/PSTFMS.OLD;D:/EMTEX/PSTFMS;
            SET MPXCOMMAND=sh /lib/mp/bin/makempx
            SET TEX=tex386.exe
            SET MPMEMS=.;/lib/mp
            SET MPPOOL=.;/lib/mp
            SET MPEDITOR=t
            SET TEXVFONTS=e:/emtex/vf.old

       (I have installed LaTeX2e with PSNFSS2e using the new naming scheme
       for postscript fonts, whereas MetaPost uses the "old" scheme that is
       supplied with dvips, e.g. "rawfonts". I haven't solved this problem
       until now.)



Recompiling
===========

MetaPost comes in WEB sources. To recompile you need an ANSI C compiler,
e.g. emx 0.9a, and WEB2c. Peter supplied the needed executables of TANGLE.EXE,
WEB2C.EXE, TFTOPL.EXE and PLTOTF.EXE. The needed patches are in PATCH.ZIP.

Peter writes:
    "I used the web2c files and the bootstrap version of tangle from the
    web2c distribution at labrea.stanford.edu. The only changes I made (as
    I recall) to the supplied C code were to change the path separator (for
    which there already was an #ifdef MS_DOS test), and to fix an error in
    the 'makempx' script. The scripts need a shell (e.g., sh.exe) and some
    shell utilities. I did make a few more changes to the makefiles. A robust
    port should be probably translate the scripts to .cmd files and make it
    work with FAT file systems."



Installation with DOS
=====================

Using this port of MetaPost with DOS should be no problem at all. There are
DOS executables of the shell in MH_SH23B.ZIP. You have to install emx0.9a
(FIX02 or later): all you need are EMX.EXE and EMU387 (if you don't have a
fpu). Install them according to the installation instructions which can be
found in EMXRT.ZIP.
Make a copy of MP.POO from MP.POOL and set the -t option of emx. We both did
not try using any 'btex...etex' constructs in DOS, however, because we don't
have TeX set up in DOS.



Testing the installation
========================

Unpack MP_TEST.ZIP with unzip. At the command prompt:

     mp examples <return>
	 latex mpintro <return>
	 bibtex mpintro <return>
	 latex mpintro <return>
     latex mpintro <return>
     dvips mpintro <return>     % dvips
     gs mpintro <return>        % ghostscript



Happy MetaPosting,

Uwe Baumert     (baumert@uni-muenster.de)