home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pasos2b.zip / install.emx < prev    next >
Text File  |  1993-07-14  |  13KB  |  408 lines

  1. ===============================================================================
  2. install.doc       emx 0.8g     INSTALLATION GUIDE                   13-Jul-1993
  3. ===============================================================================
  4.                                      Copyright (c) 1990-1993 by Eberhard Mattes
  5.  
  6. Welcome to emx 0.8g, an environment for creating 32-bit programs for
  7. OS/2 2.0 (and DOS).  You can use the GNU C compiler for compiling
  8. programs.
  9.  
  10. To use the GNU C compiler with emx, you need at least
  11.  
  12.   emxrt.zip     emx runtime package
  13.  
  14.   emxdev.zip    files required for developing programs with emx
  15.  
  16.   gnudev.zip    the GNU C compiler, the GNU debugger, and other tools
  17.                 (it should also be possible to use a different C compiler;
  18.                 in fact I first used the Xenix386 C compiler)
  19.  
  20.   gppdev.zip    additional files for GCC required for compiling C++
  21.                 programs
  22.  
  23.   gobjcdev.zip  additional files for GCC required for compiling
  24.                 programs written in the Objective C language
  25.  
  26. and
  27.  
  28.   unzip.exe     a free program for unpacking ZIP files
  29.  
  30. The following packages are optional:
  31.  
  32.   emxview.zip   emx documentation in OS/2 .inf format
  33.   emxlib.zip    emx library sources
  34.   emxsrc1.zip   source for emxomf, emxomfar and emxomfld
  35.   emxample.zip  sample programs
  36.   emxtest.zip   test programs (used for testing emx and the libraries)
  37.   gnuview.zip   gnudev.inf (gnudev.doc in OS/2 .inf format)
  38.   gnudoc.zip    documentation for GNU programs (texinfo sources)
  39.   gnuinfo.zip   GNU texinfo (includes info file browser)
  40.   gnupat.zip    patches for GNU sources
  41.   gnusrc.zip    patched GNU sources (ld, ar, nm, size, strip, objdump,
  42.                 termcap)
  43.   gccsrc1.zip   patched GNU sources (gcc 2.4.5, part 1)
  44.   gccsrc2.zip   patched GNU sources (gcc 2.4.5, part 2)
  45.   gccsrc3.zip   patched GNU sources (gcc 2.4.5, part 3)
  46.   gassrc.zip    patched GNU sources (gas 1.38.1)
  47.   gdbsrc.zip    patched GNU sources (gdb 4.9)
  48.   gppsrc.zip    patched sources of libg++ 2.2
  49.   bsddev.zip    BSD libraries (curses etc.)
  50.   bsddoc.zip    documentation for BSD libraries
  51.   bsdsrc.zip    source for BSD libraries
  52.  
  53. You should install all the packages on the same drive.  For instance,
  54. use
  55.  
  56.   c:
  57.   cd \
  58.   unzip emxrt
  59.  
  60. to install the emxrt.zip package on drive C:.  PKUNZIP cannot be
  61. used.  All the files will be installed in the \emx subdirectory or in
  62. subdirectories thereof.  The other packages are installed the same
  63. way.
  64.  
  65. IMPORTANT!  If there's an older version of emx already installed, you
  66. should delete the old version or rename the old directory.  Installing
  67. a new version over an old version is NOT RECOMMENDED.  For instance,
  68. the omflib batch file (see below) won't build new versions of the
  69. libraries if the .lib files already exist.  That is, you would
  70. continue to use the .lib files of the previously installed emx
  71. version.
  72.  
  73. After unpacking the emx runtime and development system packages,
  74. you'll find further information in the following files:
  75.  
  76.   \emx\doc\COPYING.EMX          emx & library license
  77.   \emx\doc\COPYING              GNU General Public License
  78.   \emx\doc\install.doc          Installation guide
  79.   \emx\doc\emxrt.doc            User's guide to the emx runtime package
  80.   \emx\doc\emxdev.doc           Application developer's guide
  81.   \emx\doc\libref.doc           C library reference
  82.   \emx\doc\build.doc            Compiling the GNU sources
  83.   \emx\doc\history.doc          Change log
  84.   \emx\doc\future.doc           Things to do
  85.   \emx\book\emxrt.inf           .inf version of emxrt.doc
  86.   \emx\book\emxdev.inf          .inf version of emxdev.doc (optional)
  87.   \emx\book\libref.inf          .inf version of libref.doc (optional)
  88.  
  89. After unpacking the GNU and BSD packages, you'll find further
  90. information in the following files:
  91.  
  92.   \emx\doc\COPYING              GNU General Public License
  93.   \emx\doc\COPYING.LIB          GNU Library General Public License
  94.   \emx\doc\COPYING.BSD          BSD license (for libbsd and libcurse)
  95.   \emx\doc\gnudev.doc           GNU development tools information
  96.   \emx\doc\bsddev.doc           BSD library information
  97.   \emx\book\gnudev.inf          .inf version of gnudev.doc (optional)
  98.  
  99.  
  100. Read history.doc first.
  101.  
  102. If you want to develop programs on a drive different from the drive
  103. where emx is installed, you have to set the C_INCLUDE_PATH and
  104. LIBRARY_PATH environment variables, for instance,
  105.  
  106.     set C_INCLUDE_PATH=c:/emx/include
  107.     set LIBRARY_PATH=c:/emx/lib
  108.  
  109. If you want to compile C++ programs, set CPLUS_INCLUDE_PATH as well:
  110.  
  111.     set CPLUS_INCLUDE_PATH=c:/emx/include.cpp;c:/emx/include
  112.  
  113. The genclass utility needs the following environment variable:
  114.  
  115.     set PROTODIR=c:/emx/include.cpp/gen
  116.  
  117. If you want to compile programs written in the Objective C language,
  118. set OBJC_INCLUDE_PATH as well:
  119.  
  120.     set OBJC_INCLUDE_PATH=c:/emx/include
  121.  
  122. To use GDB (the GNU debugger) and info (the GNU info browser) and other
  123. programs that use termcap, set the TERM and TERMCAP environment
  124. variables:
  125.  
  126.     set TERM=mono
  127.     set TERMCAP=c:/emx/etc/termcap.dat
  128.  
  129. Set the INFOPATH environment variable for info:
  130.  
  131.     set INFOPATH=c:/emx/info
  132.  
  133. To use the emx documentation in OS/2 .inf format, append c:\emx\book
  134. to the BOOKSHELF environment variable and define an environment
  135. variable which tells VIEW how to concatenate the .inf files.  Example:
  136.  
  137.     set BOOKSHELF=C:\OS2\BOOK;C:\EMX\BOOK
  138.     set EMXDOC=emxdev+libref+gnudev
  139.  
  140. To use the .inf files with EPM (the OS/2 Enhanced Editor), add the
  141. following line to your config.sys file:
  142.  
  143.     set HELPNDX=emxdoc.ndx
  144.  
  145. If HELPNDX is already set in your config.sys file, add emxdoc.ndx
  146. to the end of the HELPNDX variable, separated by a + character.
  147. Moreover, you should add c:\emx\book to the DPATH environment
  148. variable:
  149.  
  150.     set DPATH=...;c:\emx\book
  151.  
  152. where ... is the previous value of DPATH.
  153.  
  154. OS/2 users should set the environment variables in config.sys, DOS
  155. users should set the environment variables in autoexec.bat.  Beware of
  156. blanks at the end of the lines!
  157.  
  158. Some of the emx batch files (such as texi2dvi.cmd) require REXX to be
  159. installed.  If you haven't installed REXX, use Selective Install to
  160. install it.  (Note to DOS users: REXX is OS/2's batch file language.)
  161.  
  162. To finish the installation, add c:\emx\bin (insert the correct drive
  163. letter) to your PATH.  Add c:\emx\dll (insert the correct drive
  164. letter) to the LIBPATH statement in your config.sys file.  Reboot your
  165. computer to enable the new LIBPATH statement and the new environment
  166. variables.
  167.  
  168. To create the OMF libraries (for linking with LINK386), type the
  169. following commands after installing emx:
  170.  
  171.     cd \emx\lib
  172.     omflib
  173.  
  174. The omflib batch file builds .lib files from .a files.  Already
  175. existing .lib files are not rebuilt.  If you install (after running
  176. omflib) a package containing additional .a files , you should run
  177. omflib again to build the .lib files for the new package.
  178.  
  179. If OS/2 says
  180.  
  181.     SYS1804: The system cannot find the file EMX.
  182.  
  183. when running a program compiled for emx, you haven't set LIBPATH
  184. correctly.
  185.  
  186.  
  187. Compiling a sample program
  188. --------------------------
  189.  
  190. Install the emxample.zip package:
  191.  
  192.   c:
  193.   cd \
  194.   unzip emxample
  195.  
  196. Compile the sieve program (optimizer enabled):
  197.  
  198.   cd \emx\samples
  199.   gcc -O2 -o sieve.exe sieve.c
  200.  
  201. Run the sieve program:
  202.  
  203.   sieve
  204.   sieve 100000
  205.   sieve -p 100
  206.  
  207.  
  208. Sample debugging session
  209. ------------------------
  210.  
  211. Compile the sieve program for debugging:
  212.  
  213.   cd \emx\samples
  214.   gcc -g -o sieve.exe sieve.c
  215.  
  216. Start the debugger and step through some lines:
  217.  
  218.   [D:\EMX\TEST]gdb sieve.exe
  219.   GDB is free software and you are welcome to distribute copies of it
  220.    under certain conditions; type "show copying" to see the conditions.
  221.   There is absolutely no warranty for GDB; type "show warranty" for details.
  222.   GDB 4.9, Copyright 1993 Free Software Foundation, Inc...
  223.   (gdb) set arg 10                                      <- set command line
  224.   (gdb) b isqrt                                         <- set breakpoint
  225.   Breakpoint 1 at 0x1004e: file sieve.c, line 45.
  226.   (gdb) run                                             <- start program
  227.   Starting program: d:/emx/samples/sieve.exe 10
  228.  
  229.   Breakpoint 1, isqrt (x=10) at sieve.c:45
  230.   45        l = 1; r = x;
  231.   (gdb) s                                               <- stop over one line
  232.   46        while (l < r)
  233.   (gdb) l                                               <- list source
  234.   41      static ULONG isqrt (ULONG x)
  235.   42      {
  236.   43        ULONG l, r, m;
  237.   44      
  238.   45        l = 1; r = x;
  239.   46        while (l < r)
  240.   47          {
  241.   48            m = (l+r) / 2;
  242.   49            if (m > 46340) m = 46340;
  243.   50            if (m*m < x)
  244.   (gdb) disp l                                          <- watch variable
  245.   1: l = 1
  246.   (gdb) disp r                                          <- watch variable
  247.   2: r = 10
  248.   (gdb) s 5                                             <- step over five lines
  249.   53                  r = m-1;
  250.   2: r = 10
  251.   1: l = 1
  252.   (gdb) p m*m                                           <- show expression
  253.   $1 = 25
  254.   (gdb) cont                                            <- continue program
  255.   Continuing.
  256.   4 primes                                              <- output of program
  257.  
  258.  
  259.   Program exited normally.
  260.   (gdb) q                                               <- quit gdb
  261.  
  262.   [D:\EMX\TEST]
  263.  
  264.  
  265. Viewing OS/2 .inf files
  266. -----------------------
  267.  
  268. If you've installed the optional emxview.zip and gnuview.zip packages,
  269. you can use the OS/2 VIEW utility to view a hypertext version of
  270. emxdev.doc, libref.doc and gnudev.doc.  If you've added c:\emx\book to
  271. the BOOKSHELF environment variable and defined the EMXDOC environment
  272. variable (see above), type
  273.  
  274.     view emxdoc
  275.  
  276. to view the concatenated .inf files.  To get help for, say, printf(),
  277. type
  278.  
  279.     view emxdoc printf
  280.  
  281. If you haven't set the environment variables, type
  282.  
  283.     view c:\emx\book\emxdev
  284.  
  285. to view emxdev.inf or type
  286.  
  287.     view c:\emx\book\emxdev+c:\emx\book\libref+c:\emx\book\gnudev
  288.  
  289. to view all the .inf files.
  290.  
  291. If you've properly set the HELPNDX and DPATH environment variables,
  292. you can use the kwhelp (Ctrl-H) command of EPM to get on-line help for
  293. the function at the cursor.  With emxdoc.ndx, all three books are
  294. required to be installed.  If you haven't installed all the books, use
  295. a subset of emxdev.ndx, libref.ndx and gnudev.ndx in the HELPNDX
  296. environment variable.
  297.  
  298. emxdoc.ndx contains all entries of emxdev.ndx, libref.ndx and
  299. gnudev.ndx, pointing to emxdoc.  Setting the EMXDOC environment
  300. variable as explained above causes the three books to be concatenated
  301. and named emxdoc.
  302.  
  303.  
  304. Viewing the GNU on-line manuals
  305. -------------------------------
  306.  
  307. To view the GCC and GDB manuals, unpack gnudoc.zip and gnuinfo.zip and
  308. install info (see install.doc).  Use GNU makeinfo to create info files
  309. for on-line help from the texinfo files.  makeinf.bat and makeinf.cmd
  310. are batch files which simplify calling makeinfo.
  311.  
  312. To create info files for the GCC manual, type:
  313.  
  314.   cd \emx\gnu\doc
  315.   makeinf gcc
  316.   makeinf cpp
  317.  
  318. To create info files for the GDB manual, type:
  319.  
  320.   cd \emx\gnu\doc
  321.   makeinf gdb
  322.  
  323. To create info files for the texinfo manual, type:
  324.  
  325.   cd \emx\gnu\doc
  326.   makeinf texi
  327.   makeinf makeinfo
  328.  
  329. To create info files for libg++, type:
  330.  
  331.   cd \emx\gnu\doc
  332.   makeinf libgpp
  333.   makeinf iostream
  334.  
  335. After creating the info files, you can use GNU info (see gnudev.doc
  336. for details) or GNU Emacs to view the info files.
  337.  
  338.  
  339. Printing the GNU manuals
  340. ------------------------
  341.  
  342. To print the manuals, you have to unpack gnudoc.zip and gnuinfo.zip.
  343. Additionally, you have to install TeX.  Of course, I recommend emTeX,
  344. which can be used both under OS/2 and DOS.  emTeX is available for
  345. anonymous ftp on
  346.  
  347.   ftp.uni-stuttgart.de   [129.69.1.12]: /soft/tex/systems/msdos/emtex
  348.   ftp.tex.ac.uk        [134.151.44.19]: /pub/archive/systems/msdos/emtex
  349.   ftp.shsu.edu         [192.92.115.10]: /tex-archive/systems/msdos/emtex
  350.   ftp.informatik.tu-muenchen.de [131.159.0.198]: /pub/comp/os/os2/emTeX
  351.  
  352. The following instructions assume that you're using emTeX (with
  353. emTeX386).
  354.  
  355. To typeset the GCC documentation, type
  356.  
  357.   cd \emx\gnu\doc
  358.   makedvi gcc
  359.  
  360. This creates the following files:
  361.  
  362.   cpp.dvi        GNU C preprocessor manual
  363.   gcc.dvi        GNU C compiler manual
  364.  
  365. To typeset the GDB documentation, type
  366.  
  367.   cd \emx\gnu\doc
  368.   makedvi gdb
  369.  
  370. This creates the following files:
  371.  
  372.   refcard.dvi    GDB reference card
  373.   gdb.dvi        GDB manual
  374.  
  375. To typeset internal GDB documentation (you don't need this unless you
  376. want to hack GDB), type
  377.  
  378.   cd \emx\gnu\doc
  379.   makedvi gdbint
  380.  
  381. This create the following files:
  382.  
  383.   gdbint.dvi     GDB internals
  384.   stabs.dvi      Description of debugging information format
  385.  
  386. To typeset the texinfo documentation, type
  387.  
  388.   cd \emx\gnu\doc
  389.   makedvi texinfo
  390.  
  391. This creates the following files:
  392.  
  393.   texi.dvi       texinfo manual
  394.   makeinfo.dvi   makeinfo manual
  395.  
  396. To typeset the libg++ documentation, type
  397.  
  398.   cd \emx\gnu\doc
  399.   makedvi libgpp
  400.   makedvi iostream
  401.  
  402. This creates the following files:
  403.  
  404.   libgpp.dvi     libg++ manual
  405.   iostream.dvi   iostream manual
  406.  
  407. --------------------------- END OF INSTALL.DOC ------------------------------
  408.