5d992971927dcd4ed94013d1bf1b28ed4d3b237e
[platform/upstream/aspell.git] / manual / aspell.html / WIN32-Notes.html
1 <html lang="en">
2 <head>
3 <title>WIN32 Notes - GNU Aspell 0.60.6.1</title>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5 <meta name="description" content="Aspell 0.60.6.1 spell checker user's manual.">
6 <meta name="generator" content="makeinfo 4.8">
7 <link title="Top" rel="start" href="index.html#Top">
8 <link rel="up" href="Installing.html#Installing" title="Installing">
9 <link rel="prev" href="Upgrading-from-a-Pre_002d0_002e50-snapshot.html#Upgrading-from-a-Pre_002d0_002e50-snapshot" title="Upgrading from a Pre-0.50 snapshot">
10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
11 <!--
12 This is the user's manual for Aspell
13
14 GNU Aspell is a spell checker designed to eventually replace Ispell.
15 It can either be used as a library or as an independent spell checker.
16
17 Copyright (C) 2000--2011 Kevin Atkinson.
18
19      Permission is granted to copy, distribute and/or modify this
20      document under the terms of the GNU Free Documentation License,
21      Version 1.1 or any later version published by the Free Software
22      Foundation; with no Invariant Sections, no Front-Cover Texts and
23      no Back-Cover Texts.  A copy of the license is included in the
24      section entitled "GNU Free Documentation License".
25    -->
26 <meta http-equiv="Content-Style-Type" content="text/css">
27 <style type="text/css"><!--
28   pre.display { font-family:inherit }
29   pre.format  { font-family:inherit }
30   pre.smalldisplay { font-family:inherit; font-size:smaller }
31   pre.smallformat  { font-family:inherit; font-size:smaller }
32   pre.smallexample { font-size:smaller }
33   pre.smalllisp    { font-size:smaller }
34   span.sc    { font-variant:small-caps }
35   span.roman { font-family:serif; font-weight:normal; } 
36   span.sansserif { font-family:sans-serif; font-weight:normal; } 
37 --></style>
38 </head>
39 <body>
40 <div class="node">
41 <p>
42 <a name="WIN32-Notes"></a>
43 Previous:&nbsp;<a rel="previous" accesskey="p" href="Upgrading-from-a-Pre_002d0_002e50-snapshot.html#Upgrading-from-a-Pre_002d0_002e50-snapshot">Upgrading from a Pre-0.50 snapshot</a>,
44 Up:&nbsp;<a rel="up" accesskey="u" href="Installing.html#Installing">Installing</a>
45 <hr>
46 </div>
47
48 <h3 class="appendixsec">E.8 WIN32 Notes</h3>
49
50 <h4 class="appendixsubsec">E.8.1 Getting the WIN32 version</h4>
51
52 <p>The latest version of the native Aspell/WIN32 port, including
53 binaries, can be found at <a href="http://aspell.net/win32">http://aspell.net/win32</a>.  This page
54 has, unfortunately, not been updated for Aspell 0.60.  If you are
55 interested in updated the native port please let me know.
56
57 <h4 class="appendixsubsec">E.8.2 Building the WIN32 version</h4>
58
59 <p>There are two basically different ways of building Aspell using GCC
60 for WIN32: You can either use the Cygwin compiler, which will produce
61 binaries that depend on the POSIX layer in <samp><span class="file">cygwin1.dll</span></samp>.  The
62 other way is using MinGW GCC, those binaries use the native C runtime
63 from Microsoft (MSVCRT.DLL).
64
65 <!-- FIXME: Is the following true? -->
66 <!-- If you intend to use or link against the -->
67 <!-- Aspell libraries using a native WIN32 compiler (e.g.  MS Visual C++), -->
68 <!-- you will need the MinGW built ones to avoid problems caused by the -->
69 <!-- different runtime libraries. -->
70 <h5 class="appendixsubsubsec">E.8.2.1 Building Aspell using Cygwin</h5>
71
72 <p>This works exactly like on other POSIX
73 compatible systems using the `<samp><span class="samp">./configure &amp;&amp; make &amp;&amp; make install</span></samp>'
74 cycle.  Some versions of Cygwin GCC will fail to link, this is caused
75 by an incorrect <samp><span class="file">libstdc++.la</span></samp> in the <samp><span class="file">/lib</span></samp> directory. 
76 After removing or renaming this file, the build progress should work
77 (GCC-2.95 and GCC-3.x should work).
78
79 <h5 class="appendixsubsubsec">E.8.2.2 Building Aspell using MinGW</h5>
80
81 <p>There are several different ways to build Aspell using MinGW.  The
82 easiest way is to use a Cygwin compiler but instruct it to build a
83 native binary rather than a Cygwin one.  To do this configure with:
84
85 <pre class="example">     ./configure CFLAGS='-O2 -mno-cygwin' CXXFLAGS='-O2 -mno-cygwin'
86 </pre>
87    <p>You may also want to add the option
88 <samp><span class="option">--enable-win32-relocatable</span></samp> to use more windows friendly
89 directories.  See <a href="Win32_002dDirectories.html#Win32_002dDirectories">Win32-Directories</a>.  In this case configure with:
90
91 <pre class="smallexample">     ./configure CFLAGS='-O2 -mno-cygwin' CXXFLAGS='-O2 -mno-cygwin' --enable-win32-relocatable
92 </pre>
93    <p>It should also be possible to build Aspell using the MSYS environment. 
94 But this has not been very well tested.  If building with MSYS
95 <em>do not</em> add `<samp><span class="samp">CFLAGS ...</span></samp>' to configure.
96
97 <h5 class="appendixsubsubsec">E.8.2.3 Building Aspell without using Cygwin or MSYS</h5>
98
99 <p>It is also possible to build Aspell without Cygwin of MinGW by using
100 the files in the <samp><span class="file">win32/</span></samp> subdirectory.  However, these files
101 have not been updated to work with Aspell 0.60.  Thus the following
102 instructions will not work without some effort.  If you do get Aspell
103 to compile this way please send me the updated files so that I can
104 include them with the next release.
105
106    <p>To compile Aspell with the MinGW
107 compiler, you will need at least GCC-3.2 (as shipped with MinGW-2.0.3)
108 and some GNU tools like <samp><span class="command">rm</span></samp> and <samp><span class="command">cp</span></samp>.  The origin of
109 those tools doesn't matter, it has shown to work with any tools from
110 MinGW/MSys, Cygwin or Linux.  To build Aspell, move into the
111 <samp><span class="file">win32</span></samp> subdirectory and type `<samp><span class="samp">make</span></samp>'.  You can enable some
112 additional build options by either commenting out the definitions at
113 the head of the Makefile or passing those values as environment
114 variables or at the <samp><span class="command">make</span></samp> command line.  Following options
115 are supported:
116
117      <dl>
118 <dt><samp><span class="option">DEBUGVERSION</span></samp><dd>If set to "1", the binaries will include debugging information
119 (resulting in a much bigger size).
120
121      <br><dt><samp><span class="option">CURSESDIR</span></samp><dd>Enter the path to the pdcurses library here, in order to get a nicer
122 console interface (see below).
123
124      <br><dt><samp><span class="option">MSVCLIB</span></samp><dd>Enter the filename of MS <samp><span class="file">lib.exe</span></samp> here, if you want to build
125 libraries that can be imported from MS Visual C++.
126
127      <br><dt><samp><span class="option">WIN32_RELOCATABLE</span></samp><dd>If set to "1", Aspell will detect the prefix from the path where the
128 DLL resides (see below for further details).
129
130      <br><dt><samp><span class="option">TARGET</span></samp><dd>Sets a prefix to be used for cross compilation (e.g. 
131 <samp><span class="file">/usr/local/bin/i586-mingw32msvc-</span></samp> to cross compile from Linux). 
132 </dl>
133
134    <p>There are also a MinGW compilers available for Cygwin and Linux, both
135 versions are able to compile Aspell using the prebuilt
136 <samp><span class="file">Makefile</span></samp>.  While the Cygwin port automatically detects the
137 correct compiler, the Linux version depends on setting the
138 <samp><span class="env">TARGET</span></samp> variable in the <samp><span class="file">Makefile</span></samp> (or environment) to the
139 correct compiler prefix.
140
141    <p>Other compilers may work.  There is a patch for MS Visual C++ 6.0
142 available at <a href="ftp://ftp.gnu.org/gnu/aspell">ftp://ftp.gnu.org/gnu/aspell</a>, but it needs a lot
143 of changes to the Aspell sources.  It has also been reported that the
144 Intel C++ compiler can be used for compilation.
145
146 <h4 class="appendixsubsec">E.8.3 (PD)Curses</h4>
147
148 <p>In order to get the nice full screen interface when spell checking
149 files, a curses implementation that does not require Cygwin is
150 required.  The PDCurses (<a href="http://pdcurses.sourceforge.net">http://pdcurses.sourceforge.net</a>)
151 implementation is known to work, other implementations may work
152 however they have not been tested.  See the previous section for
153 information on specifying the location of the curses library and
154 include file.
155
156    <p>Curses notes:
157
158      <ul>
159 <li>PDcurses built with MinGW needs to be compiled with
160 <samp><span class="option">-DPDC_STATIC_BUILD</span></samp> to avoid duplicate declaration of
161 <samp><span class="file">DllMain</span></samp> when compiling <samp><span class="file">aspell.exe</span></samp>.
162
163      <li>The curses enabled version can cause trouble in some shells (MSys
164 <samp><span class="command">rxvt</span></samp>, <samp><span class="command">emacs</span></samp>) and will produce errors like
165 `<samp><span class="samp">initscr() LINES=1 COLS=1: too small</span></samp>'.  Use a non-curses version
166 for those purposes. 
167 </ul>
168
169    <p><a name="Win32_002dDirectories"></a>
170
171 <h4 class="appendixsubsec">E.8.4 Directories</h4>
172
173 <p>If Aspell is configured with <samp><span class="option">--enable-win32-relocatable</span></samp> or
174 compiled with <samp><span class="option">WIN32_RELOCATABLE=1</span></samp> when using a Makefile, it
175 can be run from any directory: it will set <samp><var>prefix</var></samp>
176 according to its install location (assuming it resides in
177 <samp><var>prefix</var><span class="file">\\bin</span></samp>).  Your personal wordlists will be saved in
178 the <samp><var>prefix</var></samp> directory with their names changed from
179 <samp><span class="file">.aspell.</span><var>lang</var><span class="file">.*</span></samp> to <samp><var>lang</var><span class="file">.*</span></samp> (you can override
180 the path by setting the <samp><span class="env">HOME</span></samp> environment variable).
181
182 <h4 class="appendixsubsec">E.8.5 Installer</h4>
183
184 <p>The installer registers the DLLs as shared libraries, you should
185 increase the reference counter to avoid the libraries being
186 uninstalled if your application still depends on them (and decrease it
187 again when uninstalling your program).  The reference counters are
188 located under:
189 <pre class="example">     HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
190 </pre>
191    <p>The install location and version numbers are stored under
192
193 <pre class="example">     HKLM\SOFTWARE\Aspell
194 </pre>
195    <h4 class="appendixsubsec">E.8.6 WIN32 consoles</h4>
196
197 <p>The console uses a different encoding than GUI applications, changing
198 this to to a Windows encoding (e.g.  1252) is not supported on
199 Win9x/Me.  On WinNT (and later) those codepages can be set by first
200 changing the console font to `<samp><span class="samp">lucida console</span></samp>', then changing the
201 codepage using `<samp><span class="samp">chcp 1252</span></samp>'.
202
203    <p>Some alternative shells (e.g. MSys' <samp><span class="command">rxvt</span></samp> or Cygwin's
204 <samp><span class="command">bash</span></samp>) do a codepage conversion (if correctly set up), so
205 running Aspell inside those shells might be a workaround for Win9x.
206
207    </body></html>
208