]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // |
2 | // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) | |
3 | // | |
4 | // Distributed under the Boost Software License, Version 1.0. (See | |
5 | // accompanying file LICENSE_1_0.txt or copy at | |
6 | // http://www.boost.org/LICENSE_1_0.txt) | |
7 | // | |
8 | ||
9 | ||
10 | // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen | |
11 | /*! | |
12 | \page gettext_for_windows Using Gettext Tools on Windows | |
13 | ||
14 | In order to get the Gettext tools like \c msgfmt, \c msgmerge, \c xgettext for Windows you have | |
15 | basically several options: | |
16 | ||
17 | - Download the package from <a href="http://cppcms.sourceforge.net">CppCMS</a> project (where the Boost.Locale was developed originally) | |
18 | - Download the a set of packages from MinGW project | |
19 | - Build it on your own | |
20 | - Use Cygwin's packages | |
21 | ||
22 | \section gettext_for_windows_cppcms Getting gettext utilities from CppCMS project | |
23 | ||
24 | Boost.Locale was developed for needs of <a href="http://cppcms.sourceforge.net">CppCMS</a> project | |
25 | and thus CppCMS hosts a convince package for Windows users of pre-build, statically liked \c gettext | |
26 | runtime utilities like \c xgettext, \c msgfmt, etc. | |
27 | ||
28 | So you can download a zip file \c gettext-tools-static-XXX.zip from a CppCMS downloads page | |
29 | under <a href="https://sourceforge.net/projects/cppcms/files/boost_locale/gettext_for_windows/">boost_locale/gettext_for_windows</a>. | |
30 | ||
31 | Extract the file and use the executable files inside. | |
32 | ||
33 | \section gettext_for_windows_mingw Getting Gettext via MinGW project | |
34 | ||
35 | MinGW project provides GNU tools for Windows, including GNU compilers and various runtime utilities. | |
36 | Thus you can always install full MinGW distribution including gettext tools. However, if you | |
37 | a want minimalistic runtime version that allows you to extract messages and create catalogs | |
38 | you need to download several packages manually. | |
39 | ||
40 | In order to install Gettext via MinGW distributing you need to download, a GCC's runtime, | |
41 | iconv library and gettext itself. | |
42 | ||
43 | So visit a <a href="https://sourceforge.net/projects/mingw/files/">downloads page</a> of MinGW project | |
44 | and download following files (chose the latest versions of each package): | |
45 | ||
46 | - From: \c MinGW/BaseSystem/GCC/Version4/gcc-xxx/ \n | |
47 | File: \c libgcc-xxx-mingw32-dll-1.tar.lzma | |
48 | - From \c MinGW/Gettext/gettext-yyy/ \n | |
49 | Files: \c gettext-yyy-mingw32-dev.tar.lzma, | |
50 | \c libgettextpo-yyy-mingw32-dll-0.tar.lzma, | |
51 | \c libintl-yyy-mingw32-dll-8.tar.lzma | |
52 | - From \c MinGW/libiconv/libiconv-zzz/ \n | |
53 | Files: \c libiconv-zzz-mingw32-dll-2.tar.lzma, \c libcharset-zzz-mingw32-dll-1.tar.lzma | |
54 | ||
55 | For example, at June 23, 2011 it was: | |
56 | ||
57 | - GNU Runtime: \c libgcc-4.5.2-1-mingw32-dll-1.tar.lzma | |
58 | - \c iconv: \c libiconv-1.13.1-1-mingw32-dll-2.tar.lzma and \c libcharset-1.13.1-1-mingw32-dll-1.tar.lzma | |
59 | - \c gettext: \c libintl-0.17-1-mingw32-dll-8.tar.lzma, \c libgettextpo-0.17-1-mingw32-dll-0.tar.lzma and \c gettext-0.17-1-mingw32-dev.tar.lzma. | |
60 | ||
61 | After you download the packages, extract all the files to the same directory using tools like | |
62 | \c 7zip and you'll get all the executables and \c dll's you need under \c bin subdirectory. | |
63 | ||
64 | \note the version on MinGW site is slightly outdated (0.17.1) while gettext provides currently 0.18.1. | |
65 | ||
66 | \section gettext_for_windows_build Building latest version on your own. | |
67 | ||
68 | You can build your own version of GNU Gettext using MinGW environment, you'll need to have up-to-date gcc compiler | |
69 | and the shell, you'll need to install iconv first and then build a gettext with it. | |
70 | ||
71 | Basic and simplest way would be to open a MinGW shell | |
72 | ||
73 | Build \c iconv: | |
74 | ||
75 | \code | |
76 | cd libiconv-SOMEVERSION | |
77 | ./configure --prefix=c:/mygettext --disable-shared | |
78 | make | |
79 | make install | |
80 | cd .. | |
81 | cd gettext-SOMEVERSION | |
82 | ./configure --prefix=c:/mygettext --disable-shared --with-libiconv-prefix=c:/mygettext | |
83 | make | |
84 | make install | |
85 | \endcode | |
86 | ||
87 | And now you have in <tt>c:\\mygettext\\bin</tt> all appropriate executable files | |
88 | to use. | |
89 | ||
90 | \section gettext_for_windows_cygwin Using Cygwin | |
91 | ||
92 | If you already have Cygwin - just use gettext tools provided with it. | |
93 | ||
94 | */ | |
95 | ||
96 |