
1) Building OpenDoc Samples is fast and easy.
-----------------------------------------------------------------------


  1) "cd" to the src directory in %ODSRC%
  2) Type "dir" to see the list of samples.
  3) "cd" to the directory of your favorite part.
  4) Issue one of the following commands:

     nmake          - equivalent to 'nmake Idls Hdrs Libs Dlls'
     nmake Clean    - to erase all generated files.
     nmake Idl      - to copy the idl file(s) to %ODSRC%\include.
     nmake Hdr      - to create the header file(s).
     nmake Lib      - to create the lib file(s).
     nmake Dll      - to create the dll file(s).
     nmake ForceRegistry - to force the registration of a part
                          (parts are only re-registered when their .idl
                           changes)
     nmake Pkg      - to build an installable package (a .odz file)
                      for the part

     Add an "s" to the end a command (e.g. "nmake Cleans")
     to cause the command to be recursively issued in the subdirectories
     below the current directory.


==> Important Note1: Compile and link flags

     The compile and link flags include a basic core set of
     flags.  If you want to build optimized code or debug code
     you will need to set the compiler specific environment
     variables.  Here are our suggestions:

       VisualAge Compiler         Visual C++ Compiler
        Optimized build            Optimized build
         set ICC = -O+ -Om-         set CL = -Ox
         set ILINK = -NOBROWSE      set LINK =

        Debug build                Debug build
         set ICC = -Ti+ -DDEBUG     set CL = -Ge -Zi -DDEBUG
         set ILINK = -DEBUG         set LINK = -DEBUG -DEBUGTYPE:BOTH


==> Important Note2: IBM VisualAge Compiler logic

     The IBM VisualAge Compiler logic has the additional capability
     to optionally link in your own runtime library.

     The default is to dynamically link in the compiler's runtime.
     To link in your own runtime list, call nmake with the
     LocalRuntimeLibrary macro set to your runtime library list.

     This macro triggers the logic that adjusts the compile and
     link flags to use your runtime library.

     %ODSRC%\src\runtime gives an example of building a local
     runtime library based off the description in "Creating
     Your Own Runtime Library DLLs" in the VisualAge C++
     Programming Guide. After creating iodrt.dll in
     %ODSRC%\src\runtime, you could build the IBM Samples, having
     them linked to the local runtime, by issuing the following
     nmake command:
	nmake "LocalRuntimeLibrary=%ODSRC%\lib\iodrt.lib %CPPMAIN%\lib\CPPWM35O.lib %CPPMAIN%\lib\CPPWOC3.lib"


==> Note3: Compilation order  

     If you are doing a complete build from the top of the samples tree,
     there is no problem with compilation order.  Since the build environment
     uses four passes (Idls, Hdrs, Libs, Dlls) in the build, everything
     is available when it is needed.  If, however, you are working in
     several different parts at the same time, and you aren't doing a top
     down build, order may matter.  In this case, you might want to check
     either the FilesDlls or *LibList macro in the parts makefile to see
     if other dlls need to be built before the part you are working on.


==> Parts that can be built with the IBM VisualAge C++ compiler.
All the parts in the %ODSRC%\src tree.

==> Parts that can be built with the Microsoft Visual C++ compiler.
utils
basecntr
simple
JavaPart
  - NOTE:  the basecntr, simple, and JavaPart *require* you build utils
           first.



2) Running OpenDoc Samples
-----------------------------------------------------------------------
Windows 95 has a severe limitation on the length of the PATH environment
variable during boot time.  Because of this limitation, %ODSRC%/dll may
not be in your PATH.  If you can not run a sample you have built, you
may need to run ODSETENV.BAT, which will correctly set your PATH
environment variable.


3) Registering parts with OpenDoc
-----------------------------------------------------------------------
When you click on a docshell icon, a window displaying all the registered
parts will be displayed.  Any of these parts can be selected as the root part
of a document.  Use the reg1part command file to reregister a part with
OpenDoc.  The nmake files are designed to automatically re-register a part
when the corresponding .idl changes.  Additionally, the nmake files can
force the registration of a part by using 'nmake ForceRegistry'.

==> Note: OlePart is an internal OpenDoc part which can be used to embed OLE
server objects into OpenDoc.  It is not intended to be run as a root part.
Although it is displayed on the Embed menu of the BaseContainer part, it is
not a sample and does not reside in the stationery folder.  However,
the source for it can be found in the source distribution for OpenDoc.



