Difference between revisions of "Apertium on Windows"

From Apertium
Jump to navigation Jump to search
Line 68: Line 68:
 
# Patch the apertium source [[Apertium on Windows/No Unlocked Patch|this patch]] (save it as <code>no_unlocked.diff</code>)
 
# Patch the apertium source [[Apertium on Windows/No Unlocked Patch|this patch]] (save it as <code>no_unlocked.diff</code>)
 
#: <code>$ patch -p1 < no_unlocked.diff</code>
 
#: <code>$ patch -p1 < no_unlocked.diff</code>
# and [[Apertium on Windows/No ANSI Patch|this one]] too (save as <code>no_ansi.diff</code>)
+
# [[Apertium on Windows/No ANSI Patch|this one]], (save as <code>no_ansi.diff</code>)
 
#: <code>$ patch -p1 < no_ansi.diff</code>
 
#: <code>$ patch -p1 < no_ansi.diff</code>
# and also [[Apertium on Windows/Autogen|this one]] (save as <code>autogen.diff</code>)
+
# also [[Apertium on Windows/Autogen|this one]] (save as <code>autogen.diff</code>)
 
#: <code>$ patch -p1 < autogen.diff</code>
 
#: <code>$ patch -p1 < autogen.diff</code>
  +
# and [[Apertium on Windows/Ushort patch|this one]] (save as <code>ushort.diff</code>)
  +
#: <code>$ patch -p1 < ushort.diff</code>
 
# Make and install lttoolbox
 
# Make and install lttoolbox
 
## ./autogen.sh
 
## ./autogen.sh

Revision as of 14:43, 22 July 2007

Using Cygwin

It is possible to compile Apertium for use on windows using Cygwin, which provides a UNIX-like environment in windows.

Before you begin you should install the cygwin with the following additional packages, if you find this list incomplete please update it.

  • autoconf (Devel)
  • automake (Devel)
  • flex (Devel)
  • libgcrypt (Libs)
  • libtool (Devel)
  • libxml2 (Devel)
  • libxml2-devel (Devel)
  • libxslt (Libs)
  • pkg-config (Devel)
  • subversion (Devel)

Steps

  1. Check out the repository as normal using svn.
  2. Patch the apertium source this patch (save it as no_unlocked.diff)
    $ patch -p1 < no_unlocked.diff
  3. and this one too (save as no_ansi.diff)
    $ patch -p1 < no_ansi.diff
  4. Make and install lttoolbox
    1. ./autogen.sh
    2. make
    3. make install
  5. Make and install apertium (required the patches from above)
    1. export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
    2. ./autogen.sh
    3. make

Using Mingw

From Linux (cross-compiling) (Debian/Ubuntu)

Because some of the packages required to compile Apertium are not ported to MinGW, we can make a cross-compiling in order to use Linux-based programs (e.g FLEX).

These instructions have been tested using Ubuntu 7.04 Feisty Fawn.


Setting up the environment

Packages required

  • mingw32 3.4.5 (Ubuntu package)
  • mingw32-binutils 2.16.91 (Ubuntu package)
  • mingw32-runtime 3.12 (You need to install last Debian package from here)
  • mingw32-libxml ^
  • mingw32-libxml-dev ^
  • mingw32-glib ^
  • mingw32-glib-dev ^
  • mingw32-libiconv ^
  • mingw32-libiconv-dev ^
  • mingw32-libz ^
  • mingw32-libz-dev ^
  • mingw32-pkgconfig ^

It is possible that some packages are not really required.

^ You can get them from this repository

Steps

  1. Check out the repository as normal using svn.
  2. Patch the apertium source this patch (save it as no_unlocked.diff)
    $ patch -p1 < no_unlocked.diff
  3. this one, (save as no_ansi.diff)
    $ patch -p1 < no_ansi.diff
  4. also this one (save as autogen.diff)
    $ patch -p1 < autogen.diff
  5. and this one (save as ushort.diff)
    $ patch -p1 < ushort.diff
  6. Make and install lttoolbox
    1. ./autogen.sh
    2. make
    3. make install

From Windows

One could look into using the official MinGW package. This would allow compiling the packages on Linux.