+
+ <sect2 id="installation.win32.source">
+ <title>Compiling from Source on WIN32</title>
+ <para>
+ &yaz; is shipped with "makefiles" for the NMAKE tool that comes
+ with <ulink url="http://msdn.microsoft.com/vstudio/">
+ Microsoft Visual C++</ulink>.
+ Version 6 has been tested. We expect that &yaz; compiles
+ with version 5 as well.
+ </para>
+ <para>
+ Start a command prompt and switch the sub directory
+ <filename>WIN</filename> where the file <filename>makefile</filename>
+ is located. Customize the installation by editing the
+ <filename>makefile</filename> file (for example by using notepad).
+
+ The following summarizes the most important settings in that file:
+
+ <variablelist>
+ <varlistentry><term><literal>DEBUG</literal></term>
+ <listitem><para>
+ If set to 1, the software is
+ compiled with debugging libraries (code generation is
+ multi-threaded debug DLL).
+ If set to 0, the software is compiled with release libraries
+ (code generation is multi-threaded DLL).
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>HAVE_TCL</literal>, <literal>TCL</literal></term>
+ <listitem><para>
+ If <literal>HAVE_TCL</literal> is set to 1, nmake will
+ use the ASN.1 compiler (Tcl based). You must set
+ <literal>TCL</literal> to the full path of the Tcl
+ interpreter.
+ </para>
+ <para>
+ If you do not have Tcl installed, set
+ <literal>HAVE_TCL</literal> to 0.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>HAVE_BISON</literal>,
+ <literal>BISON</literal></term>
+ <listitem><para>
+ If GNU Bison is present, you might set <literal>HAVE_ICONV</literal>
+ to 1 and specify the Bison executable in <literal>BISON</literal>.
+ Bison is only required if you use the CVS version of
+ YAZ or if you modify the grammar for CQL
+ (<filename>cql.y</filename>).
+ </para>
+ <para>
+ GNU Bison for Windows is part of
+ <ulink url="http://unxutils.sourceforge.net/">unxutils</ulink>.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>HAVE_ICONV</literal>,
+ <literal>ICONV_DIR</literal></term>
+ <listitem><para>
+ If <literal>HAVE_ICONV</literal> is set to 1, YAZ is compiled
+ with iconv support. In this configuration, set
+ <literal>ICONV_DIR</literal> to the iconv source directory.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>HAVE_LIBXML2</literal>,
+ <literal>LIBXML2_DIR</literal></term>
+ <listitem>
+ <para>
+ If <literal>HAVE_LIBXML2</literal> is set to 1, YAZ is compiled
+ with SRW (and SOAP) support. In this configuration, set
+ <literal>LIBXML2_DIR</literal> to the
+ <ulink url="http://www.xmlsoft.org/">libxml2</ulink> source directory.
+ </para>
+
+ <para>
+ Windows versions of libxml2 and iconv can be found
+ <ulink url="http://www.zlatkovic.com/projects/libxml/binaries.html">
+ here</ulink>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </para>
+ <para>
+ When satisfied with the settings in the makefile, type
+ <screen>
+ nmake
+ </screen>
+ </para>
+ <note>
+ <para>
+ If the <filename>nmake</filename> command is not found on your system
+ you probably haven't defined the environment variables required to
+ use that tool. To fix that, find and run the batch file
+ <filename>vcvars32.bat</filename>. You need to run it from within
+ the command prompt or set the environment variables "globally";
+ otherwise it doesn't work.
+ </para>
+ </note>
+ <para>
+ If you wish to recompile &yaz; - for example if you modify
+ settings in the <filename>makefile</filename> you can delete
+ object files, etc by running.
+ <screen>
+ nmake clean
+ </screen>
+ </para>
+ <para>
+ The following files are generated upon successful compilation:
+
+ <variablelist>
+ <varlistentry><term><filename>bin/yaz.dll</filename></term>
+ <listitem><para>
+ &yaz; multi-threaded Dynamic Link Library.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>lib/yaz.lib</filename></term>
+ <listitem><para>
+ Import library for <filename>yaz.dll</filename>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>bin/yaz-client.exe</filename></term>
+ <listitem><para>
+ &yaz; Z39.50 client application. It's a WIN32 console application.
+ See chapter <link linkend="client">YAZ client</link> for more
+ information.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>bin/yaz-ztest.exe</filename></term>
+ <listitem><para>
+ Z39.50 multi-threaded test/example server. It's a WIN32
+ console application.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>bin/zoomsh.exe</filename></term>
+ <listitem><para>
+ Simple console application implemented on top of the
+ <link linkend="zoom">ZOOM</link> functions.
+ The application is a command line shell that allows you to enter
+ simple commands to perform ZOOM operations.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>bin/zoomtst1.exe</filename>,
+ <filename>bin/zoomtst2.exe</filename>, ..</term>
+ <listitem><para>
+ Several small applications that demonstrates the ZOOM API.
+ </para></listitem></varlistentry>
+
+ </variablelist>
+
+ </para>
+ </sect2>
+
+ <sect2><title>How to make apps using YAZ on WIN32</title>
+ <para>
+ This section will go though the process of linking your WIN32
+ applications with &yaz;.
+ </para>
+ <para>
+ Some people are confused by the fact that we use the nmake
+ tool to build &yaz;. They think they have to do that too - in order
+ to make their WIN32 applications work with &yaz;. The good news is that
+ you don't have to. You can use the integrated environment of
+ Visual Studio if desired for your own application.
+ </para>
+ <para>
+ When setting up a project or Makefile you have to set the following:
+ <variablelist>
+ <varlistentry><term>include path</term><listitem><para>
+ Set it to the <filename>include</filename> directory of &yaz;.
+ </para></listitem></varlistentry>
+ <varlistentry><term>import library <filename>yaz.lib</filename>
+ </term><listitem><para>
+ You must link with this library. It's located in the
+ sub directory <filename>lib</filename> of &yaz;.
+ </para></listitem></varlistentry>
+ <varlistentry><term>dynamic link library <filename>yaz.dll</filename>
+ </term><listitem><para>
+ This DLL must be in your execution path when you invoke
+ your application. Specifically, you should distribute this
+ DLL with your application.
+ </para></listitem></varlistentry>
+ </variablelist>
+ </para>
+ </sect2>