---------------------------------------------------------------------
----------- Zinc Application Framework 5.3 - README.MTF -------------
----------- COPYRIGHT (C) 1990-1999. All Rights Reserved. -----------
-------- Wind River Systems Incorporated. Alameda, CA, USA ----------
---------------------------------------------------------------------

This file provides important information for Zinc Application
Framework (ZAF) users on Motif. It contains the following sections:

    Setting up ZAF 5.3 on Motif
    Building ZAF 5.3 Libraries and Examples
    Application Defaults
    ZafImage and the XPM Library

---------------------------------------------------------------------
--- Installing ZAF 5.3 on Motif -------------------------------------
---------------------------------------------------------------------

Use the 'minstall' script to set up your ZAF 5.3 distribution tree.
This script:

	1. If you downloaded ZAF from our ftp site you will need to
uncompress any files with a .Z extension using:

	uncompress *.Z

You will then need to untar any files with a .tar extension as follows:

	tar -xvf filename.tar

    2. Confirms the ZAF license agreement(s).

    3. Copies and converts all the "posix.mak" files to environment
specific "Makefile" equivalents, which includes all the make settings
you specified during the install process.

    4. Calls the "suffixes" script which converts the .cpp file
extensions to the extension you have specified. (For example, when
compiling for Solaris you must use the .cc extension.)

The following platforms/compilers/libraries are supported by the
current install script:

    Platform        Compiler (.a=archive, .so/.sl=shared)
    --------        -------------------------------------
    Solaris 2       SparCompiler C++ (.a, .so), GNU C++ (.a, .so)
    SunOS 4         SparCompiler C++ (.a, .so), GNU C++ (.a, .so)
    HP-UX 9,10      HP aC++ (.a, .sl), GNU C++ (.a, .sl)
    IBM AIX 4       VisualAge C++ (.a), GNU C++ (.a)
    Digital-UNIX 4  GNU C++ (.a, .so)
    SGI Irix 6      ProDev C++ (.a, .so), GNU C++ (.a, .so)
    SCO 5           GNU C++ (.a)
    Linux 2.0.30    GNU C++ (.a, .so)
    Linux 2.0.31    GNU C++ (.a, .so)

NOTE: If you are using the Cygnus version of the GNU C++ compiler,
egcs 1.0.1, on SCO you may have linking problems because of a bug
in the compiler (it can't typedef a pointer to a member function).
To work around this bug add a -DEGCS_1, to the compile options when
configuring the Makefiles with the mconfig script.

---------------------------------------------------------------------
--- Building ZAF 5.3 Libraries and Examples -------------------------
---------------------------------------------------------------------

The ZAF libraries and examples for Motif can be built by following
two easy steps:

    1. To build the ZAF Motif libraries, invoke "make" from the zaf
directory. There are three ZAF Motif libraries:

    libZafMtf   Contains all the core library objects
    libZafMtfP  Contains two global variables for generic persistence
    libZafDsn   Contains the designer objects

    2. To build the ZAF example programs, run "make" from the
zaf\examples directory.


By default, the system installs archive (.a) libraries. If you create
shared ZAF libraries you either need to move the libraries into a
system-wide search path, or register "ZAF/lib" with your system's
shared library specification. Here is some information that you may
find useful on these paths:

    1. For the Sun, DEC, and Linux environments, you must either set
the LD_LIBRARY_PATH (using "setenv") to include the "ZAF/lib"
directory or copy libZafDsn.so, libZafMtf.so, and libZafMtfP.so to an
existing shared library search path (e.g., /usr/lib).

    2. HP-UX's implementation is similar to Sun, but evaluates the
SHLIB_PATH variable rather than LD_LIBRARY_PATH.

    3. Shared libraries for AIX and SCO have not yet been
implemented.

NOTE: We have heard of some specific installation problems on Linux
Motif. The problem typically resides in the first-line statement
including #!/bin/csh in the minstall script. If your system has a
problem loading this shell, try replacing the #!/bin/csh with
#!/bin/tcsh.

---------------------------------------------------------------------
--- Application Defaults --------------------------------------------
---------------------------------------------------------------------

Executables no longer depend on the ZincApp resource file. The
default resource file for earlier versions of ZAF was ZincApp, but
applications built with ZAF 5.3 now follow the Motif standard of
having a resource file patterned after the application name.  For
example, if you create an application called "test" you may also
specify a resource file called "XTest" or "Test".

Most problems we have seen with resource files are caused by the lack
of proper fonts. ZAF 5.3 uses the standard font definitions supplied
by the application variables: "defaultFontList," "fontList,", 
"labelFontList," "buttonFontList," and "textFontList." Make sure you
define these fonts in one of the following:

    1. your system resource file located in /usr/lib/X11/app-defaults
    2. your personal directory's .Xdefaults file

---------------------------------------------------------------------
--- ZafImage and the XPM Library ------------------------------------
---------------------------------------------------------------------

ZafImage uses libXpm.a functions to read X PixMap format (xpm) files.
Since there were too many variations of XPM file formats for ZAF to
adequately address, we supply XPM APIs from the unrestricted 3.4j
copyright version from GROUPE BULL (see the copyright notice in the
xpm directory). The unmodified source code for these functions is
provided in the zaf/xpm directory. In addition, an appropriate
Makefile is provided that compiles the library and places the
contents in the following directories:

    zaf/include/xpm.h
    zaf/lib/libXpm.a

Note: The provided Makefile uses the native C compiler. If you do not 
have the native C compiler installed on your system then you should 
change the Makefile to call your C compiler or create a softlink for
your C compiler so that it is called with cc.

Note: This library must be compiled prior to making the libZaf.a
library. This is done automatically if you run make from the zaf
directory (see zaf/Makefile).

We have heard of some problems compiling the xpm library with older
OS environments. Typically, the problem has been narrowed down to the
inclusion of the "strings.h" header file or the incorrect
initialization of function variables. If you experience any of these
problems, first look at your OS environment's full support
capabilities. Some of the needed files may actually exist in a
previously unspecified path.

In addition, please let us know about the specific problem you are
having. We will try to document the problems, along with proposed
solutions. If you continue to have problems, and are not using
ZafImage in your application, simply remove the compile line for
"m_image.cpp" and "libXpm.a" - m_image.cpp is the only file that uses
the XPM library.
