gettext_for_windows.txt 3.8 KB

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