home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / uilbld.zip / READ.ME < prev    next >
Text File  |  1994-03-23  |  6KB  |  149 lines

  1. Rebuilding DDE4MUI.DLL
  2. ======================
  3.  
  4. Why You May Want to Rebuild
  5. ---------------------------
  6.  
  7. If you are shipping a renamed version of DDE4MUI.DLL with your
  8. application, you can reduce the size of this DLL by rebuilding 
  9. DDE4MUI.DLL and leaving out the classes that your application 
  10. does not use.
  11.  
  12. A smaller DLL takes up less space on your installation media and
  13. can also result in faster load time for the applications that use
  14. the DLL.
  15.  
  16.  
  17. How to Rebuild
  18. --------------
  19.  
  20. Use the following procedure to rebuild:
  21.  
  22. 1. Make directory where the rebuild package was unzipped your current directory.
  23.    (This is the directory where this text file resides.)
  24.  
  25.    NOTE: These instructions assume the rebuild package is in 
  26.          \uibld and that CSet++ is installed in
  27.          \IBMCPP.
  28.  
  29. 2. Extract the needed .OBJ files from the User Interface Class Library 
  30.    static libraries.
  31.  
  32.    To get the best performance for your rebuilt DLL, you must link the 
  33.    object files in the order specified in REBUILD.RSP.  To do this, 
  34.    extract the .OBJ files from the User Interface Class Library static 
  35.    libraries instead of re-linking the DLL by using the static libraries 
  36.    directly.
  37.  
  38.    To extract the needed .OBJ files and put them in the \uibld
  39.    directory enter:
  40.  
  41.       GETOBJS \IBMCPP\LIB\DDE4MUIB.LIB
  42.       GETOBJS \IBMCPP\LIB\DDE4MUIC.LIB
  43.       GETOBJS \IBMCPP\LIB\DDE4MUID.LIB
  44.  
  45.    NOTE: If your application does not use the Dynamic Data Exchange (IDDExxx)
  46.          classes you do not
  47.          need to run GETOBJS against DDE4MUID.LIB.
  48.  
  49. 3. Modify DDE4MUI.DEF and REBUILD.RSP
  50.  
  51.    To remove a class from your rebuilt DLL, you must first determine the
  52.    name of the .OBJ file in which the class implementation resides.  
  53.    However, be aware that some .OBJ files contain more than one class 
  54.    implementation.  If your application uses ANY of the classes that an
  55.    .OBJ file implements, you cannot remove it.
  56.  
  57.    The cross-reference tables in Appendix A of the "User Interface
  58.    Class Library Reference" can help you determine the .OBJ file that
  59.    implements a given class.  Although this table lists the .HPP file,
  60.    you can generally substitute .OBJ for .HPP to determine
  61.    the right name for the .OBJ file.  
  62.  
  63.    For some classes, such as IString and IResourceLibrary, a single .HPP 
  64.    file declares the class, but multiple .OBJ files contain the 
  65.    implementation.  In these cases, a number is appended to the file name 
  66.    to make the .OBJ file names unique.  For example, the implementations 
  67.    of the classes declared in IRESLIB.HPP are in IRESLIB.OBJ, IRESLIB1.OBJ, 
  68.    IRESLIB2.OBJ, IRESLIB3.OBJ, and IRESLIB4.OBJ.  For sequentially numbered 
  69.    .OBJ files such as these, either remove ALL of the .OBJ files or do not 
  70.    remove any.
  71.  
  72.    Once you determine the .OBJ files that you do not need for your
  73.    rebuilt DLL, do the following:
  74.  
  75.      * Edit \UIBLD\REBUILD.RSP and remove the lines that list the unneeded
  76.        .OBJ files.
  77.  
  78.      * Copy \IBMCPP\LIB\DDE4MUI.DEF to the \uibld directory.
  79.        Then, edit it and remove all lines that export the functions
  80.        contained in the .OBJ files whose lines you removed from REBUILD.RSP.
  81.  
  82.  
  83.    For example, if you do not want to use the ITime class, delete the 
  84.    two lines that export Ordinals 358 and 359.  These lines are below 
  85.    the comment lines that identify the exports from ITIME.OBJ:
  86.  
  87.      ;
  88.      ; --> Object: C:\DRVRGM3\IBASE\OBJ\ITIME.obj
  89.      ;
  90.      __ls__FR7ostreamRC5ITime  @358 noname         ----> DELETE
  91.      asString__5ITimeCFPCc  @359 noname            ----> DELETE
  92.      ;
  93.     (NOTE: these ordinals may not match with the 2.0 values, the above
  94.            example is from the 2.1 .def file.)
  95.  
  96.    The table below can help you identify groups of files that you can 
  97.    delete.  This table provides the wildcard .OBJ file name and the 
  98.    conditions under which you can delete all files that match the pattern:
  99.  
  100.      File Name Pattern     Can Be Deleted if Your Application
  101.      -----------------     ----------------------------------
  102.       N*.OBJ               Never uses I_NO_INLINES when compiling
  103.       ICNR*.OBJ            Does not use Container controls
  104.       IDDE*.OBJ            Does not use Dynamic Data Exchange
  105.  
  106. 4. Build the new DLL
  107.  
  108.    Once you modify DDE4MUI.DEF and REBUILD.RSP to remove what you do
  109.    not want to include in your DLL, you are ready to link your 
  110.    .OBJ files.  To do this, enter the following commands:
  111.  
  112.       ICC @REBUILD.RSP
  113.       IMPLIB DDE4MUII.LIB DDE4MUI.DEF
  114.  
  115.    These commands create the DLL (DDE4MUI.DLL) and its corresponding
  116.    import library (DDE4MUII.LIB) in the current directory, which is 
  117.    \uibld.  You can now use these two files to link your application.
  118.  
  119. 5. Delete unneeded .OBJ files from the \uibld directory
  120.  
  121.    You can delete the .OBJ files in the current directory once you are
  122.    sure you no longer need them for rebuilding.  If you do this, do NOT 
  123.    delete:
  124.  
  125.       DDE4UDLL.OBJ
  126.  
  127.    We ship this file in the \uibld directory because it is not
  128.    available from any of the static libraries.  You need this file
  129.    if you ever attempt to rebuild again.  (It is the DLL Init/Term
  130.    routine.)  You may want to put a backup copy of this file in
  131.    another directory.
  132.  
  133.    A safe way to delete the unneeded files is to enter the following
  134.    commands:
  135.  
  136.      DELETE I*.OBJ
  137.      DELETE N*.OBJ
  138.  
  139.  
  140.  
  141. MSGBIND Limitation
  142. ------------------
  143.  
  144. Due to problems with the MSGBIND utility you can't bind the DDE4UILE.MSG
  145. message file to your rebuilt version of DDE4MUI.DLL.
  146.  
  147. APAR PJ 10718 was opened to address this problem.
  148.  
  149.