core/expat-2.0.1/bcb5/README.txt
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 02 Feb 2016 21:49:24 +0000
changeset 300 b6d834208d33
parent 296 xmlreaderimpl/support/expat-2.0.1/bcb5/README.txt@ea3dbc023c80
permissions -rw-r--r--
ExpatXMLReader and DOM3XMLReader moved to xmlsuite/core package ...to ease usage of the package. Therefore it's no longer needed to also build xmlsuite/xmlreaderimpl in order to actually parse something. Expat should provide a good default.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
172
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
                   Using a Borland compiler product
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
The files in this directory support using both the free Borland command-line
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
compiler tools and the Borland C++ Builder IDE.  The project files have been
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
tested with both versions 5 and 6 of the C++ Builder product.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
             Using the free BCC32 command line compiler
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
After downloading and installing the free C++ Builder commandline version,
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
perform the following steps (assuming it was installed under C:\Borland\BCC55):
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
1) Add "C:\Borland\BCC55\BIN" to your path
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
2) Set the environment variable BCB to "C:\Borland\BCC55".
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
3) edit makefile.mak: enable or comment out the appropriate commands under
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
   clean & distclean, depending on whether your OS can use deltree /y or
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
   del /s/f/q.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
After that, you should simply cd to the bcb5 directory in your Expat directory
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
tree (same structure as CVS) and run "make all" or just "make".
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
                               Naming
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
The libraries have the base name "libexpat" followed optionally by an "s"
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
(static) or a "w" (unicode version), then an underscore and optionally
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
"mt" (multi-threaded) and "d" (dynamic RTL).
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
To change the name of the library a project file produces, edit the project
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
option source (see step 1 under Unicode below) and change the name contained in
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
the PROJECT tag. In a make file, change the value assigned to the PROJECT
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
variable. Also, the LIBRARY entry in the .def file has to be changed to
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
correspond to the new executable name.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
                       Unicode Considerations
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
There are no facilities in the BCB 5 GUI to create a unicode-enabled
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
application. Fortunately, it is not hard to do by hand.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
1. The startup .obj system file must be changed to the unicode version.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
   Go to Project|Edit Option Source, and scroll down to the ALLOBJ tag. Change
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
   c0x32.obj to c0x32w.obj. Editing this file can be quirky, but usually the
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
   following kludge will make the change stick. Close and save the file
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
   (CTRL-F4) then open the options dialog (CTRL-Shift-F11), then click OK on
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
   the dialog immediately without changing anything in it. If this doesn't work,
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
   you will have to close the project completely and edit the .bpr file by hand.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
   If you are using a make file, just change the startup .obj file assigned
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
   to the ALLOBJ variable.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
2. Add the macro define XML_UNICODE_WCHAR_T. In the GUI that goes in the options
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
   dialog, Directories/Conditionals tab, in the Conditional define box. In a
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
   make file, put it in the USERDEFINES variable.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
3. Of course, your code has to be written for unicode. As a start, the "main"
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
   function is called "wmain". The tchar macros are an interesting way to
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
   write code that can easily switch between unicode and utf-8. If these macros
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
   are used, then simply adding the conditional define _UNICODE as well as
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
   XML_UNICODE_WCHAR_T will bring in the unicode versions of the tchar macros.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
   Otherwise the utf-8 versions are used. xmlwf uses its own versions of the
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
   tchar macros which are switched on and off by the XML_UNICODE macro, which
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
   itself is set by the XML_UNICODE_WCHAR_T define.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
                              Threading
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
The libexpat libraries are all built to link with the multi-threaded dynamic RTL's.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
That means they require CC32xxMT.DLL present on the installation target.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
To create single-threaded libs, do the following:
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
1. The compiler option for multi-threading must be turned off. Following the
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
   instructions above to edit the option source, remove the -tWM option from
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
   the CFLAG1 tag. In a make file, remove it from the CFLAG1 variable.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
2. The single threaded RTL must be called. change the RTL in the ALLLIB tag or
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
   variable (GUI or makefile repectively) to the version without the "mt" in the
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
   name. For example, change cw32mti.lib to cw32i.lib.
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
                              Static RTL's
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
To build the libs with static RTL's do the following,
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
1. For the static expatlibs, in the Tlib tab on the options dialog, uncheck the
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
   "Use dynamic RTL" box. For the dynamic expatlibs, in the Linker tab on the
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
   options dialog, uncheck "Use dynamic RTL". If you are using a make file,
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
   remove the _RTLDLL assignment to the SYSDEFINES variable, and change the RTL
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
   to the version without an "i" in the ALLLIB variable. For example,
b831df7d33f9 Expat source code added
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
   cw32mti.lib would become cw32mt.lib.