Skip to content

Commit

Permalink
Make localization part of doc COMPILING.md clealier (CleverRaven#46)
Browse files Browse the repository at this point in the history
* Make localization part of COMPILING.md clealier

* Fix styling of COMPILING-CMAKE.md

* Correct the mistake in lang compiling explanation

* Fix grammar in COMPILING.md
  • Loading branch information
Ilya Somov authored Sep 3, 2020
1 parent 301bd4a commit 62da310
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
28 changes: 15 additions & 13 deletions doc/COMPILING/COMPILING-CMAKE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
#Disclaimer
# Disclaimer

**WARNING**: CMake build is **NOT** official and should be used for *dev purposes ONLY*.

For official way to build CataclysmDDA See:
* [COMPILING.md](COMPILING.md)


#Contents
# Contents

1. Prerequisites
2. Build Environment
* UNIX Environment
* Windows Environment
3. CMake Build
* MinGW,MSYS,MSYS2
5. Build Options
* CMake specific options
* CataclysmDDA specific options
* [Prerequisites](#prerequisites)
* [Build Environment](#build-environment)
* [UNIX Environment](#unix-environment)
* [Windows Environment](#windows-environment-msys2)
* [CMake Build](#cmake-build)
* [MinGW,MSYS,MSYS2](#cmake-build-for-msys2-mingw)
* [MSBuild, VisualStudio](#cmake-build-for-visual-studio--msbuild)
* [Build Options](#build-options)
* [CMake specific options](#cmake-specific-options)
* [CataclysmDDA specific options])(#cataclysmdda-specific-options)

#1. Prerequisites
# Prerequisites

You'll need to have these libraries and their development headers installed in
order to build CataclysmDDA:
Expand Down Expand Up @@ -47,7 +48,7 @@ order to build CataclysmDDA:
* `iconv`


#2. Build Environment
# Build Environment

You can obtain the source code tarball for the latest version from [git](https://github.com/CleverRaven/Cataclysm-DDA).

Expand Down Expand Up @@ -348,3 +349,4 @@ Run the game. Should work.
```
cmake ../ -DCMAKE_BUILD_TYPE=Release -DTILES=ON -DSOUND=ON
```

5 changes: 3 additions & 2 deletions doc/COMPILING/COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Given you're building from source you have a number of choices to make:
* `TILES=1` - with this you'll get the tiles version, without it the curses version
* `SOUND=1` - if you want sound; this requires `TILES=1`
* `LOCALIZE=0` - this disables localizations so `gettext` is not needed
* `LANGUAGES=` - specifies localizations. See details [here](#compiling-localization-files)
* `CLANG=1` - use Clang instead of GCC
* `CCACHE=1` - use ccache
* `USE_LIBCXX=1` - use libc++ instead of libstdc++ with Clang (default on OS X)
Expand All @@ -109,11 +110,11 @@ You should probably always build with `RELEASE=1` unless you experience segfault

## Compiling localization files

If you want to compile localization files for specific languages, you can add `LANGUAGES="<lang_id_1> [lang_id_2] [...]"` option to make command:
`LOCALIZE` (enabled by default) only enables localization itself, but doesn't include any languages. If you want to compile files for specific languages, you should add `LANGUAGES="<lang_id_1> [lang_id_2] [...]"` option to make command:

make LANGUAGES="zh_CN zh_TW"

You can get the language ID from the filenames of `*.po` in `lang/po` directory. Setting `LOCALIZE=1` only may not tell `make` to compile those localization files for you.
You can get the language ID from the filenames of `*.po` in `lang/po` directory or use `LANGUAGES="all"` to complile all available localizations.

Special note for MinGW: due to a [libintl bug](https://savannah.gnu.org/bugs/index.php?58006), using English without a `.mo` file would cause significant slow down on MinGW targets. In such case you can compile a `.mo` file for English using `make LANGUAGES="en"`. `make LANGUAGE="all"` also compiles a `.mo` file for English in addition to other languages.

Expand Down

0 comments on commit 62da310

Please sign in to comment.