source: yaz/trunk/fuentes/doc/installation.win32.html @ 255

Last change on this file since 255 was 255, checked in by mabarracus, 4 years ago

added trusty code to xenial

File size: 13.0 KB
1<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
2   an installer from
3   <a class="ulink" href="" target="_top">here</a>.
4   The installer comes with source too - in case you wish to
5   compile YAZ with different compiler options, etc.
6   </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>
7     YAZ is shipped with "makefiles" for the NMAKE tool that comes
8     with <a class="ulink" href="" target="_top">
9     Microsoft Visual Studio</a>. It has been tested with
10     Microsoft Visual Studio 2013.
11    </p><p>
12     Start a command prompt and switch the sub directory
13     <code class="filename">WIN</code> where the file <code class="filename">makefile</code>
14     is located. Customize the installation by editing the
15     <code class="filename">makefile</code> file (for example by using notepad).
16     The following summarizes the most important settings in that file:
17     </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">DEBUG</code></span></dt><dd><p>
18        If set to 1, the software is
19        compiled with debugging libraries (code generation is
20        multi-threaded debug DLL).
21        If set to 0, the software is compiled with release libraries
22        (code generation is multi-threaded DLL).
23       </p></dd><dt><span class="term"><code class="literal">HAVE_TCL</code>, <code class="literal">TCL</code></span></dt><dd><p>
24        If <code class="literal">HAVE_TCL</code> is set to 1, nmake will
25        use the ASN.1 compiler (<a class="ulink" href="" target="_top">Tcl</a> based).
26        You must set <code class="literal">TCL</code> to the full path of the Tcl
27        interpreter. A Windows version of Tcl is part of
28        <a class="ulink" href="" target="_top">Git for Windows</a>.
29       </p><p>
30        If you do not have Tcl installed, set
31        <code class="literal">HAVE_TCL</code> to 0.
32       </p></dd><dt><span class="term"><code class="literal">HAVE_BISON</code>,
33       <code class="literal">BISON</code></span></dt><dd><p>
34        If GNU Bison is present, you might set <code class="literal">HAVE_BISON</code>
35        to 1 and specify the Bison executable in <code class="literal">BISON</code>.
36        Bison is only required if you use the Git version of
37        YAZ or if you modify the grammar for CQL
38        (<code class="filename">cql.y</code>).
39       </p><p>
40        A Windows version of GNU Bison is part of
41        <a class="ulink" href="" target="_top">Git for Windows</a>.
42       </p></dd><dt><span class="term"><code class="literal">HAVE_ICONV</code>,
43       <code class="literal">ICONV_DIR</code></span></dt><dd><p>
44        If <code class="literal">HAVE_ICONV</code> is set to 1, YAZ is compiled
45        with iconv support. In this configuration, set
46        <code class="literal">ICONV_DIR</code> to the iconv source directory.
47       </p></dd><dt><span class="term"><code class="literal">HAVE_LIBXML2</code>,
48       <code class="literal">LIBXML2_DIR</code></span></dt><dd><p>
49         If <code class="literal">HAVE_LIBXML2</code> is set to 1, YAZ is compiled
50         with SRU support. In this configuration, set
51         <code class="literal">LIBXML2_DIR</code> to the
52         <a class="ulink" href="" target="_top">libxml2</a> source directory.
53        </p><p>
54         You can get pre-compiled Libxml2+Libxslt DLLs and headers from
55         <a class="ulink" href="" target="_top">here</a>.
56         Should you with to compile those libraries yourself, refer to
57         to <a class="xref" href="" title="3.3. Compiling Libxml2 and Libxslt on windows">Section 3.3, &#8220;Compiling Libxml2 and Libxslt on windows&#8221;</a>
58        </p></dd><dt><span class="term"><code class="literal">HAVE_LIBXSLT</code>,
59       <code class="literal">LIBXSLT_DIR</code></span></dt><dd><p>
60         If <code class="literal">HAVE_LIBXSLT</code> is set to 1, YAZ is compiled
61         with XSLT support. In this configuration, set
62         <code class="literal">LIBXSLT_DIR</code> to the
63         <a class="ulink" href="" target="_top">libxslt</a> source directory.
64        </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
65          libxslt depends libxml2.
66         </p></div></dd><dt><span class="term"><code class="literal">HAVE_ICU</code>,
67       <code class="literal">ICU_DIR</code></span></dt><dd><p>
68         If <code class="literal">HAVE_ICU</code> is set to 1, YAZ is compiled
69         with <a class="ulink" href="" target="_top">ICU</a> support.
70         In this configuration, set
71         <code class="literal">ICU_DIR</code> to the
72         <a class="ulink" href="" target="_top">ICU</a> source directory.
73        </p></dd></dl></div><p>
74    </p><p>
75     When satisfied with the settings in the makefile, type
76     </p><pre class="screen">
77      nmake
78     </pre><p>
79    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
80      If the <code class="filename">nmake</code> command is not found on your system
81      you probably haven't defined the environment variables required to
82      use that tool. To fix that, find and run the batch file
83      <code class="filename">vcvars32.bat</code>. You need to run it from within
84      the command prompt or set the environment variables "globally";
85      otherwise it doesn't work.
86     </p></div><p>
87     If you wish to recompile YAZ - for example if you modify
88     settings in the <code class="filename">makefile</code> you can delete
89     object files, etc by running.
90     </p><pre class="screen">
91      nmake clean
92     </pre><p>
93    </p><p>
94     The following files are generated upon successful compilation:
95     </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="filename">bin/yaz5.dll</code> /
96       <code class="filename">bin/yaz5d.dll</code></span></dt><dd><p>
97        YAZ Release/Debug DLL.
98       </p></dd><dt><span class="term"><code class="filename">lib/yaz5.lib</code> /
99       <code class="filename">lib/yaz5d.lib</code></span></dt><dd><p>
100        Import library for <code class="filename">yaz5.dll</code> /
101        <code class="filename">yaz5d.dll</code>.
102      </p></dd><dt><span class="term"><code class="filename">bin/yaz_cond5.dll</code> /
103       <code class="filename">bin/yaz_cond5d.dll</code></span></dt><dd><p>
104        Release/Debug DLL for condition variable utilities (condvar.c).
105       </p></dd><dt><span class="term"><code class="filename">lib/yaz_cond5.lib</code> /
106       <code class="filename">lib/yaz_cond5d.lib</code></span></dt><dd><p>
107        Import library for <code class="filename">yaz_cond5.dll</code> /
108        <code class="filename">yaz_cond5d.dll</code>.
109       </p></dd><dt><span class="term"><code class="filename">bin/yaz_icu5.dll</code> /
110       <code class="filename">bin/yaz_icu5d.dll</code></span></dt><dd><p>
111        Release/Debug DLL for the ICU wrapper utility.
112        Only build if HAVE_ICU is 1.
113       </p></dd><dt><span class="term"><code class="filename">lib/yaz_icu5.lib</code> /
114       <code class="filename">lib/yaz_icu5d.lib</code></span></dt><dd><p>
115        Import library for <code class="filename">yaz_icu5.dll</code> /
116        <code class="filename">yaz_icu5d.dll</code>.
117       </p></dd><dt><span class="term"><code class="filename">bin/yaz-ztest.exe</code></span></dt><dd><p>
118        Z39.50 multi-threaded test/example server. It's a WIN32
119        console application.
120      </p></dd><dt><span class="term"><code class="filename">bin/yaz-client.exe</code></span></dt><dd><p>
121        YAZ Z39.50 client application. It's a WIN32 console application.
122        See chapter <a class="link" href="yaz-client.html" title="yaz-client">YAZ client</a> for more
123        information.
124      </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
125       is enabled for YAZ. Only if ICU is available this program is
126       build.
127      </p></dd><dt><span class="term"><code class="filename">bin/zoomsh.exe</code></span></dt><dd><p>
128        Simple console application implemented on top of the
129        <a class="link" href="zoom.html" title="Chapter 3. ZOOM">ZOOM</a> functions.
130        The application is a command line shell that allows you to enter
131        simple commands to perform ZOOM operations.
132      </p></dd><dt><span class="term"><code class="filename">bin/zoomtst1.exe</code>,
133       <code class="filename">bin/zoomtst2.exe</code>, ..</span></dt><dd><p>
134        Several small applications that demonstrates the ZOOM API.
135      </p></dd></dl></div><p>
136    </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>
137     This section will go though the process of linking your Windows
138     applications with YAZ.
139    </p><p>
140     Some people are confused by the fact that we use the nmake
141     tool to build YAZ. They think they have to do that too - in order
142     to make their Windows applications work with YAZ. The good news is that
143     you don't have to. You can use the integrated environment of
144     Visual Studio if desired for your own application.
145    </p><p>
146     When setting up a project or Makefile you have to set the following:
147     </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">include path</span></dt><dd><p>
148        Set it to the <code class="filename">include</code> directory of YAZ.
149        </p></dd><dt><span class="term">import library <code class="filename">yaz5.lib</code></span></dt><dd><p>
150        You must link with this library. It's located in the
151        sub directory <code class="filename">lib</code> of YAZ.
152        If you want to link with the debug version of YAZ, you must
153        link against <code class="filename">yaz5d.lib</code> instead.
154       </p></dd><dt><span class="term">dynamic link library
155       <code class="filename">yaz5.dll</code>
156       </span></dt><dd><p>
157        This DLL must be in your execution path when you invoke
158        your application. Specifically, you should distribute this
159        DLL with your application.
160       </p></dd></dl></div><p>
161    </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name=""></a>3.3. Compiling Libxml2 and Libxslt on windows</h3></div></div></div><p>
162     Download libxml2 and Libxslt source and unpack it.
163     In the example below we install  Libxml2 2.9.2 and Libxslt 1.1.28
164     for 32-bit, so we  use the destination directories
165     libxml2.2.9.2.win32 and libxslt-1.1.28.win32 to reflect both
166     version and architecture.
167     </p><pre class="screen">
168      cd win32
169      cscript configure.js prefix=c:\libxml2-2.9.2.win32 iconv=no
170      nmake
171      nmake install
172     </pre><p>
173    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
174      There's an error in <code class="filename">configure.js</code> for Libxml2 2.9.2.
175      Line 17 should be assigned to <code class="filename"></code>
176      rather than <code class="filename"></code>.
177     </p></div><p>
178     For Libxslt it is similar. We must ensure that compilation of
179     Libxslt links against the already installed libxml2.
180     </p><pre class="screen">
181      cd win32
182      cscript configure.js prefix=c:\libxslt-1.1.28.win32 iconv=no \
183          lib=c:\libxml2-2.9.2.win32\lib \
184          include=c:\libxml2-2.9.2.win32\include\libxml2
185      nmake
186      nmake install
187     </pre><p>
188    </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>
Note: See TracBrowser for help on using the repository browser.