Hi Timo,
The modifications required to implement this feature on rbuild are trivial, keep in mind that mc resource files are not generated by rbuild itself, as you know makefile invokes wmc which is the tool that creates the actual resources in the intermediate folder. Creating a language folder for holding mc files, declaring them on the module rbuild file and letting rbuild generate the required makefile instructions inset of having them on Makefile as you suggested sounds good to me. It also has the advantage of conditionally exclude not desired languages with the <platformlanguage> element (see my today's commit r31154 in rbuild branch)
The only thing I don't fully agree with you is about using the <file> element for source files, resource file, localization resource files and mc files. Having them declared using specialized elements helps validating the information they contain, for example <file>lang/en-US.rc</file> is a regular resource file or a localization resource file that someone has forgotten to specify the language? No way to tell.
Regards, /Marc
-----Original Message----- From: ros-dev-bounces@reactos.org [mailto:ros-dev-bounces@reactos.org] On Behalf Of Timo Kreuzer Sent: Tuesday, December 11, 2007 3:25 PM To: ReactOS Development List Subject: [ros-dev] MESSAGETABLE localisation
I have thought about localizing our messagetables, like kernel32's errorcodes.mc Now the question is: how do we do this?
We could simply add all localisations inside the current file without changing anything else in the build process. I didn't test if it works, but it should. But it would lead to huge files full of different languages and would also remove the possibility for custom selection of the languages that are compiled.
I would prefer to go the way we do with other localisation: put different .mc files in the lang subfolder. But afaik mc files don't allow inclusion of external files, so we need some build process that compiles the different mc files into rc files and include those into a main rc file. Currently our mcs are defined in makefile. This should move to the rbuild files and rbuild should compile the mc files and create the needed rc:
<module...> ... <file>foo.c</file> <file>foo.rc</file> ... <autoresource>auto.rc</autoresource>
<localization isoname="de-DE">lang/de-DE.rc</localization>
<msgtable isoname="de-DE">lang/msgtable-de-DE.mc</msgtable>
</module>
rbuild would generate <intermediate dir>\lang\msgtable-de-DE.mc.rc and auto.rc containing includes to the generated files. IMO auto.rc should be the file that is compiled, including all localizations and the unlocalized resource file.
#include "lang/de-DE.rc" #include "lang/msgtable-de-DE.mc.rc"
If I understood Fireball correctly, this is also msvc compatible. And if not, rbuild just would have to generate the files differently.
Some ideas for simplifying the rbuild definitions: Instead of <file>, <localization> and <msgtable> we could simply use <file> for unconditional compilation, <file locale="en-US"> for localized conditional compilation. And then let rbuild decide from the file extension what to do with it. resources/messagetables could automatically be included in an autogenerated rc file, without explicitly defining it in the rbuild file.
Regards, Timo
_______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev