|An Internationalized Software Project With Auto Tools
||Compiling under windows
It was shown how to set up an internationalized, documented and protable gui software project with autotools. In details:
- The gui was written with wxWidgets. this ensures, that the project is protable and compiles and runs under linux/unix
- gettext is used to extract all localizable strings (marked by "i18n", "i18nP" and "i18nM") and merge them with language dependent
.po files. These can be translated and are installed with the program so that at run time all output is localaized
- The documentation is written in docbook. xsltproc is used to convert it into html-help files. These can be shown with a browser
and with the wxWidgets help system (in a windows like fashion). Furthermore a windows .chm help file can be created out of it.
- po4a is used to convert the docbook help files into language dependant .po files. These can be translated and converted back
into docbook help files, so that localized help files can be created. The power of gettext .po file ensures, that only changed setions
of the documentation have to be translated, if the documentation was changed.
- Under linux/unix the gnu autotools controll the compilation and installation. Apart from some special "make" targets the
developer just has to type "make" in order to rebuild the project
- Some environment variables have to be set on some environments. A special shell script (setEnvironment.XXXX) does that.
It must be called before the first build command is started.
- If under a revision control system, a special shell script (createFromCvs.XXXXX) creates all files and links necessary,
to run the build system
- "make update-po" extracts all marked translatable strings from the source files and merges them into the language
dependant .po file. A translator can now translate all (changed) strings
- "make update-gmo" convertes the translated .po files (if changed) into its binary form and prints the
- "make force-update-gmo" enforces this. "make force-update-gmo-XX" enforces this for one language.
- The documentation is written in docbook xml files. Whenever they are changed, "make" will convert them into html-help
and will extract all strings into the documentation .po files. These can be translated and converted into language dependant
help-file by simply calling "make" again.
- "make force-update-doc" enforces the english html-file generation. It should be used to check the docbook source
files for syntactic correctness.
- "make force-update-docs" enforces the language dependant html-file generation. "make force-update-docs-XX" does
it for just one language.
- "make dist" or "make dist-bzip2" build a sorce tarball to release the software.
- "configure" prepares the compilation on the end users computer, after a clean check-out or after "make distclean".
This is the first command, an end user has to type after extracting the source tarball. Several options allow to
configure the build and install behaviour. On some systems, the location of the wxWidgets configuration file
has to be specified, e.g.: "./configure --with-wx-config=/usr/X11R6/bin/wxgtk2u-2.6-config".
- "make" compiles the sources. This is the second command for the enduser.
- "make install" installs the program. This is the last command for the enduser.
- "make mostlyclean", "make clean", "make distclean" and "make maintainer-clean" delete more and more files from
the build directory. "make mostlyclean" and "make clean" delete most or all files created by the compile, but leave
the Makefiles intact, so that other "make"'s can be followed. "make distclean" delets all files created by "configure" as
well and shoul brin the build directory into the state after extracting the source tarball. "make maintainer-clean"
delete the documentation and translation as well, which has to be rebuild with the special "make"'s above.
- "make deinstall" removes the installed software.