Difference between revisions of "Apertium on Windows"
Line 40: | Line 40: | ||
==== Getting the packages ==== |
==== Getting the packages ==== |
||
The easiest way to get the core packages, is to use the [http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780&release_id=529741 Automated MinGW Installer]. |
|||
<!-- |
|||
First, you need to download all the necessary MinGW components. According to the [http://www.mingw.org/download.shtml#Contents MinGW Download page], you need "mingw-runtime, w32api, binutils and gcc tarball packages" for a minimal installation. For our installation, we used (all of which come from the [http://sourceforge.net/project/showfiles.php?group_id=2435 MinGW Sourceforge download page]): |
First, you need to download all the necessary MinGW components. According to the [http://www.mingw.org/download.shtml#Contents MinGW Download page], you need "mingw-runtime, w32api, binutils and gcc tarball packages" for a minimal installation. For our installation, we used (all of which come from the [http://sourceforge.net/project/showfiles.php?group_id=2435 MinGW Sourceforge download page]): |
||
# mingw-runtime-3.13.tar.gz |
# mingw-runtime-3.13.tar.gz |
||
Line 46: | Line 49: | ||
# gcc-core-3.4.5-20060117-1.tar.gz |
# gcc-core-3.4.5-20060117-1.tar.gz |
||
# gcc-g++-3.4.5-20060117-1.tar.gz |
# gcc-g++-3.4.5-20060117-1.tar.gz |
||
You should also install MSYS, coreutils, gawk |
|||
⚫ | |||
# MSYS-1.0.11-20071204.tar.bz2 |
# MSYS-1.0.11-20071204.tar.bz2 |
||
# coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2 |
# coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2 |
||
⚫ | |||
--> |
|||
==== Installing the packages ==== |
==== Installing the packages ==== |
Revision as of 21:33, 18 December 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
- Check out the repository as normal using svn.
- Patch the apertium source this patch (save it as
no_unlocked.diff
)$ patch -p1 < no_unlocked.diff
- and this one too (save as
no_ansi.diff
)$ patch -p1 < no_ansi.diff
- Make and install lttoolbox
- ./autogen.sh
- make
- make install
- Make and install apertium (required the patches from above)
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
- ./autogen.sh
- make
Using Mingw
From Windows
PLEASE NOTE THAT WE DO NOT HAVE THIS WORKING YET. IF YOU CAN HELP US FILL IN THE REMAINING STEPS, WE WOULD BE GRATEFUL
Getting the packages
The easiest way to get the core packages, is to use the Automated MinGW Installer.
Installing the packages
You will need a way to unpack the downloaded files. 7Zip is an excellent open source utility that can unpack tar.gz and tar.bz2 files.
Create a directory to hold your MinGW installation. We will assume that it is c:\msys\1.0
.
Unpack each of the downloaded files, except for the GCC packages, into c:\msys\1.0
. This directory should look as follows after unpacking:
c: `-msys `-1.0 |-bin |-doc |-include |-lib `-man
Each of bin
, doc
, include
, lib
and man
should contain some files.
Now create a directory called mingw
under your installation directory. In our case, we will create c:\msys\1.0\mingw
. Unpack the GCC packages into c:\msys\1.0\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
- Check out the repository as normal using svn.
- Patch the apertium source this patch (save it as
no_unlocked.diff
)$ patch -p1 < no_unlocked.diff
- this one, (save as
no_ansi.diff
)$ patch -p1 < no_ansi.diff
- also this one (save as
autogen.diff
)$ patch -p1 < autogen.diff
- and this one (save as
ushort.diff
)$ patch -p1 < ushort.diff
- Make and install lttoolbox
- ./autogen.sh
- make
- make install
From Windows
One could look into using the official MinGW package. This would allow compiling the packages on Linux.