1 This is a guide to compile strgen on gcc |
|
2 |
|
3 All this is done in the makefile, so it's only interesting for people, who wants to alter something themselves (translators) |
|
4 |
|
5 HOWTO compile lng files: |
|
6 |
|
7 First you get strgen compiled (look below/download nightly build/run makefile) |
|
8 |
|
9 strgen takes the argument of a txt file and translates it to a lng file and places that lng file in the same dir as the txt file. |
|
10 |
|
11 Example 1: |
|
12 if you are in the root of your working copy (svn code), you should type |
|
13 strgen/strgen lang/english.txt |
|
14 to compile englist.lng. It will be placed in the lang dir |
|
15 |
|
16 Example 2: |
|
17 you have strgen but not the source and you want to compile a txt file in the same dir. YOu should type |
|
18 ./strgen english.txt |
|
19 and you will get english.lng in the same dir |
|
20 |
|
21 You can change english to whatever language you want |
|
22 |
|
23 Commands used by strgen |
|
24 |
|
25 -v --version |
|
26 strgen will tell what svn revision it is based on |
|
27 |
|
28 -t |
|
29 strgen will add <TODO> to the missing strings and use the english strings while compiling |
|
30 this will need english.txt to be present |
|
31 |
|
32 -w |
|
33 strgen will print any missing strings to standard error output(stderr) |
|
34 this will need english.txt to be present |
|
35 |
|
36 here are a very useful tool for translators: |
|
37 http://openttd.rulez.org/ |
|
38 |
|
39 |
|
40 HOWTO compile strgen: |
|
41 (this should be useless as you can just type make) |
|
42 Goto the main dir |
|
43 Compile by typing |
|
44 gcc strgen/strgen.c -o strgen/strgen -DUNIX |
|
45 or if you want it to tell the revision too |
|
46 gcc strgen/strgen.c rev.o -o strgen/strgen -DUNIX -DWITH_REV (this is the one the makefile uses) |
|
47 |
|
48 you now have a program called strgen in the strgen directory |
|