home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / src / README < prev   
Text File  |  1997-04-02  |  4KB  |  112 lines

  1.  
  2. 1) Building OpenDoc Samples is fast and easy.
  3. -----------------------------------------------------------------------
  4.  
  5.  
  6.   1) "cd" to the src directory in %ODSRC%
  7.   2) Type "dir" to see the list of samples.
  8.   3) "cd" to the directory of your favorite part.
  9.   4) Issue one of the following commands:
  10.  
  11.      nmake          - equivalent to 'nmake Idls Hdrs Libs Dlls'
  12.      nmake Clean    - to erase all generated files.
  13.      nmake Idl      - to copy the idl file(s) to %ODSRC%\include.
  14.      nmake Hdr      - to create the header file(s).
  15.      nmake Lib      - to create the lib file(s).
  16.      nmake Dll      - to create the dll file(s).
  17.      nmake ForceRegistry - to force the registration of a part
  18.                            (parts are only re-registered when their .idl
  19.                             changes)
  20.      nmake Pkg      - to build an installable package (a .odz file)
  21.                       for the part
  22.  
  23.      Add an "s" to the end a command (e.g. "nmake Cleans")
  24.      to cause the command to be recursively issued in the subdirectories
  25.      below the current directory.
  26.  
  27.  
  28. ==> Important Note1: odsomxh.cmd
  29.  
  30.      Before the first attempt to build the sample parts, you must
  31.      run odsomxh.cmd (located in %ODBASE%\bin).
  32.      Failure to run odsomxh could result in parts being
  33.      built using SOM headers that do not match the SOM 2.1.4
  34.      runtimes installed with OpenDoc 1.1.
  35.  
  36.  
  37. ==> Important Note2: Compile and link flags
  38.  
  39.      The compile and link flags include a basic core set of
  40.      flags.  If you want to build optimized code or debug code
  41.      you will need to set the compiler specific environment
  42.      variables.  Here are our suggestions:
  43.  
  44.        VisualAge Compiler
  45.         Optimized build
  46.          set ICC = -O+ -Om-
  47.          set ILINK = -NOBROWSE
  48.  
  49.         Debug build
  50.          set ICC = -Ti+ -DDEBUG
  51.          set ILINK = -DEBUG
  52.  
  53.  
  54. ==> Important Note3: using your own runtime library
  55.  
  56.      The nmake files have the additional capability
  57.      to optionally link in your own runtime library.
  58.  
  59.      The default is to dynamically link in the compiler's runtime.
  60.      To link in your own runtime list, call nmake with the
  61.      LocalRuntimeLibrary macro set to your runtime library list.
  62.  
  63.      This macro triggers the logic that adjusts the compile and
  64.      link flags to use your runtime library.
  65.  
  66.      %ODSRC%\src\runtime gives an example of building a local
  67.      runtime library based off the description in "Creating
  68.      Your Own Runtime Library DLLs" in the VisualAge C++
  69.      Programming Guide. After creating iodrt.dll in
  70.      %ODSRC%\src\runtime, you could build the IBM Samples, having
  71.      them linked to the local runtime, by issuing the following
  72.      nmake command:
  73.  
  74.     nmake "LocalRuntimeLibrary=%ODSRC%\lib\iodrt.lib %ODSRC%\lib\os2\os2386.lib %CPPMAIN%\lib\CPPOOC3.lib"
  75.  
  76.  
  77. ==> Important Note4: Resource compiler
  78.  
  79.      If you are having trouble using the resource compiler, one
  80.      possible source of the problem could be the version of the resource
  81.      compiler you are using.  You can adjust which resource compiler is
  82.      being used by the nmake files by changing the ResourceCompiler macro
  83.      in %ODSRC%\src\Platform.mak.
  84.  
  85.  
  86. ==> Note5: Compilation order  
  87.  
  88.      If you are doing a complete build from the top of the samples tree,
  89.      there is no problem with compilation order.  Since the build environment
  90.      uses four passes (Idls, Hdrs, Libs, Dlls) in the build, everything
  91.      is available when it is needed.  If, however, you are working in
  92.      several different parts at the same time, and you aren't doing a top
  93.      down build, order may matter.  In this case, you might want to check
  94.      either the FilesDlls or *LibList macro in the parts makefile to see
  95.      if other dlls need to be built before the part you are working on.
  96.  
  97.  
  98.  
  99. 2) Registering parts with OpenDoc
  100. -----------------------------------------------------------------------
  101. When you click on a docshell icon, a window displaying all the registered
  102. parts will be displayed.  Any of these parts can be selected as the root part
  103. of a document.  Use the reg1part command file to reregister a part with
  104. OpenDoc.  The nmake files are designed to automatically re-register a part
  105. when the corresponding .idl changes.  Additionally, the nmake files can
  106. force the registration of a part by using 'nmake ForceRegistry'.
  107.  
  108.  
  109.  
  110. 
  111. 
  112.