RE: [xml] New build process for Windows/MSVC



Seems to have worked flawlessly for me, and I build a minimal libxml2 (no
xinclude, ftp, xptr, catalog, docb, iconv, etc.).  My preference is to have
all the .exe and .dll get copied to the {prefix)\bin directory, maybe a
configure option to allow this.  I would prefer to have to add only 1
directory to the path to get the utils to all work. 

Nice job Igor.

-----Original Message-----
From: Igor Zlatkovic [mailto:igor stud fh-frankfurt de]
Sent: Wednesday, March 20, 2002 4:49 PM
To: xml gnome org
Subject: [xml] New build process for Windows/MSVC


Hello everyone.

As promised, here it is. The package has four files:
* configure.js, a configuration script.
* Makefile.msvc, a makefile compatible with MS nmake.
* libxml2.def.src, an updated export definition source.
All of these go directly into the win32 subdirectory. Beware, 
in win32, not
in win32/dsp. Wait... I said four files. These are three. 
Well, the fourth
is the updated readme which explains how to use the remaining 
three. Please,
have mercy, I am too tired now, I will supply the readme tomorrow :-)

I have tested it with the current CVS, it works okay. Minor 
modifications to
the libxml source is necessary, but I cannot provide a patch 
at this moment
because the connection to the CVS server times out on me for 
some reason. I
hope I can use CVS again soon, until then, here is the 
description of what
must be changed:
* xmlcatalog.c: The first code line reading '#define 
IN_LIBXML' must be
removed.
* xmlversion.h.in: The preprocessor code around '#define
LIBXML_ICONV_ENABLED' which excludes it from the Windows build must be
removed.

A word on the second issue: This build process tries to use 
xmlversion.h
instead xmlwin32version.h in order to reduce redundancies. 
The two files are
otherwise identical, there is no need for both. If this goes 
good over time,
we can say goodbye to the other.

To build libxml using this, place all three files into the win32
subdirectory, go to the win32 subdirectory and issue a

  cscript configure.js help

See what features you want enabled and run the configure 
script with the
apropriate options. If you leave the defaults in place, 
you'll get exactly
the configuration I use to build the binary distribution. Here is an
example:

  cscript configure.js prefix=c:\home\igor
    include=c:\home\igor\include lib=c:\home\igor\lib

This leaves the default configuration in place, states that I 
would like to
have everything installed in c:\home\igor, and adds an 
additional search
paths for the compiler and the linker, so it can find my 
iconv. The script
responds by displaying the current configuration. Now you 
must build the
stuff by issuing a

  nmake

This will compile the library, xmllint and friends. The fresh 
executables
can then be found in win32/binaries. You can now do a

  nmake install

and all of what you just compiled will be installed in what 
you specified as
'prefix'.

If you cannot execute the configuration script, don't 
despair. It will still
work, but you must do the configuration manually. Check the 
Makefile.msvc,
it has clear comments about what should be modified. You must 
also manually
create xml(win32)version.h.

Now, go ahead, see if it works and bomb me with questions if 
something is
unclear.

Ciao
Igor




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]