aspell: WIN32 Notes

1 
1 E.8 WIN32 Notes
1 ===============
1 
1 E.8.1 Getting the WIN32 version
1 -------------------------------
1 
1 The latest version of the native Aspell/WIN32 port, including binaries,
1 can be found at `http://aspell.net/win32'.  This page has,
1 unfortunately, not been updated for Aspell 0.60.  If you are interested
1 in updated the native port please let me know.
1 
1 E.8.2 Building the WIN32 version
1 --------------------------------
1 
1 There are two basically different ways of building Aspell using GCC for
1 WIN32: You can either use the Cygwin compiler, which will produce
1 binaries that depend on the POSIX layer in `cygwin1.dll'.  The other
1 way is using MinGW GCC, those binaries use the native C runtime from
1 Microsoft (MSVCRT.DLL).
1 
1 E.8.2.1 Building Aspell using Cygwin
1 ....................................
1 
1 This works exactly like on other POSIX compatible systems using the
1 `./configure && make && make install' cycle.  Some versions of Cygwin
1 GCC will fail to link, this is caused by an incorrect `libstdc++.la' in
1 the `/lib' directory.  After removing or renaming this file, the build
1 progress should work (GCC-2.95 and GCC-3.x should work).
1 
1 E.8.2.2 Building Aspell using MinGW
1 ...................................
1 
1 There are several different ways to build Aspell using MinGW.  The
1 easiest way is to use a Cygwin compiler but instruct it to build a
1 native binary rather than a Cygwin one.  To do this configure with:
1 
1      ./configure CFLAGS='-O2 -mno-cygwin' CXXFLAGS='-O2 -mno-cygwin'
1 
1    You may also want to add the option `--enable-win32-relocatable' to
1 use more windows friendly directories.  ⇒Win32-Directories.  In
1 this case configure with:
1 
1      ./configure CFLAGS='-O2 -mno-cygwin' CXXFLAGS='-O2 -mno-cygwin' --enable-win32-relocatable
1 
1    It should also be possible to build Aspell using the MSYS
1 environment.  But this has not been very well tested.  If building with
1 MSYS _do not_ add `CFLAGS ...' to configure.
1 
1 E.8.2.3 Building Aspell without using Cygwin or MSYS
1 ....................................................
1 
1 It is also possible to build Aspell without Cygwin of MinGW by using
1 the files in the `win32/' subdirectory.  However, these files have not
1 been updated to work with Aspell 0.60.  Thus the following instructions
1 will not work without some effort.  If you do get Aspell to compile
1 this way please send me the updated files so that I can include them
1 with the next release.
1 
1    To compile Aspell with the MinGW compiler, you will need at least
1 GCC-3.2 (as shipped with MinGW-2.0.3) and some GNU tools like `rm' and
1 `cp'.  The origin of those tools doesn't matter, it has shown to work
1 with any tools from MinGW/MSys, Cygwin or Linux.  To build Aspell, move
1 into the `win32' subdirectory and type `make'.  You can enable some
1 additional build options by either commenting out the definitions at
1 the head of the Makefile or passing those values as environment
1 variables or at the `make' command line.  Following options are
1 supported:
1 
1 `DEBUGVERSION'
1      If set to "1", the binaries will include debugging information
1      (resulting in a much bigger size).
1 
1 `CURSESDIR'
1      Enter the path to the pdcurses library here, in order to get a
1      nicer console interface (see below).
1 
1 `MSVCLIB'
1      Enter the filename of MS `lib.exe' here, if you want to build
1      libraries that can be imported from MS Visual C++.
1 
1 `WIN32_RELOCATABLE'
1      If set to "1", Aspell will detect the prefix from the path where
1      the DLL resides (see below for further details).
1 
1 `TARGET'
1      Sets a prefix to be used for cross compilation (e.g.
1      `/usr/local/bin/i586-mingw32msvc-' to cross compile from Linux).
1 
1    There are also a MinGW compilers available for Cygwin and Linux, both
1 versions are able to compile Aspell using the prebuilt `Makefile'.
1 While the Cygwin port automatically detects the correct compiler, the
1 Linux version depends on setting the `TARGET' variable in the
1 `Makefile' (or environment) to the correct compiler prefix.
1 
1    Other compilers may work.  There is a patch for MS Visual C++ 6.0
1 available at `ftp://ftp.gnu.org/gnu/aspell', but it needs a lot of
1 changes to the Aspell sources.  It has also been reported that the
1 Intel C++ compiler can be used for compilation.
1 
1 E.8.3 (PD)Curses
1 ----------------
1 
1 In order to get the nice full screen interface when spell checking
1 files, a curses implementation that does not require Cygwin is
1 required.  The PDCurses (`http://pdcurses.sourceforge.net')
1 implementation is known to work, other implementations may work however
1 they have not been tested.  See the previous section for information on
1 specifying the location of the curses library and include file.
1 
1    Curses notes:
1 
1    * PDcurses built with MinGW needs to be compiled with
1      `-DPDC_STATIC_BUILD' to avoid duplicate declaration of `DllMain'
1      when compiling `aspell.exe'.
1 
1    * The curses enabled version can cause trouble in some shells (MSys
1      `rxvt', `emacs') and will produce errors like `initscr() LINES=1
1      COLS=1: too small'.  Use a non-curses version for those purposes.
1 
1 E.8.4 Directories
1 -----------------
1 
1 If Aspell is configured with `--enable-win32-relocatable' or compiled
1 with `WIN32_RELOCATABLE=1' when using a Makefile, it can be run from
1 any directory: it will set `PREFIX' according to its install location
1 (assuming it resides in `PREFIX\\bin').  Your personal wordlists will
1 be saved in the `PREFIX' directory with their names changed from
1 `.aspell.LANG.*' to `LANG.*' (you can override the path by setting the
1 `HOME' environment variable).
1 
1 E.8.5 Installer
1 ---------------
1 
1 The installer registers the DLLs as shared libraries, you should
1 increase the reference counter to avoid the libraries being uninstalled
1 if your application still depends on them (and decrease it again when
1 uninstalling your program).  The reference counters are located under:
1      HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
1 
1    The install location and version numbers are stored under
1 
1      HKLM\SOFTWARE\Aspell
1 
1 E.8.6 WIN32 consoles
1 --------------------
1 
1 The console uses a different encoding than GUI applications, changing
1 this to to a Windows encoding (e.g.  1252) is not supported on
1 Win9x/Me.  On WinNT (and later) those codepages can be set by first
1 changing the console font to `lucida console', then changing the
1 codepage using `chcp 1252'.
1 
1    Some alternative shells (e.g. MSys' `rxvt' or Cygwin's `bash') do a
1 codepage conversion (if correctly set up), so running Aspell inside
1 those shells might be a workaround for Win9x.
1