Konrad
2nd February 2004 13:25 UTC
File command with variables?
What is the easiest way to copy different files (with different names) depending on the installer language, e.g. copy readme files (in specific language) to installation folder depending on the installer language.
I could do it with a strcmp like:
StrCmp $LANGUAGE${LANG_ENGLISH} 0 +2
File "readme-en.rtf"
StrCmp $LANGUAGE ${LANG_GERMAN} 0 +2
File"readme-de.rtf" ...
But that's very complicated for many languages.
Why can't I just use LangStrings? Is there any other method doing it.
Thanks in advance
Konrad
kichik
2nd February 2004 14:12 UTC
Because LangStrings are runtime. Just wrap a nice macro around it, that should make it a line a file.
Konrad
2nd February 2004 14:17 UTC
How should the makro look. Please give a hint!
Thanks
Konrad
Comm@nder21
2nd February 2004 14:21 UTC
hmm i have another not so nice solution:
copy all language-specific files to a new directory (before compiling):
.\langfiles\${LANGUAGE}\
e.g. the german files to: .\langfiles\1031\readme.rtf
the english: .\langfiles\1033\readme.rtf
then install at runtime the whole tree by
File /r /NONFATAL ".\langfiles\*.*"
then, also at runtime, copy only the right files to the right directory:
CopyFiles "$OUTDIR\langfiles\$LANGUAGE\*.*" "$OUTDIR\*.*"
at last, delete the other files:
RMDir /r "$OUTDIR\langfiles"
done.
kichik
2nd February 2004 14:25 UTC
You can copy MUI_DESCRIPTION_BEGIN, MUI_DESCRIPTION_TEXT and MUI_DESCRIPTION_END from the MUI and base it on them.
Konrad
2nd February 2004 14:38 UTC
I thought that the MUI_DESCRIPTION makros are only for the descriptions in the component page. How can I use them for a readme file, which I want to copy to installation folder?
kichik
2nd February 2004 14:44 UTC
Every insertion of the MUI_DESCRIPTION_TEXT macro sets a description text for a specific component, just like you need a macro which will extract a file for a specific language.