home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
uilbld.zip
/
READ.ME
< prev
next >
Wrap
Text File
|
1994-03-23
|
6KB
|
149 lines
Rebuilding DDE4MUI.DLL
======================
Why You May Want to Rebuild
---------------------------
If you are shipping a renamed version of DDE4MUI.DLL with your
application, you can reduce the size of this DLL by rebuilding
DDE4MUI.DLL and leaving out the classes that your application
does not use.
A smaller DLL takes up less space on your installation media and
can also result in faster load time for the applications that use
the DLL.
How to Rebuild
--------------
Use the following procedure to rebuild:
1. Make directory where the rebuild package was unzipped your current directory.
(This is the directory where this text file resides.)
NOTE: These instructions assume the rebuild package is in
\uibld and that CSet++ is installed in
\IBMCPP.
2. Extract the needed .OBJ files from the User Interface Class Library
static libraries.
To get the best performance for your rebuilt DLL, you must link the
object files in the order specified in REBUILD.RSP. To do this,
extract the .OBJ files from the User Interface Class Library static
libraries instead of re-linking the DLL by using the static libraries
directly.
To extract the needed .OBJ files and put them in the \uibld
directory enter:
GETOBJS \IBMCPP\LIB\DDE4MUIB.LIB
GETOBJS \IBMCPP\LIB\DDE4MUIC.LIB
GETOBJS \IBMCPP\LIB\DDE4MUID.LIB
NOTE: If your application does not use the Dynamic Data Exchange (IDDExxx)
classes you do not
need to run GETOBJS against DDE4MUID.LIB.
3. Modify DDE4MUI.DEF and REBUILD.RSP
To remove a class from your rebuilt DLL, you must first determine the
name of the .OBJ file in which the class implementation resides.
However, be aware that some .OBJ files contain more than one class
implementation. If your application uses ANY of the classes that an
.OBJ file implements, you cannot remove it.
The cross-reference tables in Appendix A of the "User Interface
Class Library Reference" can help you determine the .OBJ file that
implements a given class. Although this table lists the .HPP file,
you can generally substitute .OBJ for .HPP to determine
the right name for the .OBJ file.
For some classes, such as IString and IResourceLibrary, a single .HPP
file declares the class, but multiple .OBJ files contain the
implementation. In these cases, a number is appended to the file name
to make the .OBJ file names unique. For example, the implementations
of the classes declared in IRESLIB.HPP are in IRESLIB.OBJ, IRESLIB1.OBJ,
IRESLIB2.OBJ, IRESLIB3.OBJ, and IRESLIB4.OBJ. For sequentially numbered
.OBJ files such as these, either remove ALL of the .OBJ files or do not
remove any.
Once you determine the .OBJ files that you do not need for your
rebuilt DLL, do the following:
* Edit \UIBLD\REBUILD.RSP and remove the lines that list the unneeded
.OBJ files.
* Copy \IBMCPP\LIB\DDE4MUI.DEF to the \uibld directory.
Then, edit it and remove all lines that export the functions
contained in the .OBJ files whose lines you removed from REBUILD.RSP.
For example, if you do not want to use the ITime class, delete the
two lines that export Ordinals 358 and 359. These lines are below
the comment lines that identify the exports from ITIME.OBJ:
;
; --> Object: C:\DRVRGM3\IBASE\OBJ\ITIME.obj
;
__ls__FR7ostreamRC5ITime @358 noname ----> DELETE
asString__5ITimeCFPCc @359 noname ----> DELETE
;
(NOTE: these ordinals may not match with the 2.0 values, the above
example is from the 2.1 .def file.)
The table below can help you identify groups of files that you can
delete. This table provides the wildcard .OBJ file name and the
conditions under which you can delete all files that match the pattern:
File Name Pattern Can Be Deleted if Your Application
----------------- ----------------------------------
N*.OBJ Never uses I_NO_INLINES when compiling
ICNR*.OBJ Does not use Container controls
IDDE*.OBJ Does not use Dynamic Data Exchange
4. Build the new DLL
Once you modify DDE4MUI.DEF and REBUILD.RSP to remove what you do
not want to include in your DLL, you are ready to link your
.OBJ files. To do this, enter the following commands:
ICC @REBUILD.RSP
IMPLIB DDE4MUII.LIB DDE4MUI.DEF
These commands create the DLL (DDE4MUI.DLL) and its corresponding
import library (DDE4MUII.LIB) in the current directory, which is
\uibld. You can now use these two files to link your application.
5. Delete unneeded .OBJ files from the \uibld directory
You can delete the .OBJ files in the current directory once you are
sure you no longer need them for rebuilding. If you do this, do NOT
delete:
DDE4UDLL.OBJ
We ship this file in the \uibld directory because it is not
available from any of the static libraries. You need this file
if you ever attempt to rebuild again. (It is the DLL Init/Term
routine.) You may want to put a backup copy of this file in
another directory.
A safe way to delete the unneeded files is to enter the following
commands:
DELETE I*.OBJ
DELETE N*.OBJ
MSGBIND Limitation
------------------
Due to problems with the MSGBIND utility you can't bind the DDE4UILE.MSG
message file to your rebuilt version of DDE4MUI.DLL.
APAR PJ 10718 was opened to address this problem.