node-zoom
Version:
185 lines (184 loc) • 13 kB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.�Windows</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="installation.html" title="Chapter�2.�Compilation and Installation"><link rel="prev" href="installation.unix.html" title="2.�UNIX"><link rel="next" href="zoom.html" title="Chapter�3.�ZOOM"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.�Windows</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="installation.unix.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�Compilation and Installation</th><td width="20%" align="right">�<a accesskey="n" href="zoom.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="installation.win32"></a>3.�Windows</h2></div></div></div><p>The easiest way to install YAZ on Windows is by downloading
an installer from
<a class="ulink" href="http://ftp.indexdata.com/pub/yaz/win32/" target="_top">here</a>.
The installer comes with source too - in case you wish to
compile YAZ with different compiler options, etc.
</p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="installation.win32.source"></a>3.1.�Compiling from Source on Windows</h3></div></div></div><p>
YAZ is shipped with "makefiles" for the NMAKE tool that comes
with <a class="ulink" href="http://www.visualstudio.com" target="_top">
Microsoft Visual Studio</a>. It has been tested with
Microsoft Visual Studio 2013.
</p><p>
Start a command prompt and switch the sub directory
<code class="filename">WIN</code> where the file <code class="filename">makefile</code>
is located. Customize the installation by editing the
<code class="filename">makefile</code> file (for example by using notepad).
The following summarizes the most important settings in that file:
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">DEBUG</code></span></dt><dd><p>
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).
</p></dd><dt><span class="term"><code class="literal">HAVE_TCL</code>, <code class="literal">TCL</code></span></dt><dd><p>
If <code class="literal">HAVE_TCL</code> is set to 1, nmake will
use the ASN.1 compiler (<a class="ulink" href="http://www.tcl.tk/" target="_top">Tcl</a> based).
You must set <code class="literal">TCL</code> to the full path of the Tcl
interpreter. A Windows version of Tcl is part of
<a class="ulink" href="http://msysgit.github.io/" target="_top">Git for Windows</a>.
</p><p>
If you do not have Tcl installed, set
<code class="literal">HAVE_TCL</code> to 0.
</p></dd><dt><span class="term"><code class="literal">HAVE_BISON</code>,
<code class="literal">BISON</code></span></dt><dd><p>
If GNU Bison is present, you might set <code class="literal">HAVE_BISON</code>
to 1 and specify the Bison executable in <code class="literal">BISON</code>.
Bison is only required if you use the Git version of
YAZ or if you modify the grammar for CQL
(<code class="filename">cql.y</code>).
</p><p>
A Windows version of GNU Bison is part of
<a class="ulink" href="http://msysgit.github.io/" target="_top">Git for Windows</a>.
</p></dd><dt><span class="term"><code class="literal">HAVE_ICONV</code>,
<code class="literal">ICONV_DIR</code></span></dt><dd><p>
If <code class="literal">HAVE_ICONV</code> is set to 1, YAZ is compiled
with iconv support. In this configuration, set
<code class="literal">ICONV_DIR</code> to the iconv source directory.
</p></dd><dt><span class="term"><code class="literal">HAVE_LIBXML2</code>,
<code class="literal">LIBXML2_DIR</code></span></dt><dd><p>
If <code class="literal">HAVE_LIBXML2</code> is set to 1, YAZ is compiled
with SRU support. In this configuration, set
<code class="literal">LIBXML2_DIR</code> to the
<a class="ulink" href="http://xmlsoft.org/" target="_top">libxml2</a> source directory.
</p><p>
You can get pre-compiled Libxml2+Libxslt DLLs and headers from
<a class="ulink" href="http://ftp.indexdata.dk/pub/support/windows/" target="_top">here</a>.
Should you with to compile those libraries yourself, refer to
to <a class="xref" href="installation.win32.html#installation.windows.libxml2" title="3.3.�Compiling Libxml2 and Libxslt on windows">Section�3.3, “Compiling Libxml2 and Libxslt on windows”</a>
</p></dd><dt><span class="term"><code class="literal">HAVE_LIBXSLT</code>,
<code class="literal">LIBXSLT_DIR</code></span></dt><dd><p>
If <code class="literal">HAVE_LIBXSLT</code> is set to 1, YAZ is compiled
with XSLT support. In this configuration, set
<code class="literal">LIBXSLT_DIR</code> to the
<a class="ulink" href="http://xmlsoft.org/XSLT/" target="_top">libxslt</a> source directory.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
libxslt depends libxml2.
</p></div></dd><dt><span class="term"><code class="literal">HAVE_ICU</code>,
<code class="literal">ICU_DIR</code></span></dt><dd><p>
If <code class="literal">HAVE_ICU</code> is set to 1, YAZ is compiled
with <a class="ulink" href="http://www.icu-project.org/" target="_top">ICU</a> support.
In this configuration, set
<code class="literal">ICU_DIR</code> to the
<a class="ulink" href="http://www.icu-project.org/" target="_top">ICU</a> source directory.
</p></dd></dl></div><p>
</p><p>
When satisfied with the settings in the makefile, type
</p><pre class="screen">
nmake
</pre><p>
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
If the <code class="filename">nmake</code> 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
<code class="filename">vcvars32.bat</code>. You need to run it from within
the command prompt or set the environment variables "globally";
otherwise it doesn't work.
</p></div><p>
If you wish to recompile YAZ - for example if you modify
settings in the <code class="filename">makefile</code> you can delete
object files, etc by running.
</p><pre class="screen">
nmake clean
</pre><p>
</p><p>
The following files are generated upon successful compilation:
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="filename">bin/yaz5.dll</code> /
<code class="filename">bin/yaz5d.dll</code></span></dt><dd><p>
YAZ Release/Debug DLL.
</p></dd><dt><span class="term"><code class="filename">lib/yaz5.lib</code> /
<code class="filename">lib/yaz5d.lib</code></span></dt><dd><p>
Import library for <code class="filename">yaz5.dll</code> /
<code class="filename">yaz5d.dll</code>.
</p></dd><dt><span class="term"><code class="filename">bin/yaz_cond5.dll</code> /
<code class="filename">bin/yaz_cond5d.dll</code></span></dt><dd><p>
Release/Debug DLL for condition variable utilities (condvar.c).
</p></dd><dt><span class="term"><code class="filename">lib/yaz_cond5.lib</code> /
<code class="filename">lib/yaz_cond5d.lib</code></span></dt><dd><p>
Import library for <code class="filename">yaz_cond5.dll</code> /
<code class="filename">yaz_cond5d.dll</code>.
</p></dd><dt><span class="term"><code class="filename">bin/yaz_icu5.dll</code> /
<code class="filename">bin/yaz_icu5d.dll</code></span></dt><dd><p>
Release/Debug DLL for the ICU wrapper utility.
Only build if HAVE_ICU is 1.
</p></dd><dt><span class="term"><code class="filename">lib/yaz_icu5.lib</code> /
<code class="filename">lib/yaz_icu5d.lib</code></span></dt><dd><p>
Import library for <code class="filename">yaz_icu5.dll</code> /
<code class="filename">yaz_icu5d.dll</code>.
</p></dd><dt><span class="term"><code class="filename">bin/yaz-ztest.exe</code></span></dt><dd><p>
Z39.50 multi-threaded test/example server. It's a WIN32
console application.
</p></dd><dt><span class="term"><code class="filename">bin/yaz-client.exe</code></span></dt><dd><p>
YAZ Z39.50 client application. It's a WIN32 console application.
See chapter <a class="link" href="yaz-client.html" title="yaz-client">YAZ client</a> for more
information.
</p></dd><dt><span class="term"><code class="filename">bin/yaz-icu.exe</code></span></dt><dd><p>This program exposes the ICU wrapper library if that
is enabled for YAZ. Only if ICU is available this program is
build.
</p></dd><dt><span class="term"><code class="filename">bin/zoomsh.exe</code></span></dt><dd><p>
Simple console application implemented on top of the
<a class="link" href="zoom.html" title="Chapter�3.�ZOOM">ZOOM</a> functions.
The application is a command line shell that allows you to enter
simple commands to perform ZOOM operations.
</p></dd><dt><span class="term"><code class="filename">bin/zoomtst1.exe</code>,
<code class="filename">bin/zoomtst2.exe</code>, ..</span></dt><dd><p>
Several small applications that demonstrates the ZOOM API.
</p></dd></dl></div><p>
</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="installation-linking-yaz-win32"></a>3.2.�How to make apps using YAZ on Windows</h3></div></div></div><p>
This section will go though the process of linking your Windows
applications with YAZ.
</p><p>
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 Windows 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.
</p><p>
When setting up a project or Makefile you have to set the following:
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">include path</span></dt><dd><p>
Set it to the <code class="filename">include</code> directory of YAZ.
</p></dd><dt><span class="term">import library <code class="filename">yaz5.lib</code></span></dt><dd><p>
You must link with this library. It's located in the
sub directory <code class="filename">lib</code> of YAZ.
If you want to link with the debug version of YAZ, you must
link against <code class="filename">yaz5d.lib</code> instead.
</p></dd><dt><span class="term">dynamic link library
<code class="filename">yaz5.dll</code>
</span></dt><dd><p>
This DLL must be in your execution path when you invoke
your application. Specifically, you should distribute this
DLL with your application.
</p></dd></dl></div><p>
</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="installation.windows.libxml2"></a>3.3.�Compiling Libxml2 and Libxslt on windows</h3></div></div></div><p>
Download libxml2 and Libxslt source and unpack it.
In the example below we install Libxml2 2.9.2 and Libxslt 1.1.28
for 32-bit, so we use the destination directories
libxml2.2.9.2.win32 and libxslt-1.1.28.win32 to reflect both
version and architecture.
</p><pre class="screen">
cd win32
cscript configure.js prefix=c:\libxml2-2.9.2.win32 iconv=no
nmake
nmake install
</pre><p>
</p><p>
For Libxslt it is similar. We must ensure that compilation of
Libxslt links against the already installed libxml2.
</p><pre class="screen">
cd win32
cscript configure.js prefix=c:\libxslt-1.1.28.win32 iconv=no \
lib=c:\libxmlt-2.9.2.win32\lib \
include=c:\libxmlt-2.9.2.win32\include\libxml2
nmake
nmake install
</pre><p>
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="installation.unix.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="installation.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="zoom.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.�UNIX�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�3.�ZOOM</td></tr></table></div></body></html>