This section explains how to create a WMD file from your WML file. The easiest way to build a new WMD file is to make minor modifications within the example directory that we provide. This example directory is at pathname demos/lib/Exm/wml. Inside this directory, you will find an Imakefile, our sample WML file (Exm.wml), and several other necessary files.
The Imakefile we provide creates a WMD file named Exm.wmd from the Exm.wml file. If you want to create Exm.wmd, you must issue the following sequence of commands:
cd demos/widgets/Exm/wml make Makefile make includes make depend make
The resulting Exm.wmd file can now be used by a UIL compiler. (See the next section for details.)
To build a WMD file from your own WML file, you should first copy your WML file into the demos/lib/Exm/wml directory.
Second, change two lines of the Imakefile so that it will build a WMD file from your WML file rather than from Exm.wml. The two lines to change are the definitions of the TABLE and WMDTABLE variables. Before you edit the Imakefile, these definitions look as follows:
TABLE = Exm.wml WMDTABLE = Exm.wmd
You should change these variable assignments to reflect the names of your WML and WMD files. For example, suppose your WML file was stored in file My.wml. In this case, you would change the TABLE and WMDTABLE assignments as follows:
TABLE = My.wml WMDTABLE = My.wmd
By convention, the WMDTABLE variable should have the same root name as the TABLE variable, but it should have the suffix wmd instead of wml.
Next, you must modify the wmldbcreate.c file stored inside the demos/lib/Exm/wml directory . The only part of the wmldbcreate.c file that you need to modify is the section containing the names of the user-supplied public header files for your widget. This section currently contains the names of all eight public header files for the Exm widget set, as follows:
#include <Exm/Simple.h> #include <Exm/String.h> #include <Exm/StringTrans.h> #include <Exm/CommandB.h> #include <Exm/MenuB.h> #include <Exm/Panner.h> #include <Exm/Grid.h> #include <Exm/TabB.h>
All you have to do is to replace these lines with the names of your widget's public header files.
You build a WMD file by issuing the following command sequence:
cd demos/lib/Exm/wml make Makefile make includes make depend make
The resulting My.wmd file can now be used by a UIL compiler.