blob: ae6c4f5f30cbc64a57aca3bc06cc8729341147da [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Boost.Locale: Using Gettext Tools on Windows</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Boost.Locale
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('gettext_for_windows.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">Using Gettext Tools on Windows </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>In order to get the Gettext tools like <code>msgfmt</code>, <code>msgmerge</code>, <code>xgettext</code> for Windows you have basically several options:</p>
<ul>
<li>Download the package from <a href="http://cppcms.sourceforge.net">CppCMS</a> project (where the Boost.Locale was developed originally)</li>
<li>Download the a set of packages from MinGW project</li>
<li>Build it on your own</li>
<li>Use Cygwin's packages</li>
</ul>
<h2><a class="anchor" id="gettext_for_windows_cppcms"></a>
Getting gettext utilities from CppCMS project</h2>
<p>Boost.Locale was developed for needs of <a href="http://cppcms.sourceforge.net">CppCMS</a> project and thus CppCMS hosts a convince package for Windows users of pre-build, statically liked <code>gettext</code> runtime utilities like <code>xgettext</code>, <code>msgfmt</code>, etc.</p>
<p>So you can download a zip file <code>gettext-tools-static-XXX.zip</code> from a CppCMS downloads page under <a href="https://sourceforge.net/projects/cppcms/files/boost_locale/gettext_for_windows/">boost_locale/gettext_for_windows</a>.</p>
<p>Extract the file and use the executable files inside.</p>
<h2><a class="anchor" id="gettext_for_windows_mingw"></a>
Getting Gettext via MinGW project</h2>
<p>MinGW project provides GNU tools for Windows, including GNU compilers and various runtime utilities. Thus you can always install full MinGW distribution including gettext tools. However, if you a want minimalistic runtime version that allows you to extract messages and create catalogs you need to download several packages manually.</p>
<p>In order to install Gettext via MinGW distributing you need to download, a GCC's runtime, iconv library and gettext itself.</p>
<p>So visit a <a href="https://sourceforge.net/projects/mingw/files/">downloads page</a> of MinGW project and download following files (chose the latest versions of each package):</p>
<ul>
<li>From: <code>MinGW/BaseSystem/GCC/Version4/gcc-xxx/</code> <br/>
File: <code>libgcc-xxx-mingw32-dll-1.tar.lzma</code> </li>
<li>From <code>MinGW/Gettext/gettext-yyy/</code> <br/>
Files: <code>gettext-yyy-mingw32-dev.tar.lzma</code>, <code>libgettextpo-yyy-mingw32-dll-0.tar.lzma</code>, <code>libintl-yyy-mingw32-dll-8.tar.lzma</code> </li>
<li>From <code>MinGW/libiconv/libiconv-zzz/</code> <br/>
Files: <code>libiconv-zzz-mingw32-dll-2.tar.lzma</code>, <code>libcharset-zzz-mingw32-dll-1.tar.lzma</code> </li>
</ul>
<p>For example, at June 23, 2011 it was:</p>
<ul>
<li>GNU Runtime: <code>libgcc-4.5.2-1-mingw32-dll-1.tar.lzma</code> </li>
<li><code>iconv:</code> <code>libiconv-1.13.1-1-mingw32-dll-2.tar.lzma</code> and <code>libcharset-1.13.1-1-mingw32-dll-1.tar.lzma</code> </li>
<li><code>gettext:</code> <code>libintl-0.17-1-mingw32-dll-8.tar.lzma</code>, <code>libgettextpo-0.17-1-mingw32-dll-0.tar.lzma</code> and <code>gettext-0.17-1-mingw32-dev.tar.lzma</code>.</li>
</ul>
<p>After you download the packages, extract all the files to the same directory using tools like <code>7zip</code> and you'll get all the executables and <code>dll's</code> you need under <code>bin</code> subdirectory.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>the version on MinGW site is slightly outdated (0.17.1) while gettext provides currently 0.18.1.</dd></dl>
<h2><a class="anchor" id="gettext_for_windows_build"></a>
Building latest version on your own.</h2>
<p>You can build your own version of GNU Gettext using MinGW environment, you'll need to have up-to-date gcc compiler and the shell, you'll need to install iconv first and then build a gettext with it.</p>
<p>Basic and simplest way would be to open a MinGW shell</p>
<p>Build <code>iconv:</code> </p>
<div class="fragment"><pre class="fragment">cd libiconv-SOMEVERSION
./configure --prefix=c:/mygettext --disable-shared
make
make install
cd ..
cd <a class="code" href="group__message.html#ga1121f0001ff0f3b9455390b6412c6a2c">gettext</a>-SOMEVERSION
./configure --prefix=c:/mygettext --disable-shared --with-libiconv-prefix=c:/mygettext
make
make install
</pre></div><p>And now you have in <code>c:\mygettext\bin</code> all appropriate executable files to use.</p>
<h2><a class="anchor" id="gettext_for_windows_cygwin"></a>
Using Cygwin</h2>
<p>If you already have Cygwin - just use gettext tools provided with it. </p>
</div></div><!-- contents -->
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="index.html">Boost.Locale</a> </li>
<li class="navelem"><a class="el" href="appendix.html">Appendix</a> </li>
<li class="footer">
&copy; Copyright 2009-2012 Artyom Beilis, Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>, Version 1.0.
</li>
</ul>
</div>
</body>
</html>