

        DeuTex/DeuSf compilation

        by Olivier Montanuy <Olivier+Montanuy=wanadoo+fr>
	Revised AYM 1999-08-12
	Last update 2005-08-19


        ***********************
        *  Generic Unix-like  *
        ***********************

Type

    ./configure
    make
    make install   # as root

See near the end of the file for any OS-specific details.


        ***************
        *  DOS        *
	*  Windows 95 *
	*  Windows 98 *
	*  Windows NT *
        ***************

Borland C++
Turbo C++

    Versions of DeuTex prior to 4.1.0 work fine when compiled with
    Borland C++ 4.0. DeuTex 4.1.0 and later can still be compiled with
    BC4 but the resulting executable is partially broken (does not
    handle correctly lumps larger than 64 kB). I believe it's the same
    for Borland/Turbo C 3.x and 2.x.

    The reason why it's broken is that, in v4.1.0, I've removed all
    "huge" qualifiers from the code, thinking that pointers were huge
    by default since DeuTex uses the huge memory model. I was wrong.
    I've been told that there is a version of Borland C for which, in
    the huge memory model, all data pointers are huge by default. If
    your version of BC has this feature, you should be able to use it
    to compile DeuTex.

    To compile, type

	dos\buildbc dir

    where dir is the directory where the compiler is installed,
    followed by a backslash (E.G. "dos\buildbc c:\bc4\"). Once
    deusf.exe and deutex.exe are built, copy them manually to a
    directory in your path.

    Don't try to use the makefile; due to idiosyncrasies in the CLI of
    bcc, limitations of Borland make and of the FAT filesystem, it
    won't work. There are old project files lying around in old/ but
    they've not been updated since 1995 so don't use them either.

    The compiler can be configured so that "{rw}" opens files in
    binary mode. Don't do that ! If you have problems with text files
    on DOS, make sure the compiler is configured so that "{rw}" opens
    files in _text_ mode (that's the default).

Microsoft C

    As of version 4, DeuTex can be built with MSC 6.0. Other versions
    of MSC might work too, but have not been tried. To compile with
    MSC 5.1, you would have to remove the #error directives, since
    these are not supported in that version.

    Even though DeuTex compiles fine, the resulting executable is
    partially broken because it can't allocate blocks larger than
    64 kB.

    To compile, type

	dos\buildmsc

    (that script assumes INCLUDE, LIB and PATH are properly set up).
    Once deusf.exe and deutex.exe are built, copy them manually to a
    directory in your path.

    The compiler can be configured so that "{rw}" opens files in
    binary mode. Don't do that ! If you have problems with text files
    on DOS, make sure the compiler is configured so that "{rw}" opens
    files in _text_ mode (that's the default).

DJGPP 2.*

    Thanks to Udo Munk, DeuTex can now be built with DJGPP.

    You need a command named "cc" in your path, that points to "gcc.exe"
    (just type "copy c:\djgpp\bin\gcc.exe c:\djgpp\bin\cc.exe").

    The makefile recipes are written for Bourne-compatible shells like
    bash. If your DJGPP installation is set up so that make executes the
    recipes with an incompatible shell such as command.com, it won't
    work. Make sure you have Bash or some other Bourne-compatible shell
    installed and, if necessary, invoke make with the SHELL variable set
    to the pathname of that shell ("make SHELL=c:\foo\bash.exe")

    Some recipes also require Unix commands like cp, mv, rm, touch etc.
    so you may have to install additional packages.

    If you're feeling lucky, type

	dos\builddj

    After deusf.exe and deutex.exe are created, copy them to a
    directory in your path.

Cygwin

    Thanks to Udo Munk, DeuTex can now be built with Cygwin.

    I've not tried it myself, but it should be pretty much like
    compiling on any Unix :

	./configure
	make
	make install


        ***************
        * Windoze 3.1 *
        ***************
        by Olivier Montanuy

Use the DOS deutex version under windows, with a suitable deutex.pif

.DLL
    DeuTex itself can't be compiled as a 16-bit windoze DLL (too
    big). The lbdeutex is for the visual basic shell.


        **************
        * OS/2 2 2.1 *
        **************

Borland C++
Turbo C++

    Might work. See the corresponding paragraphs in the DOS section.

Microsoft C

    Might work. See the corresponding paragraphs in the DOS section.

IBM C Set++ 2.1 (by mark+mathews=channel1+com)

    For DEUTEXOS.EXE you need deutexos.mak and deutexos.def
    To make DEUTEXOS.EXE type:  nmake -f deutexos.mak

    For DEUSFOS.EXE you need deusfos.mak and deusfos.def
    To make DEUSFOS.EXE type :  nmake -f deusfos.mak

    AYM 1999-08-12: Where are deutexos.mak and deusfos.mak ? Better use
    the main makefile anyway...


        ************************
        * Porting DeuTex/DeuSF *
        ************************

The name of the OS DeuTex is being compiled for is in DT_OS, defined in
deutex.h :

  #define DT_OS 'd'  /* MS-DOS */
  #define DT_OS 'o'  /* OS/2 */
  #define DT_OS 'u'  /* Unix (in fact, anything else) */

The name of the compiler is in DT_CC, defined in deutex.h :

  #define DT_CC 'b'  /* Borland C */
  #define DT_CC 'c'  /* GCC/EGCS with Cygwin */
  #define DT_CC 'd'  /* DJGPP */
  #define DT_CC 'g'  /* GCC/EGCS */
  #define DT_CC 'i'  /* IBM C Set++ */
  #define DT_CC 'm'  /* Microsoft C */
  #define DT_CC '?'  /* Unknown compiler */

Testing the existence of other macros, such as __MSDOS__, __GNUC__ etc.
is discouraged. Use DT_OS and DT_CC instead.

Some structures related to pictures or to DOOM assume that no word or
long word alignement occur. If the fields are not contiguous in core,
DeuTex and DeuSF will not work, but there will be no warning.

Most of the O/S related functions are in tools.c.

